summaryrefslogtreecommitdiff
path: root/kern/tru64/tru64_events.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kern/tru64/tru64_events.cc')
-rw-r--r--kern/tru64/tru64_events.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/kern/tru64/tru64_events.cc b/kern/tru64/tru64_events.cc
index f542256e4..a57c01841 100644
--- a/kern/tru64/tru64_events.cc
+++ b/kern/tru64/tru64_events.cc
@@ -35,11 +35,8 @@
#include "kern/tru64/tru64_events.hh"
#include "mem/functional_mem/memory_control.hh"
#include "targetarch/arguments.hh"
-
-#ifdef FS_MEASURE
#include "sim/system.hh"
#include "sim/sw_context.hh"
-#endif
void
SkipFuncEvent::process(ExecContext *xc)
@@ -110,7 +107,6 @@ DumpMbufEvent::process(ExecContext *xc)
}
}
-#ifdef FS_MEASURE
FnEvent::FnEvent(PCEventQueue *q, const std::string & desc, System *system)
: PCEvent(q, desc), _name(desc)
{
@@ -128,13 +124,25 @@ FnEvent::process(ExecContext *xc)
DPRINTF(TCPIP, "%s: %s Event!!!\n", xc->system->name(), description);
if (ctx && !ctx->callStack.empty()) {
+ DPRINTF(TCPIP, "already a callstack!\n");
fnCall *last = ctx->callStack.top();
- if (!xc->system->findCaller(myname(), last->name)) {
+
+ if (last->name == "idle_thread")
+ ctx->calls++;
+
+ if (!xc->system->findCaller(myname(), "" ) &&
+ !xc->system->findCaller(myname(), last->name)) {
+
+ DPRINTF(TCPIP, "but can't find parent %s\n", last->name);
return;
}
ctx->calls--;
+
+ //assert(!ctx->calls && "on a binned fn, calls should == 0 (but can happen in boot)");
} else {
+ DPRINTF(TCPIP, "no callstack yet\n");
if (!xc->system->findCaller(myname(), "")) {
+ DPRINTF(TCPIP, "not the right function, returning\n");
return;
}
if (!ctx) {
@@ -150,6 +158,7 @@ FnEvent::process(ExecContext *xc)
ctx->callStack.push(call);
myBin->activate();
xc->system->fnCalls++;
+ DPRINTF(TCPIP, "fnCalls for %s is %d\n", description,
+ xc->system->fnCalls.val());
xc->system->dumpState(xc);
}
-#endif //FS_MEASURE