Starting a CPU Profile - Starting a CPU Profile - 57368

uProf User Guide

Document_ID
57368
Release_Date
2025-06-09
Revision
5.1 English

To profile and analyze the performance of a native (C, C++, and Fortran) application, you must complete the following steps:

  1. Prepare the application. See Preparing an Application for Profiling.
  2. Use AMDuProfCLI collect command to collect the samples for the application.
    Note: Run AMD uProf on FreeBSD with sudo command or root privilege.
  3. Using AMDuProfCLI report command to generate a report in readable format for analysis.

Preparing the application is to build the launch application with debug information as it is needed to correlate the samples to functions and source lines.

The collect command launches the application (if given) and collects the profile data for the given profile type and sampling configuration. It generates the raw data file (.prd on Windows, .pdata on FreeBSD, and .caperf on Linux) and other miscellaneous files.

The report command translates the collected raw profile data to aggregate and attribute to the respective processes, threads, load modules, functions, and instructions. Also, it writes them into a database and then generates a report in the CSV file format.

The following figure shows how to run a time-based profile and generate a report for the application AMDTClassicMatMul.exe.

Figure 1. Collect and Report Commands