summaryrefslogtreecommitdiff
path: root/kern/tru64/tru64_events.cc
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2004-05-18 01:40:03 -0400
committerLisa Hsu <hsul@eecs.umich.edu>2004-05-18 01:40:03 -0400
commita0ccdf8aba8f71c8d66c03f5c6907d0a3c2e091f (patch)
tree71de26a0139e7db042c79989ae745377d98c3d23 /kern/tru64/tru64_events.cc
parent4d98ab1ca92c2d88d3ee13a7518acc36a6d5bf84 (diff)
parent02af86f7e813db27b12214ea377948f07f891b69 (diff)
downloadgem5-a0ccdf8aba8f71c8d66c03f5c6907d0a3c2e091f.tar.xz
merge m5 with linux for the event and binning lifting
--HG-- extra : convert_revision : 09d3678746c2e9a93a9982dc75d5e1ac309cb2fa
Diffstat (limited to 'kern/tru64/tru64_events.cc')
-rw-r--r--kern/tru64/tru64_events.cc82
1 files changed, 4 insertions, 78 deletions
diff --git a/kern/tru64/tru64_events.cc b/kern/tru64/tru64_events.cc
index 17a5e406a..89b808653 100644
--- a/kern/tru64/tru64_events.cc
+++ b/kern/tru64/tru64_events.cc
@@ -28,32 +28,14 @@
#include "cpu/exec_context.hh"
#include "cpu/base_cpu.hh"
-#include "cpu/full_cpu/bpred.hh"
-#include "cpu/full_cpu/full_cpu.hh"
+#include "kern/system_events.hh"
+#include "kern/tru64/tru64_events.hh"
#include "kern/tru64/dump_mbuf.hh"
#include "kern/tru64/printf.hh"
-#include "kern/tru64/tru64_events.hh"
-#include "mem/functional_mem/memory_control.hh"
#include "targetarch/arguments.hh"
-#include "sim/system.hh"
-#include "sim/sw_context.hh"
-
-void
-SkipFuncEvent::process(ExecContext *xc)
-{
- Addr newpc = xc->regs.intRegFile[ReturnAddressReg];
-
- DPRINTF(PCEvent, "skipping %s: pc=%x, newpc=%x\n", description,
- xc->regs.pc, newpc);
-
- xc->regs.pc = newpc;
- xc->regs.npc = xc->regs.pc + sizeof(MachInst);
+#include "mem/functional_mem/memory_control.hh"
- BranchPred *bp = xc->cpu->getBranchPred();
- if (bp != NULL) {
- bp->popRAS(xc->thread_num);
- }
-}
+//void SkipFuncEvent::process(ExecContext *xc);
void
BadAddrEvent::process(ExecContext *xc)
@@ -106,59 +88,3 @@ DumpMbufEvent::process(ExecContext *xc)
tru64::DumpMbuf(args);
}
}
-
-FnEvent::FnEvent(PCEventQueue *q, const std::string & desc, System *system)
- : PCEvent(q, desc), _name(desc)
-{
- myBin = system->getBin(desc);
- assert(myBin);
-}
-
-void
-FnEvent::process(ExecContext *xc)
-{
- if (xc->misspeculating())
- return;
- assert(xc->system->bin && "FnEvent must be in a binned system");
- SWContext *ctx = xc->swCtx;
- 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 (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) {
- DPRINTF(TCPIP, "creating new context for %s\n", myname());
- ctx = new SWContext;
- xc->swCtx = ctx;
- }
- }
- DPRINTF(TCPIP, "adding fn %s to context\n", myname());
- fnCall *call = new fnCall;
- call->myBin = myBin;
- call->name = myname();
- ctx->callStack.push(call);
- myBin->activate();
- xc->system->fnCalls++;
- DPRINTF(TCPIP, "fnCalls for %s is %d\n", description,
- xc->system->fnCalls.value());
- xc->system->dumpState(xc);
-}