Hi,
I ran into similar issues before. Say I did, boot the cpus with atomic cpu, 
then warmup the application with atomic cpu, then restore with atomic cpu for 
ROI data collection. With this, the final numcycles are counted including 
boot+warmup+roi, not just roi. If you did a finalTick/ frequency, that should 
match.

Issue: in simple cpu, including both atomic and timing
lastSuspend is 0 when resume, then when it try to increment cycles using 
lastActivate-lastSuspend, it includes all cycles before.

My fix: add this line in
AtomicSimpleCPU::drainResume()
threadInfo[0]->thread->lastSuspend = curTick();

So, whenever atomic cpu resume from checkpoint, it counts from that point. I 
hope this is what you were looking for. This can probably make to the mainline 
gem5 if my understanding of the issue is correct.

Best,
Heng

On Apr 12, 2023, at 15:40, Farbin Fayza via gem5-users <gem5-users@gem5.org> 
wrote:

Hi, I'm running SPEC2017 benchmark in full-system mode using the 
configs/example/gem5_library/x86-spec-cpu2017-benchmarks.py config file.

In the outputs m5/stats.txt, there's no system.cpu.cpi metric mentioned.
So, to calculate the CPI, I tried dividing 
board.processor.switch0.core.numCycles by
board.processor.switch0.core.exec_context.thread_0.numInsts. But it results in 
a large number (~10) which I don't think is the correct way to calculate CPI. 
Could anyone tell me what is the correct way to calculate the CPI based on the 
stats.txt results?

Thanks,
Farbin.
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to