Data Collection Using CLI - Data Collection Using CLI - 57368

uProf User Guide

Document ID
57368
Release Date
2025-06-09
Revision
5.1 English
  • Threading collection
    AMDuProfCLI collect --config threading -o <output-dir> <application>
  • Threading with callstack collection
    AMDuProfCLI collect --config threading -g -o <output-dir> <application>
  • Threading with timer interval of 100 msec
    AMDuProfCLI collect --config threading --timer-interval 100 -o <output-dir> <application>
  • Threading with profiling signal as SIGRTMIN
    AMDuProfCLI collect --config threading --profiling-signal 34 -o <output-dir> <application>
  • Threading with callstack collection for GCC compiled OpenMP application
    AMDuProfCLI collect --config threading -g --openmp-impl omplib -o <output-dir> <application>
  • Threading with callstack collection and unwind depth as 128
    AMDuProfCLI collect --config threading -g --call-graph-depth 128 -o <output-dir> <application>
  • Threading with pthread APIs threshold of 1000000 nsec
    AMDuProfCLI collect --config threading --osrt-threshold pthread:1000000 -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 1 for all supported options.

Example

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

Here, the generated session directory is /tmp/AMDuProf-ScimarkStable-Threading_Sep-05-2024_21-48-42.

System Call Tracing

By default, Threading analysis traces sleep and wait system calls. Configure system call tracing with threading analysis to trace all supported system calls which includes IO system calls, blocking system calls.

CLI command to collect the system call trace data with threading analysis.
AMDuProfCLI collect --config threading --trace osrt --osrt-event syscall -o <output-dir> <application>

Options

Table 1. Threading Analysis options
CLI option GUI option Description
--timer-interval <interval> Predefined Configs > Threading Analysis > Timer Interval Provide per thread OS timer interval in msec. Default timer interval is 10 ms.
--profiling-signal <signal> Predefined Configs > Threading Analysis > Profiling Signal If application has signal handler for SIGPROF, then use this option to provide unused signal from SIGRTMIN to SIGRTMAX.
--openmp-impl <impl> Predefined Configs > Threading Analysis > Advanced Options > Select OpenMP Implementation Provide the OpenMP implementation type to stitch the call path of worker threads with master thread. ompt for tracing of OpenMP libraries supporting OMPT interface (example: LLVM, AOCC), omplib for tracing GCC OpenMP library. ompt is the default selection.
--call-graph-depth <depth> Predefined Configs > Threading Analysis > Advanced Options > Call Stack Unwind Depth Provide the depth of stack frames to be collected. By default, 32 frames will be collected; if the application has a greater number of frames in a calling sequence, increase the unwind depth up to 1024.
--osrt-threshold <event:threshold> Predefined Configs > Threading Analysis Provide event name and threshold value.
Note: Use this option with --trace osrt option.