From 2952c34096357dffc207778ea1b73e71387ac010 Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Mon, 16 Apr 2007 11:31:54 -0400 Subject: Fixes for splash, may conflict with Korey's SMT work and doesn't support 03cpu yet. src/cpu/simple/base.cc: Cpu's should start as unallocated, not suspended src/cpu/simple_thread.cc: Wait for a thread to be assigned to activate the cpu src/kern/tru64/tru64.hh: When looking for a open cpu to assign threads, look for an unallocated one, not a suspended one. --HG-- extra : convert_revision : 5e3ad2e96b4a715ed38293ceaccff5b9f4ea7985 --- src/kern/tru64/tru64.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kern') diff --git a/src/kern/tru64/tru64.hh b/src/kern/tru64/tru64.hh index b94276035..a7703be7c 100644 --- a/src/kern/tru64/tru64.hh +++ b/src/kern/tru64/tru64.hh @@ -792,7 +792,7 @@ class Tru64 : public OperatingSystem for (int i = 0; i < process->numCpus(); ++i) { ThreadContext *tc = process->threadContexts[i]; - if (tc->status() == ThreadContext::Suspended) { + if (tc->status() == ThreadContext::Unallocated) { // inactive context... grab it init_thread_context(tc, attrp, uniq_val); -- cgit v1.2.3 From 8d56145d7b6f759456993b63692165d4b510adda Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 30 Apr 2007 22:49:21 -0400 Subject: always skip the debugprintf function (DebugPrintf traceflag shouldn't matter). Otherwise, when you turn on debugprintf alters the execution --HG-- extra : convert_revision : 1c9a665e3b7234cacf06c31d2e7886244a9e82bc --- src/kern/linux/events.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kern') diff --git a/src/kern/linux/events.cc b/src/kern/linux/events.cc index ba52e040a..4a3fd9f47 100644 --- a/src/kern/linux/events.cc +++ b/src/kern/linux/events.cc @@ -51,8 +51,8 @@ DebugPrintkEvent::process(ThreadContext *tc) TheISA::Arguments args(tc); Printk(args); - SkipFuncEvent::process(tc); } + SkipFuncEvent::process(tc); } } // namespace linux -- cgit v1.2.3 From 3f2b039c98e57cdcd22376552d77603e6233c371 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 1 May 2007 18:14:16 -0400 Subject: change the way dprintf works so the cache accesses required to fulfill the dprintf aren't show in between the Cycle: name: printing and the actual formatted string being printed --HG-- extra : convert_revision : 8876ba938ba971f854bab490c9af10db039a2e83 --- src/kern/linux/events.cc | 11 +++++------ src/kern/linux/events.hh | 8 ++------ src/kern/linux/printk.cc | 13 +++---------- src/kern/linux/printk.hh | 4 +++- 4 files changed, 13 insertions(+), 23 deletions(-) (limited to 'src/kern') diff --git a/src/kern/linux/events.cc b/src/kern/linux/events.cc index 4a3fd9f47..42fa63a27 100644 --- a/src/kern/linux/events.cc +++ b/src/kern/linux/events.cc @@ -37,6 +37,7 @@ #include "kern/system_events.hh" #include "sim/system.hh" +#include namespace Linux { @@ -44,13 +45,11 @@ void DebugPrintkEvent::process(ThreadContext *tc) { if (DTRACE(DebugPrintf)) { - if (!raw) { - StringWrap name(tc->getSystemPtr()->name() + ".dprintk"); - DPRINTFN(""); - } - + std::stringstream ss; TheISA::Arguments args(tc); - Printk(args); + Printk(ss, args); + StringWrap name(tc->getSystemPtr()->name() + ".dprintk"); + DPRINTFN("%s", ss.str()); } SkipFuncEvent::process(tc); } diff --git a/src/kern/linux/events.hh b/src/kern/linux/events.hh index b0510c18f..e36a72dde 100644 --- a/src/kern/linux/events.hh +++ b/src/kern/linux/events.hh @@ -38,13 +38,9 @@ namespace Linux { class DebugPrintkEvent : public SkipFuncEvent { - private: - bool raw; - public: - DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr, - bool r = false) - : SkipFuncEvent(q, desc, addr), raw(r) {} + DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr) + : SkipFuncEvent(q, desc, addr) {} virtual void process(ThreadContext *xc); }; diff --git a/src/kern/linux/printk.cc b/src/kern/linux/printk.cc index 0e9fd6620..866353e31 100644 --- a/src/kern/linux/printk.cc +++ b/src/kern/linux/printk.cc @@ -32,22 +32,18 @@ #include #include -#include "base/trace.hh" #include "arch/arguments.hh" +#include "base/trace.hh" +#include "kern/linux/printk.hh" using namespace std; void -Printk(TheISA::Arguments args) +Printk(stringstream &out, TheISA::Arguments args) { - std::ostream &out = Trace::output(); char *p = (char *)args++; - ios::fmtflags saved_flags = out.flags(); - char old_fill = out.fill(); - int old_precision = out.precision(); - while (*p) { switch (*p) { case '%': { @@ -258,8 +254,5 @@ Printk(TheISA::Arguments args) } } - out.flags(saved_flags); - out.fill(old_fill); - out.precision(old_precision); } diff --git a/src/kern/linux/printk.hh b/src/kern/linux/printk.hh index 17d59b765..20dfb430f 100644 --- a/src/kern/linux/printk.hh +++ b/src/kern/linux/printk.hh @@ -34,8 +34,10 @@ #include "arch/isa_specific.hh" +#include + class TheISA::Arguments; -void Printk(TheISA::Arguments args); +void Printk(std::stringstream &out, TheISA::Arguments args); #endif // __PRINTK_HH__ -- cgit v1.2.3