Data Collection Using CLI - Data Collection Using CLI - 57368

uProf User Guide

Document ID
57368
Release Date
2025-06-09
Revision
5.1 English
  • Event based collection using Assess config
    AMDuProfCLI collect --config assess -o <output-dir> <application>
  • Event based collection using Investigate Branch config with callstack
    AMDuProfCLI collect --config branch -g -o <output-dir> <application>
  • Event based collection using individual predefined events
    AMDuProfCLI collect -e cycles-not-in-halt -e retired-inst -o <output-dir> <application>
  • Event based collection using individual hardware event IDs
    AMDuProfCLI collect -e event=pmcx76,interval=250000 -e event=pmcxc0,user=1,os=0,interval=250000 -o <output-dir> <application>

Once profile data collection completes, session directory will be generated. Use session directory to generate the csv report (or) to import the session in GUI.

Refer Table 1for all supported options.

Example

[amd@uprof-ethanolx5 bin]$ ./AMDuProfCLI collect --config assess-g -o /tmp/ /tmp/ScimarkStable
Profiling started
………
Profiling (data collection) completed
Generated data files path: /tmp/AMDuProf-ScimarkStable-EBP_Sep-05-2024_21-43-08

Here, the generated session directory is /tmp/AMDuProf-ScimarkStable-EBP_Sep-05-2024_21-43-08.

Options

Table 1. Microarchitecture Analysis Options
CLI option GUI option Description
--config <config> Predefined Configs Predefined sampling configuration to be used to collect samples. Use the command info --list collect-configs to get the list of supported configs. Multiple occurrences of --config are allowed.
-e | --event or <predefined-event> Predefined Configs > Custom Configs

A predefined event can be directly be used with -e, --event which has predefined arguments. Alternatively, for providing more granular parameters, specify Timer, PMU, IBS event, or a predefined event with arguments in the form of comma separated key=value pairs. The supported keys are:

  • event=<timer | ibs-fetch | ibs-op> or <PMU-event> or <predefined-event>
  • umask=<unit-mask>
  • user=<0 | 1>
  • os=<0 | 1>
  • cmask=<count-mask> (value should be in the range 0x0 to 0x7f)
  • inv=<0 | 1>
  • interval=<sampling-interval>
  • frequency=<frequency (n)> (supported only for Core PMC events, the frequency should be provided in Hz)
  • ibsop-count-control=<0 | 1> (for ibs-op event)
  • loadstore (for ibs-op event, only on Windows platform)
  • ibsop-l3miss (for IBS OP event, supported only on AMD “Zen4” processors)
  • ibsfetch-l3miss (for IBS FETCH event, supported only on AMD “Zen4” processors)
  • call-graph
Note:
  1. It is not required to provide umask with predefined event.
  2. Use the dedicated option --call-graph to specify the arguments related to the call stack sample collection. Argument details:
  • user – Enable (1) or disable (0) user space samples collection.
  • os - Enable (1) or disable (0) kernel space samples collection.
  • interval – Sample collection interval.
    • For timer, it is the time interval in milliseconds.
    • For PMU and predefined events, it is the count of the event occurrences.
    • For IBS FETCH, it is the fetch count.
    • For IBS OP, it is the cycle count or the dispatch count.
  • op-count-control – Choose IBS OP sampling by cycle(0) count or dispatch(1) count.
  • loadstore – Enable only the IBS OP load/store samples collection, other IBS OP samples are not collected.
  • ibsop-l3miss – Enable IBS OP sample collection only when a l3 miss occurs. For example: -e event=ibs-op,interval=100000,ibsop-l3miss
  • ibsfetch-l3miss – Enable IBS FETCH sample collection only when a l3 miss occurs. For example: -e event=ibs-fetch,interval=100000,ibsfetchl3miss
When these arguments are not passed, the default values are:
  • umask=0
  • cmask=0x0
  • user=1
  • os=1
  • inv=0
  • ibsop-count-control=0 (for ibs-op event)
  • interval=1.0 ms for timer event
  • interval=250000 for ibs-fetch, ibs-op, pmu-event, or predefined-event
Use the following commands as required:
  • info --list predefined-events for the list of supported predefined events
  • info --list pmu-events for the list of supported PMU-events. Multiple occurrences of --event (-e) are allowed.