diff options
Diffstat (limited to 'cpu/base.cc')
-rw-r--r-- | cpu/base.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cpu/base.cc b/cpu/base.cc index e2a4c214a..2eb5f7fd3 100644 --- a/cpu/base.cc +++ b/cpu/base.cc @@ -271,11 +271,10 @@ BaseCPU::takeOverFrom(BaseCPU *oldCPU) for (int i = 0; i < TheISA::NumInterruptLevels; ++i) interrupts[i] = oldCPU->interrupts[i]; intstatus = oldCPU->intstatus; -/* + for (int i = 0; i < execContexts.size(); ++i) - if (execContexts[i]->profile) - execContexts[i]->profile->clear(); -*/ + execContexts[i]->profileClear(); + if (profileEvent) profileEvent->schedule(curTick); #endif @@ -290,11 +289,11 @@ BaseCPU::ProfileEvent::ProfileEvent(BaseCPU *_cpu, int _interval) void BaseCPU::ProfileEvent::process() { -/* for (int i = 0, size = cpu->execContexts.size(); i < size; ++i) { + for (int i = 0, size = cpu->execContexts.size(); i < size; ++i) { ExecContext *xc = cpu->execContexts[i]; - xc->profile->sample(xc->profileNode, xc->profilePC); + xc->profileSample(); } -*/ + schedule(curTick + interval); } |