Options - Options - 57368

uProf User Guide

Document ID
57368
Release Date
2025-06-09
Revision
5.1 English

Following table lists the profile commands

Table 1. AMDuProfCLI profile Command Options
Option Description
-h| --help Displays the help information on the console/terminal.

-o| --output-dir <directory-path>

Base directory path in which the collected data files will be saved. A new sub- directory will be created in this directory.
--config <config>

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>

A predefined event can 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>
  • mask=<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. 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. Providing umask with predefined event is not required.
  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 – Don’t filter out any IBS OP samples (0), or filter out all IBS OP samples except loads/stores that miss in the L3 cache (1).
  • ibsfetch-l3miss – Don’t filter out any IBS FETCH samples (0), or filter out all IBS FETCH samples except loads/stores that miss in the L3 cache (1).
When these arguments are not passed, then the default values are:
  • umask=0
  • cmask=0x0
  • user=1
  • os=1
  • Op-count-control=1
  • Ibsop-l3miss=0
  • Ibsfetch-l3miss=0
-p | --pid <PID...>

Profile the existing processes by attaching to a running process. The process IDs are separated by comma.

Note: A maximum of 512 processes can be attached at a time.
-a| --system-wide

System Wide Profile (SWP)

If this flag is not set, the command line tool will profile only the launched application or the Process IDs attached with -p option.

-c| --cpu <core...>

Comma separated list of CPUs to profile. The ranges of CPUs can be specified with ‘-’, for example, 0-3. This option is not supported with MPI profiling.

Note: On Windows, the selected cores should belong to only one processor group. For example, 0-63, 64-127, and so on.
-d| --duration <n> Profile only for the specified duration ‘n’ in seconds.
--interval <num>

Sampling interval for the PMC events.

Note: This interval will override the sampling interval specified with individual events.
--affinity <core-id...>
Set the core affinity of the launched application to be profiled. Comma separated list of core-ids. The ranges of the core-ids must be specified, for example, 0-3. The default affinity is all the available cores. This option is not supported while profiling MPI applications.
--no-inherit Do not profile the children of the launched application (processes launched by the profiled application).
-b| --terminate Terminate the launched application after the profile data collection ends. Only the launched application process will be killed. Its children (if any) may continue to execute.

--thread <thread=concurrency>

Collect the thread run time info to report thread concurrency. Thread concurrency provides how much time specific no of threads are running simultaneously.
--start-delay <n> Start delay n in seconds. Start profiling after the specified duration. When ‘n’ is 0, there is no impact.
--start-paused

Profiling paused indefinitely. The target application resumes the profiling using the profile control APIs. This option must be used only when the launched application is instrumented to control the profile data collection using the resume and pause APIs (see AMDPowerProfileAPI Library for definitions).

-w| --working-dir <path>

Specify the working directory. The default is the current working directory.
--log-path <path-to- logdir>

Specify the path where the log file should be created. If this option is not provided, the log file will be created either in path set by AMDUPROF_LOGDIR environment variable or $TEMP path (Linux, FreeBSD) or %TEMP% path (on Windows) by default.

The log file name will be of the format $USER-AMDuProfCLI.log (on Linux,FreeBSD) or %USERNAME%-AMDuProfCLI.log (on Windows).

--enable-log Enable additional logging with log file.
--enable-logts

Capture the timestamp of the log records. It should be used with --enable-log option

--limit-size <n> Use this option to stop the profiling once the collected data file size (in MBs) crosses the limit. This option will be deprecated in future releases.
--frequency <n> | -- freq <n> | -F <n>

Enable data collection at the specified frequency 'n' (in Hz) for Core PMC events.

Note: This frequency will override the sampling frequency specified with individual events.
--detail Generate detailed report.
--group-by <section>

Specify the report to be generated. The supported report options are:

  • process: Report process details
  • module: Report module details
  • thread: Report thread details

This option is applicable only with the --detail option. The default is group-by process.

--cutoff <n> Cut-off to limit the number of process, threads, modules, and functions to be reported. ‘n’ is the minimum number of entries to be reported in various report sections. The default value is 10.
Note: --cutoff 0 will report all the data.
--view <view-config>

Report only the events present in the given view file. Use the command info --list view-configs to get the list of supported view-configs.

--inline

Show inline functions for C, C++ executables.

Note:
  • This option is not supported on Windows.
  • Using this option will increase the time taken to generate the report.
--show-sys-src Generate detailed function report of the system module functions (if debug info is available) with the source statements. This option only works with --detail option.

--src-path <path1;...>

Source file directories (semicolon separated paths). Multiple use of --src-path is allowed.

--disasm Report only the assembly instructions having samples. This option only works with the --detail option.
--disasm-only Generate the function report with only assembly instructions.
--disasm-full Report all the assembly instructions of a function with and without samples. This option only works with the --detail option.

--disasm-style <att |intel>

Choose the syntax of assembly instructions. Supported options are att or intel. If this option is not used, the default style used is intel.

-s| --sort-by <EVENT>

Specify the Timer, PMC, or IBS event on which the reported profile data will be sorted with arguments in the form of comma separated key=value pairs. The supported keys are:

  • event=<timer| ibs-fetch | ibs-op | pmcxNNN>, where NNN is hexadecimal Core PMC event id.
  • umask=<unit-mask>
  • cmask=<count-mask>
  • inv=<0 | 1>
  • user=<0 | 1>
  • os=<0 | 1>
  • metric=<cpu_time | total_cpu_time | self_time | total_time>

If both event and metric are enabled, event will take priority over metric.

Use the command info--list pmu-events for the list of supported PMC events.

Argument details are:

  • umask: Unit mask in decimal or hexadecimal, applicable only to the PMC events.
  • cmask: Count mask in decimal or hexadecimal, applicable only to the PMC events.
  • user, os: User and OS mode. Applicable only to the PMC events.
  • inv: Invert Count Mask, applicable only to the PMC events.
  • metric:
    • cpu_time is applicable only if CPU_TIME event is collected.
    • total_cpu_time is applicable only with hotspots (or) threading analysis, if callstack collection (-g) is enabled for dynamically linked launch application.
    • self_time and total_time are applicable only if function tracing is collected.
  • Multiple occurrences of --sort-by(-s) are not allowed.

--agg-interval <low | medium | high | INTERVAL>

Use this option to configure the sample aggregation interval which is useful when the session gets imported to GUI.

low level of aggregation interval generates better timeline view in GUI, but increases the database size.

Aggregation INTERVAL can also be specified as numeric value in milliseconds.

--time-filter <T1:T2>

Restricts report generation to the time interval between T1 and T2. Where, T1 and T2 are time in seconds from profile start time.
--imix Report Instruction Mix (only for native binaries). Default is module-wise IMIX.
--imix-group-by <module | thread | function>

IMIX report generation. Supported group-by options are:

  • module: Report module-wise IMIX.
  • thread: Report thread-wise IMIX.
  • function: Report function-wise IMIX.
--ignore-system-module Ignore samples from system modules.
--show-percentage Show percentage of samples instead of actual samples.
--show-sample-count Show the number of samples. This option is enabled by default.
--show-event-count Show the number of events occurred.
--show-all-cachelines

Show all cachelines in report sections for cache analysis. By default, only cachelines accessed by more than one process/thread are listed. Use this option for false cache sharing analysis.

--limit-cacheinfo <n> Show the shared cachelines accessed by more than one process/thread for cache analysis. Set 'n' to the number of shared cacheline addresses to be reported. Use this option for false cache sharing analysis.
--bin-path <path> Binaryfile path, multiple usage of --bin-path is allowed.
--src-path <path> Source file path, multiple usage of --src-path is allowed.

--symbol-path

<path1;...>

Debug Symbol paths (semicolon separated). Multiple use of --symbol-path is allowed.

--report-output <path>

Write a report to a file. If the path has a .csv extension, it is assumed to be a file path and used as it is. If the .csv extension is not used, the path is assumed to be a directory and the report file is generated in the directory with the default name.
--stdout Print the report to a console or terminal.
--retranslate Perform the re-translation of collected data files with a different set of translation options.
--asciievent-dump

Use this option to generate ASCII dump of IBS OP profile samples.

Tip: This option might delay the translation.
--no-report Use this option to perform only collection and translation.
--remove-raw-files Removes the raw data files to reclaim the disk space.
--python-show-all Use this option to show python interpreter functions in the callgraph/flamegraph when translation is performed on python profiled data (on Linux).
--export-session Use this option to create a compressed archive of required session files which can be used in other system for analysis.
--env-var <key1=value1:key2=value2:...> Use this option to set the environment variables.

--call-graph <I:D:S:F>

OS Support: Windows

Enables Callstack Sampling. Specify the Unwind Interval (I) in milliseconds and Unwind Depth (D) value. Specify the Scope (S) by choosing one of the following:

  • user: Collect only for the user space code.
  • kernel: Collect only for the kernel space code.
  • all: Collect for the code executed in the user and kernel space code. Specify to collect missing frames due to Frame Pointer Omission (F) by compiler:
  • fpo: If frame pointers are not available, collect callstack information using unwind information.
  • fp: Use frame pointers to collect callstack information.
--call-graph <F:N> OS Support: Linux

Enables callstack sampling. Specify (F) to collect/ignore missing frames due to omission of frame pointers by compiler:

  • fpo | dwarf: Collect process call stack during sample collection and use DWARF information to reconstruct the call stack.
  • fp: Use Frame pointers to collect call stack information.

When F = fpo, (N) specifies the max stack-size in bytes to collect per sample collection. Valid range of the stack size: 16 - 32768. If (N) is not a multiple of 8, then it is aligned down to the nearest value multiple of 8. The default value is 1024 bytes.

Note: Passing a large N value will generate a very large raw data file.

When F= fp, the value for N is ignored and hence, there is no need to pass it.

-g OS Support: Windows | Linux

Same as passing --call-graph 1:128:user:fp (Windows)

Same as passing --call-graph fp (Linux)

--call-graph-mode <mode> OS Support: Windows

Set callstack collection mode.

  • fpo - If frame pointers are not available, collect call-stack information using unwind information.
  • fp - Use Frame pointers to collect callstack information.

Default mode is fp.

--call-graph-mode <fp|fpo| dwarf> OS Support: Linux

Callstack collection mode. Default mode is fp.

  • fp: Use Frame pointers to collect call stack information.
  • fpo | dwarf: Collect process call stack during sample collection and use DWARF information to reconstruct the call stack.
--call-graph-type <scope type> OS Support: Windows

Set callstack scope type.

Scope type should contain one of these options:

  • user - Collect only for user space code.
  • kernel - Collect only for kernel space code.
  • all - Collect for code executed in user and kernel space.

Default scope type is user.

--call-graph-interval <num> OS Support: Windows

Set callstack unwind interval. Interval must be within the range [1 - 100].

Default interval is 1 ms.

--call-graph-depth <num> OS Support: Windows

Set callstack unwind depth. Depth must be within the range [2 - 392].

Default depth is 128.

--call-graph-depth <num> OS Support: Linux

Set callstack unwind depth. Depth must be within the range [2 - 1024].

Default depth is 32. This option is applicable for Hotspots and Threading configurations, for any other configurations this option will be ignored.

--call-graph-size <size> OS Support: Linux

Callstack Size. Default size is 1024 bytes.

When mode = fpo | dwarf; size must be within [16 - 32768] and specifies the max stack-size (in bytes) to collect per call stack sample.

When mode = fp; the size is ignored, hence no need to pass it.

--thread <thread=concurrency> OS Support: Windows

Collects the runtime thread details.

--tid <TID,..> OS Support: Linux

Profile existing threads by attaching to a running thread. The thread IDs are separated by comma.

-m| --data-buffer-count <size> OS Support: Windows

Size (number of pages per core) of the buffer used for data collection by the driver. The default size is 512 pages per core.

--symbol-server <path1;...> OS Support: Windows

Symbol Server directories (semicolon separated paths). For example, Microsoft Symbol Server. Multiple use of --symbol-server is allowed.

--symbol-cache-dir <path> OS Support: Windows

The path to store the symbol files downloaded from the Symbol Servers.

--legacy-symbol-downloader OS Support: Windows

Use this option to download symbols using the Microsoft Symsrv. By default, AMD symbol downloader will be used to download symbols.

--limit-data <n> OS Support: Windows

Use this option to stop the profiling once the collected data file size (in MBs) crosses the limit. When used with the --overwrite option, the limit is before the collection is terminated. Size can be specified with a suffix Mega bytes (M/ m), Giga Bytes (G/g), and Seconds (secs).

--overwrite OS Support: Windows

Specify the profile-data collection mode as a ring buffer. Collection limit can be set using --limit-data option. Default --limit-data is to restrict the raw data file size to 512 pages per core.

--trace <TARGET> OS Support: Linux

To trace a target domain. TARGET can be one or more of the following:

  • osrt - to enable tracing of os runtime. Use command info --list trace-events for the list of trace events.
  • func - to enable tracing of functions. Use --func, --func-size and --func-threshold to configure additional options.
  • memory - to enable tracing of dynamic memory allocations. Use --memory-threshold to configure threshold.
  • openmp - to enable tracing of OpenMP application. Use --openmp-impl and --openmp-scope to configure additional options.
Note:
  • Applicable to per process and attach process profiling. Not applicable to:
    • System wide profiling
    • Java app profiling
  • For ompt - application should be compiled with LLVM-8 or later, AOCC-2.1 or later, ICC-19.1 or later.
  • For omplib - application should be compiled with GCC-7 or later. Supported base languages are: C, C++, Fortran.
  • gpu - To trace a target application on GPU. By default, the domain is set to hip and hsa .
--openmp-impl <ompt| omplib> OS Support: Linux

Provide OpenMP implementation type:

  • ompt for tracing of OpenMP libraries supporting OMPT interface (example: LLVM, AOCC),
  • omplib for tracing GCC OpenMP library.
Default selection is ompt.
Note: Use this option with --trace openmp option.
--openmp-scope <full| basic> OS Support: Linux

Provide tracing scope: full for complete tracing, basic for basic tracing, where synchronization related OpenMP events are not traced to reduce the disk space usage. Default selection is basic.

Note: Use this option with --trace openmp option

This option is only applicable with --openmp-impl ompt.

--osrt-event <event1,event2...> OS Support: Linux

Provide event names. Use command info --list trace-events for the list of trace events.

Note: Use this option with --trace osrt option.
--osrt-threshold <event:threshold> OS Support: Linux

Provide event name and threshold value.

Note: Use this option with --trace osrt option.
--osrt-funcs <module:function-pattern> OS Support: Linux

Specify functions to trace from the library or executable.

  • Function-pattern can be a function name or partial name ending with '*'. Use only '*' to trace all the functions of a module.
  • Module can be absolute path to library or executable. This option will be deprecated in a future release.
  • Recommended to use --func.
--osrt-exclude-funcs <module:function-pattern> OS Support: Linux

Specify functions to exclude from the library or executable.

  • Function-pattern can be a function name or partial name ending with '*'. Use only '*' to trace all the functions of a module.
  • Module can be absolute path to library or executable. This option will be deprecated in a future release.
  • Recommended to use --exclude-func.
--osrt-func-size <size> OS Support: Linux

Provide minimum function size to trace. Default function size is 128 bytes.

This option will be deprecated in a future release. Recommended to use --func-size.

Note: Use this option with --trace osrt option.
--func <module:function- pattern> OS Support: Linux

Specify functions to trace from the library, executable, or kernel: function- pattern can be a function name or partial name ending with '*' or only '*' to trace all the functions of a module.

Module can be a library or executable. To trace the kernel functions, replace the module with ‘kernel’.

Note: It is recommended to provide the absolute/full path of a module.
--exclude-func <module:function-pattern> OS Support: Linux

Specify functions to exclude from the library, executable, or kernel:

  • function-pattern can be a function name or partial name ending with '*' or only '*' to trace all the functions of a module.
  • Module can be a library or executable. To trace the kernel functions, replace the module with ‘kernel’.
Note: It is recommended to provide the absolute path of a module
-m| --mmap-pages <size> OS Support: Linux

Set the kernel memory mapped data buffer to size. The size can be specified in pages or with a suffix Bytes (B/b), Kilo bytes (K/k), Megabytes (M/m), and Gigabytes (G/g).

--kvm-guest <pid> OS Support: Linux

Specify the PID of qemu-kvm process to be profiled to collect guest-side performance profile.

--guest-kallsyms <path> OS Support: Linux

Specify the path of guest /proc/kallsyms copied on the local host. AMD uProf reads it to get the guest kernel symbols.

--guest-modules <path> OS Support: Linux

Specify the path of guest/proc/modules copied to the local host. AMD uProf reads it to get the guest kernel module information.

--guest-search-path <path> OS Support: Linux

Specify the path of guest vmlinux and kernel sources copied on the local host. AMD uProf reads it to resolve the guest kernel module information.

--host <hostname> OS Support: Linux

This option is used along with the --input-dir option. Generates report belonging to a specific host. The supported options are:

  • <hostname>: Report process belonging to a specific host.
  • all: Report all the processes.
Note: If --host is not used, only the processes belonging to the system from which report is generated is reported. In case, the system is a master node in a cluster, the report will be generated for the lexicographically first host in that cluster.
--category <PROFILE> OS Support: Linux

Generate report only for specific profiling category. Comma separated multiple categories can be specified. If this option is not used, the report for all categories is generated. Multiple instances of --category is allowed.

Supported categories are:
  • cpu: Generate a report specific to CPU Profiling.
  • mpi: Generate a report specific to MPI Tracing.
  • openmp: Generate a report specific to OpenMP Tracing.
  • trace: Generate a report specific to trace events. [os] deprecated.
  • gputrace: Generate a report specific to GPU Tracing.
  • gpuprof: Generate a report specific to GPU Profiling.

Example:

  • --category cpu, mpi, trace, gputrace, gpuprof
  • --category mpi --category cpu --category trace --category gputrace
  • --category gpuprof
--funccount-interval <funccount-interval> OS Support: Linux

Specify the time interval in seconds to list the function count detail report. If this option is not specified, function count will be generated for the entire profile duration.

--branch-filter OS Support: Linux

Use this option to capture LBR data. Specify the branch filter type:

  • u: user branches
  • k: kernel branches
  • any: any branch type
  • any_call: any call branch
  • any_ret: any return branch
  • ind_call: indirect calls
  • ind_jmp: indirect jumps
  • cond: conditional branches
  • call: direct calls

When the above filters are not set, the default filter type will be any.

Note:
  • When the above filters not set, the default filter type will be any.
  • This option will work only with the PMC events.
  • This is applicable to per process and attach process profiling. However, it is not applicable to Java app profiling.
--vmlinux-path <path> OS Support: Linux

Path to the Linux kernel debug info file. If no path provided, it searches for the debug info file in the default download path.