From 3ce2d0fad04201b168dd9847a5120c80408f6498 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 9 Mar 2012 09:59:26 -0500 Subject: System: Move code in initState() back into constructor whenever possible. The change to port proxies recently moved code out of the constructor into initState(). This is needed for code that loads data into memory, however for code that setups symbol tables, kernel based events, etc this is the wrong thing to do as that code is only called when a checkpoint isn't being restored from. --- src/arch/alpha/linux/system.cc | 7 +++++++ src/arch/alpha/linux/system.hh | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'src/arch/alpha/linux') diff --git a/src/arch/alpha/linux/system.cc b/src/arch/alpha/linux/system.cc index e42553b63..db3c16d7e 100644 --- a/src/arch/alpha/linux/system.cc +++ b/src/arch/alpha/linux/system.cc @@ -113,6 +113,12 @@ LinuxAlphaSystem::initState() else panic("could not find dp264_mv\n"); +} + +void +LinuxAlphaSystem::setupFuncEvents() +{ + AlphaSystem::setupFuncEvents(); #ifndef NDEBUG kernelPanicEvent = addKernelFuncEvent("panic"); if (!kernelPanicEvent) @@ -148,6 +154,7 @@ LinuxAlphaSystem::initState() // re-enable, but we should find a better way to turn it on than // using DTRACE(Thread), since looking at a trace flag at tick 0 // leads to non-intuitive behavior with --trace-start. + Addr addr = 0; if (false && kernelSymtab->findAddress("alpha_switch_to", addr)) { printThreadEvent = new PrintThreadInfo(&pcEventQueue, "threadinfo", addr + sizeof(MachInst) * 6); diff --git a/src/arch/alpha/linux/system.hh b/src/arch/alpha/linux/system.hh index 5436a27b2..345c17bb7 100644 --- a/src/arch/alpha/linux/system.hh +++ b/src/arch/alpha/linux/system.hh @@ -123,6 +123,12 @@ class LinuxAlphaSystem : public AlphaSystem /** Grab the PCBB of the idle process when it starts */ IdleStartEvent *idleStartEvent; + protected: + /** Setup all the function events. Must be done after init() for Alpha since + * fixFuncEvent() requires a function port + */ + virtual void setupFuncEvents(); + public: typedef LinuxAlphaSystemParams Params; LinuxAlphaSystem(Params *p); -- cgit v1.2.3