diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2005-09-24 14:20:29 -0400 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2005-09-24 14:20:29 -0400 |
commit | d60de7122da3a90a0204853f633d34d93dcc622f (patch) | |
tree | f924b3f340c67c752efd7648b8e1f7ce7958425d /kern/tru64/tru64_system.cc | |
parent | b15a7aaf5e2099a3d13061c63246bed8378d2e2f (diff) | |
download | gem5-d60de7122da3a90a0204853f633d34d93dcc622f.tar.xz |
Add functions to System object to set up function-based events,
including automatically fixing up addresses to deal with
optionally executed Alpha gp update prolog.
SConscript:
Remove freebsd_events.cc and linux_events.cc.
base/remote_gdb.cc:
cpu/pc_event.cc:
kern/system_events.cc:
kern/system_events.hh:
PCEvents now schedule themselves in constructor.
cpu/pc_event.hh:
PCEvents now schedule themselves in the constructor.
Get rid of constructor versions that don't take an address and
all the schedule() methods that are now unnecessary.
kern/freebsd/freebsd_system.cc:
kern/freebsd/freebsd_system.hh:
Use new System methods to schedule function-based events.
Move FreeBSD-specific function event classes into FreebsdSystem.
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
Use new System methods to schedule function-based events.
Move Linux-specific function event classes into LinuxSystem.
kern/tru64/tru64_events.hh:
PCEvents now schedule themselves in constructor.
Add DebugPrintfrEvent to encapsulate raw setting as new type
(to work better with new System function-event method.)
kern/tru64/tru64_system.cc:
Use new System methods to schedule function-based events.
kern/tru64/tru64_system.hh:
Add DebugPrintfrEvent to encapsulate raw setting as new type
(to work better with new System function-event method.)
sim/system.cc:
sim/system.hh:
Add functions to set up function-based events, including
automatically fixing up addresses to deal with optionally
executed Alpha gp update prolog.
--HG--
extra : convert_revision : c2cf09144297b6602afe755a34a0a2227023783f
Diffstat (limited to 'kern/tru64/tru64_system.cc')
-rw-r--r-- | kern/tru64/tru64_system.cc | 46 |
1 files changed, 12 insertions, 34 deletions
diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc index d4b056c62..f65293474 100644 --- a/kern/tru64/tru64_system.cc +++ b/kern/tru64/tru64_system.cc @@ -55,47 +55,25 @@ Tru64System::Tru64System(Tru64System::Params *p) } #ifdef DEBUG - kernelPanicEvent = new BreakPCEvent(&pcEventQueue, "kernel panic"); - if (kernelSymtab->findAddress("panic", addr)) - kernelPanicEvent->schedule(addr); - else + kernelPanicEvent = addKernelFuncEvent<BreakPCEvent>("panic"); + if (!kernelPanicEvent) panic("could not find kernel symbol \'panic\'"); #endif - badaddrEvent = new BadAddrEvent(&pcEventQueue, "badaddr"); - if (kernelSymtab->findAddress("badaddr", addr)) - badaddrEvent->schedule(addr); - else + badaddrEvent = addKernelFuncEvent<BadAddrEvent>("badaddr"); + if (!badaddrEvent) panic("could not find kernel symbol \'badaddr\'"); - skipPowerStateEvent = new SkipFuncEvent(&pcEventQueue, - "tl_v48_capture_power_state"); - if (kernelSymtab->findAddress("tl_v48_capture_power_state", addr)) - skipPowerStateEvent->schedule(addr); - - skipScavengeBootEvent = new SkipFuncEvent(&pcEventQueue, - "pmap_scavenge_boot"); - if (kernelSymtab->findAddress("pmap_scavenge_boot", addr)) - skipScavengeBootEvent->schedule(addr); + skipPowerStateEvent = + addKernelFuncEvent<SkipFuncEvent>("tl_v48_capture_power_state"); + skipScavengeBootEvent = + addKernelFuncEvent<SkipFuncEvent>("pmap_scavenge_boot"); #if TRACING_ON - printfEvent = new PrintfEvent(&pcEventQueue, "printf"); - if (kernelSymtab->findAddress("printf", addr)) - printfEvent->schedule(addr); - - debugPrintfEvent = new DebugPrintfEvent(&pcEventQueue, "debug_printf", - false); - if (kernelSymtab->findAddress("m5printf", addr)) - debugPrintfEvent->schedule(addr); - - debugPrintfrEvent = new DebugPrintfEvent(&pcEventQueue, "debug_printfr", - true); - if (kernelSymtab->findAddress("m5printfr", addr)) - debugPrintfrEvent->schedule(addr); - - dumpMbufEvent = new DumpMbufEvent(&pcEventQueue, "dump_mbuf"); - if (kernelSymtab->findAddress("m5_dump_mbuf", addr)) - dumpMbufEvent->schedule(addr); + printfEvent = addKernelFuncEvent<PrintfEvent>("printf"); + debugPrintfEvent = addKernelFuncEvent<DebugPrintfEvent>("m5printf"); + debugPrintfrEvent = addKernelFuncEvent<DebugPrintfrEvent>("m5printfr"); + dumpMbufEvent = addKernelFuncEvent<DumpMbufEvent>("m5_dump_mbuf"); #endif } |