Put cached perfetto traces as default one (#2138)

* Put cached perfetto traces as default one

* Improve cached data and perfetto traces in order to be more aligned with E2E tests

* Addressing PR comments and findings

* Force early instrumentation bundle instantiation

* Sync-up insturumented containers with thread growth data

* Revert ompvv number of host threads to default 8

* Fixed counter track namings for amd-smi

* AIPROFSYST-34 [rocprof-sys] Update documentation describing newly introduced changes to default tracing mechanism
This commit is contained in:
marantic-amd
2025-12-22 12:47:35 +01:00
committed by GitHub
parent 7da3275b42
commit ba1380a75d
36 changed files with 557 additions and 183 deletions
@@ -34,7 +34,8 @@ and tweak the default sampling values.
.. code-block:: shell
# ...
ROCPROFSYS_TRACE = true
ROCPROFSYS_TRACE_CACHED = true # Recommended: deferred trace generation for minimal overhead
# ROCPROFSYS_TRACE_LEGACY = false # Alternative: direct mode with higher overhead
ROCPROFSYS_PROFILE = true
ROCPROFSYS_USE_SAMPLING = true
ROCPROFSYS_USE_PROCESS_SAMPLING = true
@@ -339,7 +340,8 @@ Generating a default configuration file
ROCPROFSYS_CONFIG_FILE =
ROCPROFSYS_MODE = trace
ROCPROFSYS_TRACE = true
ROCPROFSYS_TRACE_CACHED = true
ROCPROFSYS_TRACE_LEGACY = false
ROCPROFSYS_PROFILE = false
ROCPROFSYS_USE_SAMPLING = false
ROCPROFSYS_USE_PROCESS_SAMPLING = true
@@ -497,7 +499,9 @@ Viewing the setting descriptions
| ROCPROFSYS_USE_CODE_COVERAGE | Enable support for code coverage |
| ROCPROFSYS_USE_KOKKOSP | Enable support for Kokkos Tools |
| ROCPROFSYS_USE_OMPT | Enable support for OpenMP-Tools |
| ROCPROFSYS_TRACE | Enable perfetto backend |
| ROCPROFSYS_TRACE_CACHED | Enable perfetto backend with deferred...|
| ROCPROFSYS_TRACE_LEGACY | Enable perfetto backend (legacy, dir... |
| ROCPROFSYS_TRACE | [DEPRECATED] Renamed to ROCPROFSYS_T... |
| ROCPROFSYS_USE_PID | Enable tagging filenames with proces... |
| ROCPROFSYS_USE_AMD_SMI | Enable sampling GPU power, temp, uti... |
| ROCPROFSYS_USE_ROCM | Enable ROCM tracing |
@@ -1345,7 +1349,8 @@ but do not override an existing value for the environment variable.
$SAMPLE = OFF
# use fields
ROCPROFSYS_TRACE = $ENABLE
ROCPROFSYS_TRACE_CACHED = $ENABLE # Recommended: deferred trace generation
ROCPROFSYS_TRACE_LEGACY = OFF # Legacy direct mode (higher overhead)
ROCPROFSYS_PROFILE = $ENABLE
ROCPROFSYS_USE_SAMPLING = $SAMPLE
ROCPROFSYS_USE_PROCESS_SAMPLING = $SAMPLE
@@ -75,7 +75,7 @@ The configuration parameter settings can be saved in a configuration file. Here
ROCPROFSYS_SAMPLING_DELAY=0.05
ROCPROFSYS_SAMPLING_CPUS=0-9
ROCPROFSYS_SAMPLING_GPUS=$env:HIP_VISIBLE_DEVICES
ROCPROFSYS_TRACE=ON
ROCPROFSYS_TRACE_CACHED=ON
ROCPROFSYS_PROFILE=ON
ROCPROFSYS_USE_SAMPLING=ON
ROCPROFSYS_USE_PROCESS_SAMPLING=OFF
@@ -284,7 +284,7 @@ The following snippets show how ``rocprof-sys-sample`` runs with various environ
LD_PRELOAD=/opt/rocprofiler-systems/lib/librocprof-sys-dl.so.1.7.1
ROCPROFSYS_CPU_FREQ_ENABLED=false
ROCPROFSYS_PROFILE=true
ROCPROFSYS_TRACE=true
ROCPROFSYS_TRACE_CACHED=true
ROCPROFSYS_USE_AMD_SMI=true
ROCPROFSYS_USE_PROCESS_SAMPLING=true
ROCPROFSYS_USE_SAMPLING=true
@@ -307,7 +307,7 @@ The following snippets show how ``rocprof-sys-sample`` runs with various environ
ROCPROFSYS_USE_KOKKOSP=true
ROCPROFSYS_USE_MPIP=true
ROCPROFSYS_USE_OMPT=true
ROCPROFSYS_TRACE=true
ROCPROFSYS_TRACE_CACHED=true
ROCPROFSYS_USE_PROCESS_SAMPLING=true
ROCPROFSYS_USE_RCCLP=true
ROCPROFSYS_USE_AMD_SMI=true
@@ -337,7 +337,7 @@ The following snippets show how ``rocprof-sys-sample`` runs with various environ
ROCPROFSYS_USE_KOKKOSP=false
ROCPROFSYS_USE_MPIP=false
ROCPROFSYS_USE_OMPT=false
ROCPROFSYS_TRACE=true
ROCPROFSYS_TRACE_CACHED=true
ROCPROFSYS_USE_PROCESS_SAMPLING=true
ROCPROFSYS_USE_RCCLP=false
ROCPROFSYS_USE_AMD_SMI=false
@@ -362,7 +362,7 @@ Here is the full output from the previous
ROCPROFSYS_OUTPUT_PATH=rocprof-sys-output
ROCPROFSYS_OUTPUT_PREFIX=%tag%
ROCPROFSYS_PROFILE=true
ROCPROFSYS_TRACE=true
ROCPROFSYS_TRACE_CACHED=true
ROCPROFSYS_TRACE_THREAD_LOCKS=false
ROCPROFSYS_TRACE_THREAD_RW_LOCKS=false
ROCPROFSYS_TRACE_THREAD_SPIN_LOCKS=false
@@ -17,7 +17,7 @@ For example, starting with the following base configuration:
export ROCPROFSYS_TIME_OUTPUT=ON
export ROCPROFSYS_USE_PID=OFF
export ROCPROFSYS_PROFILE=ON
export ROCPROFSYS_TRACE=ON
export ROCPROFSYS_TRACE_CACHED=ON
.. code-block:: shell
@@ -192,7 +192,7 @@ First, instrument and run the program.
ROCPROFSYS: LD_PRELOAD=/home/rocm-dev/code/rocprofiler-systems/build/ubuntu/22.04/lib/librocprof-sys-dl.so.1.0.0
ROCPROFSYS: OMP_TOOL_LIBRARIES=/home/rocm-dev/code/rocprofiler-systems/build/ubuntu/22.04/lib/librocprof-sys-dl.so.1.0.0
ROCPROFSYS: ROCPROFSYS_PROFILE=true
ROCPROFSYS: ROCPROFSYS_TRACE=true
ROCPROFSYS: ROCPROFSYS_TRACE_CACHED=true
ROCPROFSYS: ROCPROFSYS_VERBOSE=0
[rocprof-sys][dl][1827155] rocprofsys_main
[rocprof-sys][1827155][rocprofsys_init_tooling] Instrumentation mode: Trace