This section describes the Probes Framework in Simics.
Simics' Probes framework provides a generic mechanism for measuring counters and other statistics in Simics. The probe measurement points are distributed across the entire simulated system.
Probes can be related to target processors, device models, the host system (where Simics runs), instrumentation tools etc. There are also probes which present sums of other probes in the system on cell or global level.
Currently, most probes have been added for the purpose of measuring and understanding the performance of Simics. Additional probes could focus more on the target hardware and software aspects.
A probe offers a simple way to extract the value, and also contains type information and formatting hints on the probe itself to present the value of the probe, in an uniform and user-readable format.
A probe is identified by a probe-kind, which is a string with a hierarchical namespaces separated with dots (.). For example, cpu.cycles would be found in each processor model in the system and represents how many cycles that has elapsed on the specific processor. The cell.cycles probes are related to the cell objects and this returns the sum of executed cycles of processors which are located under the specific cell. Finally, sim.cycles is not related to any object but form a singleton sum of all the processor's cycles elapsed.
Probes can also be derived from other probes, offering some calculated metric. For example sim.slowdown is calculated as the fraction between sim.time.wallclock and sim.time.virtual, providing an indication how fast the virtual time elapsed compared to the real wallclock time on the system which Simics runs on.
Simics itself is aware of all probes that currently exist in the system, allowing commands to list the probes or read out their values from Simics command line interface.
Probes may either be explicitly implemented in the various Simics objects, or can be implicitly created by the probes framework itself. For example, Simics may detect that a new object is created that implements the cycle interface and then automatically create probes for accessing the new object's cycle information.
To look at the available probes, the probe-feature must first be enabled, which can be done with the enable-probes command. When the feature is enabled all probes in the system are detected and/or implicitly created. Also, any further creation or deletion of Simics objects is monitored, keeping the list of known probes in sync with the simulated system.
When the probes framework is enabled, a singleton object called probes is created, which holds all commands to examine probes. For example the probes.list-kinds command gives an overview of the probes that is available in the system, and the amount of objects for each probe-kind. See figure 22 for some examples.
./simics qsp-x86/firststeps machine:hardware:processor:num_cores=2
simics> enable-probes
simics> probes.list-kinds
┌─────────┬───────────────────────────────────┬──────────────────────────┬───┬────────────────────────────────────────┐
│ Row # │ Probe Kind │ Display Name │Num│ Description │
├─────────┼───────────────────────────────────┼──────────────────────────┼───┼────────────────────────────────────────┤
│ 1│cell.cycles │Cycles │ 1│Total number of expired cycles in all │
│ │ │ │ │processors in a specific cell │
├─────────┼───────────────────────────────────┼──────────────────────────┼───┼────────────────────────────────────────┤
│ 2│cell.esteps │Esteps │ 1│Total number of executed steps │
│ │ │ │ │(~instructions) on all processors in a │
│ │ │ │ │specific cell, ignoring any halt steps │
├─────────┼───────────────────────────────────┼──────────────────────────┼───┼────────────────────────────────────────┤
│ 3│cell.event.cycle.histogram │Cycle Event Histogram │ 1│Histogram of all cycle events triggered │
│ │ │ │ │in a cell. │
├─────────┼───────────────────────────────────┼──────────────────────────┼───┼────────────────────────────────────────┤
│ 4│cell.event.cycle.intensity │Cycle Event Intensity │ 1│Number of cycles per event in a cell. │
├─────────┼───────────────────────────────────┼──────────────────────────┼───┼────────────────────────────────────────┤
...
simics> probes.list-kinds probe-kind = cpu. categories = instructions -active -probe-type
┌─────┬────────────────┬────────────┬───┬────────┬────────────────────────────────────────────────────────────────────┐
│Row #│ Probe Kind │Display Name│Num│ Type │ Description │
├─────┼────────────────┼────────────┼───┼────────┼────────────────────────────────────────────────────────────────────┤
│ 1│cpu.esteps │Esteps │ 2│int │Number of executed steps (~instructions) on this processor, ignoring│
│ │ │ │ │ │any halt steps │
├─────┼────────────────┼────────────┼───┼────────┼────────────────────────────────────────────────────────────────────┤
│ 2│cpu.load_percent│Sim Load% │ 2│fraction│Calculated load of a processor, that is, instruction per cycles, │
│ │ │ │ │ │shown as percent: esteps / cycles. 0% is reported if the processor │
│ │ │ │ │ │is entirely idle and 100% when the processor executes instructions │
│ │ │ │ │ │for all cycles. The value is also adjusted with the current step- │
│ │ │ │ │ │rate of a processor, if this exists. Note that if the step-rate is │
│ │ │ │ │ │dynamically changed during execution, the result will be incorrect │
│ │ │ │ │ │and 0 / 0 is returned. │
├─────┼────────────────┼────────────┼───┼────────┼────────────────────────────────────────────────────────────────────┤
│ 3│cpu.steps │Steps │ 2│int │Number of steps (~instructions) consumed by this processor, │
│ │ │ │ │ │including any halt steps │
├─────┼────────────────┼────────────┼───┼────────┼────────────────────────────────────────────────────────────────────┤
│Sum │ │ │ 6│ │ │
└─────┴────────────────┴────────────┴───┴────────┴────────────────────────────────────────────────────────────────────┘
simics> probes.list-kinds -objects probe-kind = cpu.steps
┌─────┬──────────┬────────────┬───┬────────────────────────────────────────┬─────────────────────────────────────────┐
│Row #│Probe Kind│Display Name│Num│ Objects │ Description │
├─────┼──────────┼────────────┼───┼────────────────────────────────────────┼─────────────────────────────────────────┤
│ 1│cpu.steps │Steps │ 2│board.mb.cpu0.core[0][0], board.mb.cpu0.│Number of steps (~instructions) consumed │
│ │ │ │ │core[1][0] │by this processor, including any halt │
│ │ │ │ │ │steps │
├─────┼──────────┼────────────┼───┼────────────────────────────────────────┼─────────────────────────────────────────┤
│Sum │ │ │ 2│ │ │
└─────┴──────────┴────────────┴───┴────────────────────────────────────────┴─────────────────────────────────────────┘
The probes.read allows one or several probes values to be read out and displayed. The command can also be used in in Simics scripts to assign cli-variables. If a single probe is read, its value will be returned, while using probe-kind will return a list of tuples [(probe, value)*] that was read out.
See figure 23 for some examples.
simics> disable-vmp
simics> run-seconds 1
simics> probes.read probe-kind = cpu. -active
┌─────┬────────────────────────────────────────────────────────────┬─────────────┐
│Row #│ Probe │ Value│
├─────┼────────────────────────────────────────────────────────────┼─────────────┤
│ 1│board.mb.cpu0.core[0][0]:cpu.counter.x86.exception │ 0│
│ 2│board.mb.cpu0.core[0][0]:cpu.counter.x86.exception_intensity│ -│
│ 3│board.mb.cpu0.core[0][0]:cpu.counter.x86.interrupt │ 78│
│ 4│board.mb.cpu0.core[0][0]:cpu.counter.x86.interrupt_intensity│ 6444230.13│
│ 5│board.mb.cpu0.core[0][0]:cpu.cycles │ 2000000000│
│ 6│board.mb.cpu0.core[0][0]:cpu.disabled_reason │ │
│ 7│board.mb.cpu0.core[0][0]:cpu.esteps │ 502649950│
│ 8│board.mb.cpu0.core[0][0]:cpu.exec_mode.hypersim_steps │ 0│
│ 9│board.mb.cpu0.core[0][0]:cpu.load_percent │ 25%│
│ 10│board.mb.cpu0.core[0][0]:cpu.steps │ 502649950│
│ 11│board.mb.cpu0.core[0][0]:cpu.time.virtual │ 00:00:01.00│
│ 12│board.mb.cpu0.core[0][0]:cpu.time.virtual_ps │1000000000000│
│ 13│board.mb.cpu0.core[0][0]:cpu.vmp.vmexits.histogram │ │
│ 14│board.mb.cpu0.core[0][0]:cpu.vmp.vmexits.total │ 0│
│ 15│board.mb.cpu0.core[0][0]:cpu.vmp.vmrets.total │ 0│
│ 16│board.mb.cpu0.core[1][0]:cpu.counter.x86.exception │ 0│
│ 17│board.mb.cpu0.core[1][0]:cpu.counter.x86.exception_intensity│ -│
│ 18│board.mb.cpu0.core[1][0]:cpu.counter.x86.interrupt │ 0│
│ 19│board.mb.cpu0.core[1][0]:cpu.counter.x86.interrupt_intensity│ -│
│ 20│board.mb.cpu0.core[1][0]:cpu.cycles │ 2000000000│
│ 21│board.mb.cpu0.core[1][0]:cpu.disabled_reason │ HLT│
│ 22│board.mb.cpu0.core[1][0]:cpu.esteps │ 108585│
│ 23│board.mb.cpu0.core[1][0]:cpu.exec_mode.hypersim_steps │ 0│
│ 24│board.mb.cpu0.core[1][0]:cpu.load_percent │ 0%│
│ 25│board.mb.cpu0.core[1][0]:cpu.steps │ 108585│
│ 26│board.mb.cpu0.core[1][0]:cpu.time.virtual │ 00:00:01.00│
│ 27│board.mb.cpu0.core[1][0]:cpu.time.virtual_ps │1000000000000│
│ 28│board.mb.cpu0.core[1][0]:cpu.vmp.vmexits.histogram │ │
│ 29│board.mb.cpu0.core[1][0]:cpu.vmp.vmexits.total │ 0│
│ 30│board.mb.cpu0.core[1][0]:cpu.vmp.vmrets.total │ 0│
└─────┴────────────────────────────────────────────────────────────┴─────────────┘
simics> probes.read probe-kind = cpu.load_percent
┌─────┬─────────────────────────────────────────┬─────┐
│Row #│ Probe │Value│
├─────┼─────────────────────────────────────────┼─────┤
│ 1│board.mb.cpu0.core[0][0]:cpu.load_percent│ 25%│
│ 2│board.mb.cpu0.core[1][0]:cpu.load_percent│ 0%│
└─────┴─────────────────────────────────────────┴─────┘
simics> echo (probes.read probe-kind = cpu.load_percent)
[["board.mb.cpu0.core[0][0]:cpu.load_percent", "25%"], ["board.mb.cpu0.core[1][0]:cpu.load_percent", "0%"]]
simics> echo (probes.read probe-kind = cpu.load_percent -values)
[["board.mb.cpu0.core[0][0]:cpu.load_percent", 0.251324975], ["board.mb.cpu0.core[1][0]:cpu.load_percent", 5.42925e-05]]
simics> echo (probes.read probe = board.mb.cpu0.core[0][0]:cpu.load_percent -values)
0.251324975
Some probes are not active by default, typically because there could be overhead in maintaining their values. To activate a probe the probes.subscribe can be used. As long as there are at least one subscriber on a probe, it will be active, and when the number of subscribers goes down to zero, the probe becomes deactivated again.
Figure 24 shows some examples where probes first need to be subscribed in order to be read later.
simics> probes.subscribe probe-kind = sim.mips
simics> probes.subscribe probe-kind = sim.module_profile
simics> run-seconds 10
simics> probes.read probe = sim:sim.module_profile
x86-intel64.so 94 45%
x86-p4e JIT 32 15%
libsimics-common.so 19 9%
libc.so.6 16 8%
ICH10.so 8 4%
libwx_gtk2u_core-3.0.so.0.4.0 8 4%
libX11.so.6.4.0 6 3%
libpython3.7m.so.1.0 5 2%
x86_tlb.so 4 2%
libvtutils.so 4 2%
X58-devices.so 3 1%
_core.cpython-37m-x86_64-linux-gnu.so 3 1%
pcie-downstream-port.so 2 1%
siplib.cpython-37m-x86_64-linux-gnu.so 1 0%
libgdk-x11-2.0.so.0.2400.33 1 0%
libwx_baseu-3.0.so.0.4.0 1 0%
simics> probes.read probe-kind = sim.mips
┌─────┬────────────┬────────┐
│Row #│ Probe │ Value│
├─────┼────────────┼────────┤
│ 1│sim:sim.mips│608.72 M│
└─────┴────────────┴────────┘
simics> probes.read probe-kind = sim.mips -values
┌─────┬────────────┬────────────┐
│Row #│ Probe │ Value│
├─────┼────────────┼────────────┤
│ 1│sim:sim.mips│608721207.89│
└─────┴────────────┴────────────┘
simics> probes.read probe-kind = sim.mips -raw-values
┌─────┬────────────┬─────────────────────────┐
│Row #│ Probe │ Value│
├─────┼────────────┼─────────────────────────┤
│ 1│sim:sim.mips│ 7.35e+08 / 1.21e+00│
│ │ │= 6.09e+08 (608721207.89)│
└─────┴────────────┴─────────────────────────┘
Default the read command returns a string formatted in a user-readable format, according to the probe's properties. To get the actual value of the probe the -values switch can be used,
The -raw-value flag returns internal representation of advanced types. This can be useful for understanding the source-values for a calculated value.
Probe samplers are a group of tools which use sampling during the simulation, to read user-configurable probes and displays their values. This captures deviations of the probes during the simulation, compared to just looking at the end result when the simulation is finished.
Probe samplers are a group of tools which read user-configurable probes during simulation, through sampling. This captures deviations of the probes during the simulation, compared to just looking at the end result when the simulation is finished.
By default, added probes are all sampled and printed out during run-time with one row representing each sample, each column representing a particular probe.
With many probes sampled, the table can become very wide, and hard to read. To avoid this, a probe can be added with special flags:
The result of the measurements can be saved to csv or json formats. There are also plot capabilities built in the tools when connected to Simics-client.
There are three different samplers, with very similar command sets. To create one of these samplers, the new-probe-monitor, new-probe-streamer or new-system-perfmeter is used. Since the command interface for these tools are largely identical, the probe-monitor chapter explains details which are generally applicable.
The probe-monitor tool offers a way to read out and present the probe values in continuous samples, while the simulation is running.
All probes being monitored will be presented in a table row for each sample taken, allowing detection of abnormal values during the simulation.
It is possible to add lots of probes to the same probe-monitor, but as the number of probes increase, so does the width of the produced table. Therefore, it can be useful to create several probe-monitors, each showing some group of related feature.
To create a probe-monitor use the new-probe-monitor command. This will create a new object such as pm0 which has some additional commands. See figure 25 for an example.
$> ./simics qsp-x86/firststeps machine:hardware:processor:num_cores=2
simics> new-probe-monitor sampling-mode = realtime interval = 1 -summary
simics> pm0.add-probe probe-kind = sim.time.wallclock sim.time.virtual mode = session
simics> pm0.add-probe probe-kind = sim.time.schedule sim.slowdown sim.esteps sim.mips cpu.esteps cpu.time.schedule cpu.schedule_percent cpu.mips
simics> run-seconds 60
┌──────────────────────────────────────────────────────────────┬──────────────────────────────────────┬──────────────────────────────────────┐
│ │ board.mb.cpu0.core[0][0] │ board.mb.cpu0.core[1][0] │
├──────────┬──────────┬─────────┬────────┬────────────┬────────┼────────────┬─────────┬──────┬────────┼────────────┬─────────┬──────┬────────┤
│ Session │ Session │Sched (s)│Slowdown│ Esteps │ IPS │ Esteps │Sched (s)│Sched%│ IPS │ Esteps │Sched (s)│Sched%│ IPS │
│Wallclock │ Virtual- │ │ │ │ │ │ │ │ │ │ │ │ │
│(hh:mm:ss)│ Time │ │ │ │ │ │ │ │ │ │ │ │ │
│ │(hh:mm:ss)│ │ │ │ │ │ │ │ │ │ │ │ │
├──────────┼──────────┼─────────┼────────┼────────────┼────────┼────────────┼─────────┼──────┼────────┼────────────┼─────────┼──────┼────────┤
│ 00:00:01│ 00:00:01│311.92 ms│ 0.59│ 462112845│872.65 M│ 462021371│297.54 ms│ 95%│ 1.55 G│ 91474│ 14.38 ms│ 5%│ 6.36 M│
│ 00:00:02│ 00:00:04│445.62 ms│ 0.29│ 252202461│251.80 M│ 252171406│432.12 ms│ 97%│583.56 M│ 31055│ 13.50 ms│ 3%│ 2.30 M│
│ 00:00:03│ 00:00:22│999.63 ms│ 0.06│ 54925316│ 54.86 M│ 54925316│959.26 ms│ 96%│ 57.26 M│ 0│ 40.37 ms│ 4%│ 0.00 │
│ 00:00:04│ 00:00:40│995.50 ms│ 0.06│ 55920137│ 55.86 M│ 55920137│955.12 ms│ 96%│ 58.55 M│ 0│ 40.38 ms│ 4%│ 0.00 │
│ 00:00:05│ 00:00:54│997.73 ms│ 0.07│ 798812869│798.45 M│ 798792570│964.31 ms│ 97%│828.36 M│ 20299│ 33.42 ms│ 3%│607.45 k│
│ 00:00:06│ 00:00:55│998.69 ms│ 0.61│ 3001496016│ 3.00 G│ 2927954125│941.13 ms│ 94%│ 3.11 G│ 73541891│ 57.56 ms│ 6%│ 1.28 G│
│ 00:00:07│ 00:00:59│966.83 ms│ 0.33│ 548000049│547.45 M│ 184324157│491.32 ms│ 51%│375.16 M│ 363675892│475.51 ms│ 49%│764.82 M│
│ 00:00:08│ 00:00:59│994.97 ms│ 2.38│ 1178737071│ 1.18 G│ 643116292│395.46 ms│ 40%│ 1.63 G│ 535620779│599.52 ms│ 60%│893.42 M│
│ 00:00:09│ 00:01:00│998.21 ms│ 1.30│ 2418507935│ 2.42 G│ 1159903342│565.55 ms│ 57%│ 2.05 G│ 1258604593│432.66 ms│ 43%│ 2.91 G│
Here, first a probe-monitor is created, that gets the name pm0 by default. The probe-monitor samples the probes each wallclock seconds, which is controlled by the mode and interval arguments.
The -summary flag means all probe values will be displayed when the simulation stops, providing the session or current value for the probes subscribed to, described later.
Next, the pm0.add-probe is issued with two probe-kinds using the mode session. If mode is not specified, it defaults to delta meaning the value presented for the probe is the difference from the previous sample. That is, it shows the value for the sample only. With the session mode, it instead shows the total value since the probe was added to the monitor. In this case, the accumulated times, both in host wall-clock and the virtual time of the simulated system is displayed.
Apart from session and delta there is also the current mode which can be selected, which displays the plain probe value, without any adjustments. The current mode is interesting for some probes, which are not monotonically increasing, such as a temperature. It can also be interesting to be used for probes derived from checkpointed state, for example the global virtual time, when the user wants to see the absolute time.
Finally, before the execution is started we add more probes, now using the default delta mode. Here we are mixing some singleton probes sim.* and some processor specific probes cpu.*. Since there are two processors in the simulated system used in this example, the number of all monitored probes is 14.
When the simulation is started, the probe-monitor starts to print out table rows for the probes being measured, one second between each sample. Probes which have an object associated will be sorted under that object, so here probes for the two processors have an additional heading showing where the probes belong to.
Some more detailed information on each column or probe, that was monitored in this example.
Session Wallclock (hh:mm:ss) - sim.time.wallclock
This is basically the host time that has elapsed during the simulation. Note that this time stands still if Simics is not executing. If the true wallclock is desired (which increments even when Simics is not simulating), the probe host.time.wallclock can be used instead. The time here is presented as hours, minutes and second format.
Session Virtual-Time (hh:mm:ss) - sim.time.virtual
This probe returns the virtual time of the simulation. The virtual time for all processors are pretty much in sync, but there can be small differences. The probe simply selects the first processor that it finds and presents that. Similar to wall clock, and all session or current times are presented in hours, minutes and second format.
Sched (s) - sim.time.schedule
This is another aspect of time in Simics, namely how much time that Simics scheduler have requested the different processor to be scheduled in total. In a multi-threaded simulation this time can be much greater than the wallclock time, since each execution thread can run in parallel. The monitor presents any delta times with a second metric-prefix, giving much higher resolution.
Slowdown - sim.slowdown
The slowdown probes gives an measurement on how fast virtual time elapses compared to wallclock time. Any value below one means that the virtual time goes faster then the host wallclock. This provides a hint on how fast the simulation is.
A value of 0.5 means Simics simulation goes twice as fast as the simulated virtual system, while a figure of 2.0 means the simulation goes in half the speed compared to the simulated system.
Don't take this figure for any kind of exactness to the real system, sim.time.virtual depends on:
How fast Simics executes also depends on how many processors it schedules, the processor models, the type of workload, threading settings, internal caches and much more. Thus, one needs to take the slowdown figure with a grain of salt, before comparing with other sessions, or even with just with different workloads.
Esteps - sim.esteps
Steps in Simics are roughly equivalent to instructions. Some processor models however can consume steps while they are stalled. Therefore, the esteps (executed steps) metric is better suited for counting instructions, where the halt-steps have been subtracted from the steps counter. The simulator global sim.esteps is the total of all cpu.esteps in the system.
IPS - sim.mips
(M)IPS is an acronym of (Million) Instructions Per Second. This is a common measurement for looking at the how fast the simulation is. It is calculated as sim.esteps / sim.time.wallclock. Note that, depending on the simulation speed, other prefixes then M is used each sample, for example G for GIPS, or k for kIPS.
Esteps - cpu.esteps
The processor specific number of executed steps.
Sched (s) - cpu.time.schedule
The amount of time Simics scheduler has scheduled this processor.
Sched% - cpu.schedule_percent
This probe gives a percent value of how much of the time this processor has been scheduled cpu.time.schedule / sim.time.schedule This can be used to detect bottle-necks in the simulation, if one processor stands for the majority of the time.
IPS - cpu.mips
This probe might look like sim.mips but is actually a bit different. The processor specific MIPS number is calculated as: cpu.esteps / cpu.time.schedule. This means that the MIPS numbers here cannot be added together. Instead this gives an indication of how fast this particular processor executes, given the amount of time it got. This can be used to detect sub-optimal processor simulation even if the processor runs at a much lower frequency, and consequently is not scheduled as much.
When the simulation is finished, the probe-monitor shows a table of all the probes that are monitored. The table provides the current value for all probes, see figure 26 for the example output.
┌─────┬────────────┬────────────────────┬────────────────────────┬───────────────────────┐
│Row #│Display Name│ Probe-kind │ Object │Session Formatted Value│
├─────┼────────────┼────────────────────┼────────────────────────┼───────────────────────┤
│ 1│Wallclock │sim.time.wallclock │sim │ 00:00:09.09│
│ 2│Virtual-Time│sim.time.virtual │sim │ 00:01:00.00│
│ 3│Sched │sim.time.schedule │sim │ 00:00:08.27│
│ 4│Slowdown │sim.slowdown │sim │ 0.15│
│ 5│Esteps │sim.esteps │sim │ 9512224930│
│ 6│IPS │sim.mips │sim │ 1.05 G│
│ 7│Esteps │cpu.esteps │board.mb.cpu0.core[0][0]│ 6853454540│
│ 8│Sched │cpu.time.schedule │board.mb.cpu0.core[0][0]│ 00:00:06.43│
│ 9│Sched% │cpu.schedule_percent│board.mb.cpu0.core[0][0]│ 78%│
│ 10│IPS │cpu.mips │board.mb.cpu0.core[0][0]│ 1.07 G│
│ 11│Esteps │cpu.esteps │board.mb.cpu0.core[1][0]│ 2658770390│
│ 12│Sched │cpu.time.schedule │board.mb.cpu0.core[1][0]│ 00:00:01.84│
│ 13│Sched% │cpu.schedule_percent│board.mb.cpu0.core[1][0]│ 22%│
│ 14│IPS │cpu.mips │board.mb.cpu0.core[1][0]│ 1.45 G│
└─────┴────────────┴────────────────────┴────────────────────────┴───────────────────────┘
The Session Formatted Value represents the probe value formatted accordingly to the probe properties. If probes have been added with the current mode then an additional Current Formatted Value column is also displayed.
It is also possible to get the same results printed out with the pm0.summary command, where it is possible to request more floating point decimals to be presented with the float-decimals argument.
The pm0.status shows the settings of the probe-monitor, including which probes that are currently monitored. Probes can be removed with the pm0.remove-probe command and it is possible to change the sampling settings of the probe-monitor itself with the pm0.sampling-settings command.
While the probe-monitor prints out the table data while the simulation is running, all data is also saved internally. To show the entire history of all samples, the pm0.print-table can be used and the data can also be saved into a .csv with the pm0.export-table-csv command. Any data in the csv file will be unformatted, allowing easily import in a spreadsheet for further analyses.
The probe-streamer tool offers a way to read out probe values and dump the samples in a .csv, while the simulation is running.
To create a probe-streamer use the new-probe-streamer command. This will create a new object such as ps0 which has some additional commands. Most of these commands are common to the probe-monitor. See figure 27 for an example.
$> ./simics qsp-x86/firststeps machine:hardware:processor:num_cores=2
simics> new-probe-streamer mode = realtime interval = 1 csv-file-output=stream.csv
This tool replaces the old system-perfmeter tool, which had similar capabilities but more monolithic, with all measurement, calculations and output formatting part of the tool itself. Another difference is that the old system-perfmeter was a singleton object, you could not have multiple tools measuring different things.
The new-system-perfmeter extends the new-probe-monitor, with some added features making it easier to use when measuring Simics performance:
new-system-perfmeter has some handy command line switches for easily adding additional performance related probes.See figure 28 for an example.
$> ./simics qsp-x86/firststeps machine:hardware:processor:num_cores=2
simics> new-system-perfmeter -summary
Using board.mb.cpu0.core[0][0] as clock
Enabling probes
[probes info] Enabling probes (could take a while)
[probes info] Found 330 probes using 141 different probe-kinds
[probes info] Additional probe-related command now exists under the 'probes' singleton object
[sp0 info] Added: sim:sim.time.virtual with mode session
[sp0 info] Added: sim:sim.time.wallclock with mode session
[sp0 info] Added: sim:sim.time.virtual with mode delta
[sp0 info] Added: sim:sim.time.wallclock with mode delta
[sp0 info] Added: sim:sim.slowdown with mode delta
[sp0 info] Added: sim:sim.process.cpu_percent with mode delta
[sp0 info] Added: sim:sim.load_percent with mode delta
Created sp0
simics> run-seconds 20
┌──────────┬──────────┬─────────┬─────────┬────────┬────┬────┐
│ Session │ Session │Virtual- │Wallclock│Slowdown│Host│Sim │
│ Virtual- │Wallclock │Time (s) │ (s) │ │CPU%│Load│
│ Time │(hh:mm:ss)│ │ │ │ │ % │
│(hh:mm:ss)│ │ │ │ │ │ │
├──────────┼──────────┼─────────┼─────────┼────────┼────┼────┤
│ 00:00:00│ 00:00:00│479.60 ms│215.28 ms│ 0.45│118%│ 22%│
│ 00:00:02│ 00:00:01│ 1.91 s │ 1.00 s │ 0.52│ 57%│ 3%│
│ 00:00:19│ 00:00:02│ 16.47 s │999.54 ms│ 0.06│114%│ 0%│
┌─────┬────────────┬───────────────────────┬──────┬───────────────────────┐
│Row #│Display Name│ Probe-kind │Object│Session Formatted Value│
├─────┼────────────┼───────────────────────┼──────┼───────────────────────┤
│ 1│Virtual-Time│sim.time.virtual │sim │ 00:00:30.00│
│ 2│Wallclock │sim.time.wallclock │sim │ 00:00:02.83│
│ 3│Slowdown │sim.slowdown │sim │ 0.09│
│ 4│Host CPU% │sim.process.cpu_percent│sim │ 93%│
│ 5│Sim Load% │sim.load_percent │sim │ 1%│
└─────┴────────────┴───────────────────────┴──────┴───────────────────────┘
simics> quit
$> ./simics qsp-x86/firststeps machine:hardware:processor:num_cores=2
simics> new-system-perfmeter -summary -cpu-exec-modes
Using board.mb.cpu0.core[0][0] as clock
Enabling probes
[probes info] Enabling probes (could take a while)
[probes info] Found 330 probes using 141 different probe-kinds
[probes info] Additional probe-related command now exists under the 'probes' singleton object
[sp0 info] Added: sim:sim.time.virtual with mode session
[sp0 info] Added: sim:sim.time.wallclock with mode session
[sp0 info] Added: sim:sim.time.virtual with mode delta
[sp0 info] Added: sim:sim.time.wallclock with mode delta
[sp0 info] Added: sim:sim.slowdown with mode delta
[sp0 info] Added: sim:sim.process.cpu_percent with mode delta
[sp0 info] Added: sim:sim.load_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[0][0]:cpu.exec_mode.hypersim_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[1][0]:cpu.exec_mode.hypersim_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[0][0]:cpu.exec_mode.vmp_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[1][0]:cpu.exec_mode.vmp_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[0][0]:cpu.exec_mode.jit_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[1][0]:cpu.exec_mode.jit_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[0][0]:cpu.exec_mode.interpreter_percent with mode delta
[sp0 info] Added: board.mb.cpu0.core[1][0]:cpu.exec_mode.interpreter_percent with mode delta
Created sp0
simics> run-seconds 30
┌────────────────────────────────────────────────────────────┬───────────────────┬───────────────────┐
│ │ board.mb.cpu0. │ board.mb.cpu0. │
│ │ core[0][0] │ core[1][0] │
├──────────┬──────────┬─────────┬─────────┬────────┬────┬────┼────┬────┬────┬────┼────┬────┬────┬────┤
│ Session │ Session │Virtual- │Wallclock│Slowdown│Host│Sim │HYP%│VMP%│JIT%│INT%│HYP%│VMP%│JIT%│INT%│
│ Virtual- │Wallclock │Time (s) │ (s) │ │CPU%│Load│ │ │ │ │ │ │ │ │
│ Time │(hh:mm:ss)│ │ │ │ │ % │ │ │ │ │ │ │ │ │
│(hh:mm:ss)│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├──────────┼──────────┼─────────┼─────────┼────────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ 00:00:01│ 00:00:00│508.60 ms│390.61 ms│ 0.77│ 71%│ 21%│ 0%│100%│ 0%│ 0%│ 0%│ 63%│ 4%│ 33%│
│ 00:00:03│ 00:00:01│ 2.36 s │ 1.00 s │ 0.42│ 71%│ 3%│ 0%│ 99%│ 1%│ 0%│ 0%│ 40%│ 25%│ 35%│
│ 00:00:21│ 00:00:02│ 17.71 s │ 1.00 s │ 0.06│113%│ 0%│ 0%│ 98%│ 1%│ 1%│- │- │- │- │
┌─────┬────────────┬─────────────────────────────────┬────────────────────────┬───────────────────────┐
│Row #│Display Name│ Probe-kind │ Object │Session Formatted Value│
├─────┼────────────┼─────────────────────────────────┼────────────────────────┼───────────────────────┤
│ 1│Virtual-Time│sim.time.virtual │sim │ 00:00:30.00│
│ 2│Wallclock │sim.time.wallclock │sim │ 00:00:02.92│
│ 3│Slowdown │sim.slowdown │sim │ 0.10│
│ 4│Host CPU% │sim.process.cpu_percent │sim │ 92%│
│ 5│Sim Load% │sim.load_percent │sim │ 1%│
│ 6│HYP% │cpu.exec_mode.hypersim_percent │board.mb.cpu0.core[0][0]│ 0%│
│ 7│VMP% │cpu.exec_mode.vmp_percent │board.mb.cpu0.core[0][0]│ 99%│
│ 8│JIT% │cpu.exec_mode.jit_percent │board.mb.cpu0.core[0][0]│ 0%│
│ 9│INT% │cpu.exec_mode.interpreter_percent│board.mb.cpu0.core[0][0]│ 0%│
│ 10│HYP% │cpu.exec_mode.hypersim_percent │board.mb.cpu0.core[1][0]│ 0%│
│ 11│VMP% │cpu.exec_mode.vmp_percent │board.mb.cpu0.core[1][0]│ 52%│
│ 12│JIT% │cpu.exec_mode.jit_percent │board.mb.cpu0.core[1][0]│ 14%│
│ 13│INT% │cpu.exec_mode.interpreter_percent│board.mb.cpu0.core[1][0]│ 34%│
└─────┴────────────┴─────────────────────────────────┴────────────────────────┴───────────────────────┘
In the first run, only the default probes are used. The -summary switch automatically prints the value of the collected probes when Simics stops. In the second run, the -cpu-exec-modes is added, causing 8 additional probes to be monitored.