ROCTx Application control/customization of profiling tools

ROCTx Application control/customization of profiling tools#

ROCTx developer API: ROCTx Application control/customization of profiling tools
ROCTx developer API 1.0.0
ROCm Profiling API and tools
ROCTx Application control/customization of profiling tools

Applications can invoke these functions to control/customize profiling tool behavior. More...

Functions

int roctxProfilerPause (roctx_thread_id_t tid)
 Request any currently running profiling tool that is should stop collecting data.
 
int roctxProfilerResume (roctx_thread_id_t tid)
 Request any currently running profiling tool that is should resume collecting data.
 

Detailed Description

Applications can invoke these functions to control/customize profiling tool behavior.

Function Documentation

◆ roctxProfilerPause()

int roctxProfilerPause ( roctx_thread_id_t  tid)

#include <rocprofiler-sdk-roctx/roctx.h>

Request any currently running profiling tool that is should stop collecting data.

Within a profiling tool, it is recommended that the tool cache all active contexts at the time of the request and then stop them. By convention, the application should pass zero to indicate a global pause of the profiler in the current process. If the application wishes to pause only the current thread, the application should obtain the thread ID via roctxGetThreadId.

Parameters
[in]tidZero for all threads in current process or non-zero for a specific thread
Returns
int A profiling tool may choose to set this value to a non-zero value to indicate a failure while executing the request or lack of support. If the profiling tool supports pausing but is already paused, the tool should ignore the request and return zero.

◆ roctxProfilerResume()

int roctxProfilerResume ( roctx_thread_id_t  tid)

#include <rocprofiler-sdk-roctx/roctx.h>

Request any currently running profiling tool that is should resume collecting data.

Within a profiling tool, it is recommended that the tool re-activated the active contexts which were cached when the pause request was issued. By convention, the application should pass zero to indicate a global pause of the profiler in the current process. If the application wishes to pause only the current thread, the application should obtain the thread ID via roctxGetThreadId.

Parameters
[in]tidZero for all threads in current process or non-zero for a specific thread
Returns
int A profiling tool may choose to set this value to a non-zero value to indicate a failure while executing the request or lack of support. If the profiling tool is supports resuming but is already active, the tool should ignore the request and return zero.