Files
rocm-systems/projects/roctracer
Laurent Morichetti 4a04400f85 Cleanup ROCTX's implementation
Remove thread_data_init. The C++ standard guarantees that the thread
local variable is initialized before its first odr-use and destructed
when the thread exits. Use a global initializer to set the reference
from the message stack instance in the map.

Remove roctracer_error_string. This does not belong to this library.
ROCTX does not expose errors to the application. The only functions
returning errors are returning -1 (Push/Pop).

Remove memory leaks due to strdup on the ranges messages. The memory
for the messages is guaranteed to be valid for the duration of the
callback, and it is the application's responsibility to strdup the
strings if it needs to extend the message's lifetime.

Add a lock to the RegisterApiCallback implementation. Iterating the
message stack map must be synchronized as a new thread could be adding
a new value to the map.

Change-Id: Iaf5b07ebc9efe4061cb01327d4c7034888727816


[ROCm/roctracer commit: 713db1fce5]
2022-05-10 12:08:06 -07:00
..
2022-04-30 00:33:05 +00:00
2022-05-10 12:08:06 -07:00
2022-05-10 08:13:18 -07:00
2022-05-10 12:08:06 -07:00
2018-05-10 13:19:10 -05:00
2022-04-19 09:30:45 -07:00
2022-04-19 09:30:45 -07:00
2022-04-15 20:34:21 +00:00
2022-04-19 09:30:45 -07:00

ROC-tracer

  • ROC-tracer library: Runtimes Generic Callback/Activity APIs

    The goal of the implementation is to provide a generic independent from specific runtime profiler to trace API and asynchronous activity.

    The API provides functionality for registering the runtimes API callbacks and asynchronous activity records pool support.

  • ROC-TX library: Code Annotation Events API

    Includes API for:

    • roctxMark
    • roctxRangePush
    • roctxRangePop

Usage

rocTracer API

To use the rocTracer API you need the API header and to link your application with roctracer .so library:

  • /opt/rocm/roctracer/include/roctracer.h

    API header.

  • /opt/rocm/lib/libroctracer64.so

    .so library.

rocTX API

To use the rocTX API you need the API header and to link your application with roctx .so library:

  • /opt/rocm/roctracer/include/roctx.h

    API header.

  • /opt/rocm/lib/libroctx64.so

    .so library.

Library source tree

  • doc

    Documentation.

  • inc

    Include header files.

    • roctracer.h

      rocTacer library public API header.

    • roctx.h

      rocTX library public API header.

  • src

    Library sources.

    • core

      rocTracer library API sources.

    • roctx

      rocTX library API sources.

    • util

      Library utils sources.

  • test

    Test suit.

    • MatrixTranspose

      Test based on HIP MatrixTranspose sample.

Documentation

Build and run tests

  • ROCm is required

  • Python modules requirements: CppHeaderParser, argparse.

    To install:

    pip3 install CppHeaderParser argparse
    
  • Clone development branch of roctracer:

    git clone -b amd-master https://github.com/ROCm-Developer-Tools/roctracer
    
  • To build roctracer library:

    cd <your path>/roctracer
    mkdir build && cd build
    cmake -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_INSTALL_PREFIX=/opt/rocm ..
    make
    
  • To build and run test:

    make mytest
    run.sh
    

Installation

Install by:

make install

or:

make package && dpkg -i *.deb