Discussion:
Thread Stats/Traces
(too old to reply)
Amine Marref
2018-11-19 23:28:25 UTC
Permalink
Hello,

I am trying to understand some of the timing behaviour of a multi-threaded
application. I am running gem5 in FS mode and I can obtain two useful files
"stats.txt" and "system.tasks.txt". Throughout the lines of the two files,
I could find three ways of referring to a cpu/core: (i) "cpu" suffixed with
a natural number (cpuN), (ii) "cpus" suffixed with a natural number
(cpusN), and (iii) "cpu_id" equals some natural number (cpu_id=N).

The following are (non-contiguous) lines from the "stats.txt" output file.
system.cpu0.dtb.hits 6
# DTB hits
system.cpu1.pwrStateResidencyTicks::OFF 203472000
# Cumulative time (in ticks) in various power states
system.cpu2.itb.inst_hits 0
# ITB inst hits
system.cpu3.itb.flush_tlb 2
# Number of times complete TLB was flushed
system.switch_cpus0.fetch.rateDist::samples 312140
# Number of instructions fetched each cycle (Total)
system.switch_cpus1.rob.rob_reads 0
# The number of ROB reads
system.switch_cpus2.iew.iewIdleCycles 0
# Number of cycles IEW is idle
system.switch_cpus3.itb.write_accesses 0
# DTB write accesses

The following are lines from the "systems.tasks.txt" output file.
tick=3203692196500 5 cpu_id=0 next_pid=1107 next_tgid=1107
next_task=runscript
tick=3203956858500 6 cpu_id=0 next_pid=1 next_tgid=1 next_task=init
tick=3204033514000 3 cpu_id=0 next_pid=-1 next_tgid=-1 next_task=kernel

My understanding is that "cpuN" in the "stats.txt" file refers to [0..N]
processor cpus/cores specified by the flag "-n N" that is passed to the
simulation script "fs.py". My guess is that "cpusN" refers to the same
entity but what is the "s" doing there? To mean "switch"? Finally, from my
reading around, it looks like "cpu_id=N" is not related to the cpus/cores
used to simulate a program but rather to the cpu model used in simulation
e.g. "--cpu-type=O3_ARM_v7a_3" has "cpu_id=0".

My question finally is: "is my understanding of the meaning of the three
cpu entities above correct"?

Thanks,
Amine.
--
marref.org
Loading...