From 7af2dba741cb6604335055830cfce7e89b1236a3 Mon Sep 17 00:00:00 2001 From: marantic-amd Date: Fri, 23 Jan 2026 06:36:08 +0100 Subject: [PATCH] [rocprof-sys] Align rocpd symbols of the same counter types (#2675) ## Motivation In order for Optiq to be able to detect that counter tracks are of the same type, we aligned `info_pmc` symbol naming across the tracks of the same type. Being able to know this will be useful for grouping and categorizing similar types of counter tracks and for setting up a consistent y-axis scale when plotting the values on charts. ## Technical Details Replace unique and/or ordered symbol names with counter-common symbol name which will be the same for the counters of the same type, with counter track name remaining the unique identifier for that counter track. For example, the "symbol" field was "JpegAct_0" but is now "JpegAct". --- projects/rocprofiler-systems/CHANGELOG.md | 6 ++++++ .../lib/rocprof-sys/library/amd_smi.cpp | 20 ++++--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/projects/rocprofiler-systems/CHANGELOG.md b/projects/rocprofiler-systems/CHANGELOG.md index a2cfaeb620..f4c02ecda9 100644 --- a/projects/rocprofiler-systems/CHANGELOG.md +++ b/projects/rocprofiler-systems/CHANGELOG.md @@ -4,6 +4,12 @@ Full documentation for ROCm Systems Profiler is available at [https://rocm.docs.amd.com/projects/rocprofiler-systems/en/latest/](https://rocm.docs.amd.com/projects/rocprofiler-systems/en/latest/). +## ROCm Systems Profiler 1.5.0 for ROCm x.y.z (unreleased) + +### Changed + +- Simplify categorizing like pmc_info events by removing the _ from the "symbol" field. ie., "JpegAct_0" -> "JpegAct". + ## ROCm Systems Profiler 1.4.0 for ROCm 7.11.0 ### Added diff --git a/projects/rocprofiler-systems/source/lib/rocprof-sys/library/amd_smi.cpp b/projects/rocprofiler-systems/source/lib/rocprof-sys/library/amd_smi.cpp index ed26d7a5aa..d7ed81bc5c 100644 --- a/projects/rocprofiler-systems/source/lib/rocprof-sys/library/amd_smi.cpp +++ b/projects/rocprofiler-systems/source/lib/rocprof-sys/library/amd_smi.cpp @@ -259,14 +259,9 @@ metadata_initialize_smi_pmc(size_t gpu_id) if(xcp_idx) name_ss << "_" << *xcp_idx; name_ss << "_" << clk; - std::stringstream symbol_ss; - symbol_ss << "VcnAct"; - if(xcp_idx) symbol_ss << "_" << *xcp_idx; - symbol_ss << "_" << clk; - trace_cache::get_metadata_registry().add_pmc_info( { agent_type::GPU, gpu_id, TARGET_ARCH, EVENT_CODE, INSTANCE_ID, - name_ss.str(), symbol_ss.str(), + name_ss.str(), "VcnAct", trait::name::description, LONG_DESCRIPTION, COMPONENT, trace_cache::PERCENTAGE, rocprofsys::trace_cache::ABSOLUTE, BLOCK, EXPRESSION, 0, 0 }); @@ -281,14 +276,9 @@ metadata_initialize_smi_pmc(size_t gpu_id) if(xcp_idx) name_ss << "_" << *xcp_idx; name_ss << "_" << std::to_string(clk); - std::stringstream symbol_ss; - symbol_ss << "JpegAct"; - if(xcp_idx) symbol_ss << "_" << *xcp_idx; - symbol_ss << "_" << std::to_string(clk); - trace_cache::get_metadata_registry().add_pmc_info( { agent_type::GPU, gpu_id, TARGET_ARCH, EVENT_CODE, INSTANCE_ID, - name_ss.str(), symbol_ss.str(), + name_ss.str(), "JpegAct", trait::name::description, LONG_DESCRIPTION, COMPONENT, trace_cache::PERCENTAGE, rocprofsys::trace_cache::ABSOLUTE, BLOCK, EXPRESSION, 0, 0 }); @@ -338,11 +328,10 @@ metadata_initialize_smi_pmc(size_t gpu_id) { std::stringstream read_name_ss, read_symbol_ss; read_name_ss << trait::name::value << "_" << i; - read_symbol_ss << "XgmiRead_" << i; trace_cache::get_metadata_registry().add_pmc_info( { agent_type::GPU, gpu_id, TARGET_ARCH, EVENT_CODE, INSTANCE_ID, - read_name_ss.str(), read_symbol_ss.str(), + read_name_ss.str(), "XgmiRead", trait::name::description, LONG_DESCRIPTION, COMPONENT, "KB", rocprofsys::trace_cache::ABSOLUTE, BLOCK, EXPRESSION, 0, 0 }); @@ -350,11 +339,10 @@ metadata_initialize_smi_pmc(size_t gpu_id) std::stringstream write_name_ss, write_symbol_ss; write_name_ss << trait::name::value << "_" << i; - write_symbol_ss << "XgmiWrite_" << i; trace_cache::get_metadata_registry().add_pmc_info( { agent_type::GPU, gpu_id, TARGET_ARCH, EVENT_CODE, INSTANCE_ID, - write_name_ss.str(), write_symbol_ss.str(), + write_name_ss.str(), "XgmiWrite", trait::name::description, LONG_DESCRIPTION, COMPONENT, "KB", rocprofsys::trace_cache::ABSOLUTE, BLOCK, EXPRESSION, 0, 0 });