ThreadState: Ensure that kernelStats is properly initialized

This commit is contained in:
Nathan Binkert 2008-06-17 21:11:20 -07:00
parent 9dc4e2952c
commit 163465ac08
2 changed files with 2 additions and 5 deletions

View file

@ -86,11 +86,8 @@ SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys,
profileNode = &dummyNode;
profilePC = 3;
if (use_kernel_stats) {
if (use_kernel_stats)
kernelStats = new TheISA::Kernel::Statistics(system);
} else {
kernelStats = NULL;
}
}
#else
SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process,

View file

@ -46,7 +46,7 @@
ThreadState::ThreadState(BaseCPU *cpu, int _cpuId, int _tid)
: baseCpu(cpu), cpuId(_cpuId), tid(_tid), lastActivate(0), lastSuspend(0),
profile(NULL), profileNode(NULL), profilePC(0), quiesceEvent(NULL),
physPort(NULL), virtPort(NULL),
kernelStats(NULL), physPort(NULL), virtPort(NULL),
microPC(0), nextMicroPC(1), funcExeInst(0), storeCondFailures(0)
#else
ThreadState::ThreadState(BaseCPU *cpu, int _cpuId, int _tid, Process *_process,