Cache Analysis Using CLI - Cache Analysis Using CLI - 57368

uProf User Guide

Document_ID
57368
Release_Date
2025-06-09
Revision
5.1 English

The CLI has a config type called “memory” to cache the analysis data. Run the following command to collect the profile data:

$ AMDuProfCLI collect --config memory -o /tmp/cache_analysis <target app>

This command will launch the program and collect the profile data required to generate the cache analysis report. The raw profile data file is created in /tmp/cache_analysis/AMDuProf- IBS_<timestamp>/ directory.

Report Generation and Analysis

Use the following CLI command to generate the cache analysis report.
$ AMDuProfCLI report -i /tmp/cache_analysis/AMDuProf-IBS_<timestamp>/

This will generate a CSV report in /tmp/cache_analysis/AMDuProf- IBS_<timestamp>/report.csv and it will have the following sections.

  • SHARED DATA CACHELINE SUMMARY: Lists the summary values of all the metrics.
  • SHARED DATA CACHELINE REPORT: Lists the cache lines and the associated summary values of the metrics.
  • SHARED DATA CACHELINE DETAIL REPORT: Lists the following.
    • The cache lines having a potential false sharing
    • Offsets where those accesses occur, readers and writers to those offsets
    • PID, TID, Function Name, Source File, and Line Number for those reader and writers
    • Load latency for the loads to those cache lines
    • Supported metrics

The following figure shows the Cache Analysis summary sections.

Figure 1. Cache Analysis - Summary Sections

The following figure shows the Cache Analysis detailed report

Figure 2. Cache Analysis - Detailed Report
Use any of the following metric with the
--sort-by event=<METRIC>

option (for example, --sort-by event=ldst-count) to change the sorting by order during the report generation.

Table 1. Sort-by Metric
Sort-by Metric Description
ldst-count Total Loads and stores sampled
ld-count Total Loads
st-count Total Stores
cache-hitm Loads that were serviced either from the local or remote cache (L3) and the cache hit state was Modified.
lcl-cache-hitm Loads that were serviced from the local cache (L3) and the cache hit state was Modified.
rmt-cache-hitm Loads that were serviced from the remote cache (L3) and the cache hit state was Modified.
lcl-dram-hit Loads that hit in local memory (memory channels attached to local socket or local CCD).
rmt-dram-hit Loads that hit in remote memory (memory channels attached to remote socket or other CCDs in the local socket).
l3-miss Loads that are missed in local cache (L3) and serviced by remote cache, local, or remote DRAM.
st-dc-miss Store operations missed in data cache.
Note: You can also use the command info --list cacheline-events for a list of supported metrics for sort-by option.