Files
rocm-systems/source/lib/rocprofiler-sdk-tool
Jonathan R. Madsen 7d117870d8 Fix rocprof and rocprofiler-sdk-tool (#304)
* Fix rocprof and rocprofiler-sdk-tool

- removed redundant options for rocprofv3
- fixed extension of CSV files
- fixed memory error (segfault) when tracing kernels
- fixed constructor of output_file
  - using string after move
- output_file writes csv header
- implemented tool_fini
  - flush buffer and stop context

* Minor updates to rocprofv3

* Update source/bin/CMakeLists.txt

- fix rocprof configure output location
2023-12-15 12:44:50 -06:00
..

ROCProfiler Tool Library

This is a tool that gets registered with the rocprofiler to obtain its services. The tool is built as a shared library and is named as rocprofiler-sdk-tool. The library can be preloaded using LD_PRELOAD to facilitate its registration as a tool with the rocprofiler.

The user through rocprofv3 script can select the options to obtain tracing and counter collection services from the rocprofiler.

Currently, this tool supports kernel trace and the hsa-api trace. The tool uses the following environment variables to read the user choices.

  • ROCPROFILER_KERNEL_TRACE=1 to obtain kernel trace
  • ROCPROFILER_HSA_API_TRACE=1 to obtain hsa api trace

The user can also specify the output filename and output file path to which the traces are written to.

  • ROCPROFILER_OUTPUT_PATH=<directory> to set the output directory path
  • ROCPROFILER_OUTPUT_FILE_NAME=<filename-without-extension> to set the output file name

CHANGELOG

The tool design is similar to its earlier versions. However, not all features that the earlier versions supported are supported by this tool.