diff options
Diffstat (limited to 'src/cpu/o3/thread_state.hh')
-rw-r--r-- | src/cpu/o3/thread_state.hh | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/cpu/o3/thread_state.hh b/src/cpu/o3/thread_state.hh index fc54ec33c..9273b00da 100644 --- a/src/cpu/o3/thread_state.hh +++ b/src/cpu/o3/thread_state.hh @@ -75,22 +75,23 @@ struct O3ThreadState : public ThreadState { : ThreadState(_cpu, _thread_num, _process), cpu(_cpu), inSyscall(0), trapPending(0) { - if (FullSystem) { - if (cpu->params()->profile) { - profile = new FunctionProfile( - cpu->params()->system->kernelSymtab); - Callback *cb = - new MakeCallback<O3ThreadState, - &O3ThreadState::dumpFuncProfile>(this); - registerExitCallback(cb); - } + if (!FullSystem) + return; - // let's fill with a dummy node for now so we don't get a segfault - // on the first cycle when there's no node available. - static ProfileNode dummyNode; - profileNode = &dummyNode; - profilePC = 3; + if (cpu->params()->profile) { + profile = new FunctionProfile( + cpu->params()->system->kernelSymtab); + Callback *cb = + new MakeCallback<O3ThreadState, + &O3ThreadState::dumpFuncProfile>(this); + registerExitCallback(cb); } + + // let's fill with a dummy node for now so we don't get a segfault + // on the first cycle when there's no node available. + static ProfileNode dummyNode; + profileNode = &dummyNode; + profilePC = 3; } /** Pointer to the ThreadContext of this thread. */ |