2018-11-19 23:28:25 UTC
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.
# DTB hits
# Cumulative time (in ticks) in various power states
# ITB inst hits
# Number of times complete TLB was flushed
# Number of instructions fetched each cycle (Total)
# The number of ROB reads
# Number of cycles IEW is idle
# 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
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"?