Файли
rocm-systems/projects/roctracer
Laurent Morichetti 8502571ab7 Move trace_buffer.h to the tool directory
A trace buffer is used to efficiently store synchronous event records
so that they can be processed later, possibly in a different thread,
when the buffer is flushed. This helps reduce the latency added by
tracing API calls.

The API does not need to use trace buffers as synchronous events are
directly reported to the client with callbacks, and asynchronous events
(activities) are saved in memory pools.

The implentation of HSA asynchronous memory copy activities was using
a trace buffer shared with the tracer tool to write the records to a
file (async_copy_trace.txt), instead of using a memory pool and
reporting the activity to the client.

Removed the asynchronous memory copies trace buffer, and updated
hsa_async_copy_handler to use the pool specified when the activity
was enabled.

Updated the tracer tool to read HSA_OP_ID_COPY records out of the
default memory pool and write them to async_copy_trace.txt.

Move trace_buffer.h to test/tool as tracer_tool.cpp is now the only
file using it.

Change-Id: Ida95aba2eaf3c3f2a979ed6c2b060374017b7424


[ROCm/roctracer commit: 61f35b0204]
2022-05-03 21:56:28 -04:00
..
2022-04-19 09:30:45 -07:00
2022-04-30 00:33:05 +00: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-19 09:30:45 -07:00
2022-04-30 00:33:05 +00: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