Experimental tool registration

Experimental tool registration#

ROCprofiler-SDK developer API: Experimental tool registration
ROCprofiler-SDK developer API 1.0.0
ROCm Profiling API and tools
Experimental tool registration

Data types and functions for tool registration with rocprofiler. More...

Data Structures

struct  rocprofiler_tool_configure_attach_result_t
 (EXPERIMENTAL) Extended data structure containing initialization, finalization, attach/detach, and data. More...
 

Typedefs

typedef void(* rocprofiler_client_detach_t) (rocprofiler_client_id_t)
 (experimental)
 
typedef int(* rocprofiler_tool_attach_t) (rocprofiler_client_detach_t detach_func, rocprofiler_context_id_t *context_ids, uint64_t context_ids_length, void *tool_data)
 Prototype for the start of the attach function that will be called after the configuration.
 
typedef void(* rocprofiler_tool_detach_t) (void *tool_data)
 Prototype for the detach function where a tool can temporarily suspend operations.
 
typedef rocprofiler_tool_configure_attach_result_t *(* rocprofiler_configure_attach_func_t) (uint32_t version, const char *runtime_version, uint32_t priority, rocprofiler_client_id_t *client_id)
 Function pointer typedef for rocprofiler_configure_attach function.
 

Functions

rocprofiler_tool_configure_attach_result_trocprofiler_configure_attach (uint32_t version, const char *runtime_version, uint32_t priority, rocprofiler_client_id_t *client_id)
 (experimental) This is the special function that tools define to enable rocprofiler attachment support.
 

Detailed Description

Data types and functions for tool registration with rocprofiler.


Data Structure Documentation

◆ rocprofiler_tool_configure_attach_result_t

struct rocprofiler_tool_configure_attach_result_t

(EXPERIMENTAL) Extended data structure containing initialization, finalization, attach/detach, and data.

This is an experimental extension of rocprofiler_tool_configure_result_t that adds support for runtime attachment and detachment of tools. The tool_reattach and tool_detach function pointers allow tools to handle dynamic attachment scenarios where they may need to suspend and resume profiling operations.

The size field is used for ABI reasons and should be set to sizeof(rocprofiler_tool_configure_result_t)

Definition at line 77 of file registration.h.

+ Collaboration diagram for rocprofiler_tool_configure_attach_result_t:
Data Fields
unsigned long size size of this struct (in case of future extensions)
rocprofiler_tool_attach_t tool_attach after configuration
void * tool_data data to provide to init and fini callbacks
rocprofiler_tool_detach_t tool_detach end of attach session

Typedef Documentation

◆ rocprofiler_client_detach_t

typedef void(* rocprofiler_client_detach_t) (rocprofiler_client_id_t)

#include <rocprofiler-sdk/experimental/registration.h>

(experimental)

Definition at line 43 of file registration.h.

◆ rocprofiler_configure_attach_func_t

typedef rocprofiler_tool_configure_attach_result_t *(* rocprofiler_configure_attach_func_t) (uint32_t version, const char *runtime_version, uint32_t priority, rocprofiler_client_id_t *client_id)

#include <rocprofiler-sdk/experimental/registration.h>

Function pointer typedef for rocprofiler_configure_attach function.

Parameters
[in]versionThe version of rocprofiler: (10000 * major) + (100 * minor) + patch
[in]runtime_versionString descriptor of the rocprofiler version and other relevant info.
[in]priorityHow many client tools were initialized before this client tool
[in,out]client_idtool identifier value.

Definition at line 110 of file registration.h.

◆ rocprofiler_tool_attach_t

typedef int(* rocprofiler_tool_attach_t) (rocprofiler_client_detach_t detach_func, rocprofiler_context_id_t *context_ids, uint64_t context_ids_length, void *tool_data)

#include <rocprofiler-sdk/experimental/registration.h>

Prototype for the start of the attach function that will be called after the configuration.

Parameters
[in]tool_datatool_data field returned from rocprofiler_configure_attach in rocprofiler_tool_configure_result_t.

Definition at line 52 of file registration.h.

◆ rocprofiler_tool_detach_t

typedef void(* rocprofiler_tool_detach_t) (void *tool_data)

#include <rocprofiler-sdk/experimental/registration.h>

Prototype for the detach function where a tool can temporarily suspend operations.

Parameters
[in]tool_datatool_data field returned from rocprofiler_configure in rocprofiler_tool_configure_attach_result_t.

Definition at line 63 of file registration.h.

Function Documentation

◆ rocprofiler_configure_attach()

rocprofiler_tool_configure_attach_result_t * rocprofiler_configure_attach ( uint32_t  version,
const char *  runtime_version,
uint32_t  priority,
rocprofiler_client_id_t client_id 
)

#include <rocprofiler-sdk/experimental/registration.h>

(experimental) This is the special function that tools define to enable rocprofiler attachment support.

Parameters
version
runtime_version
priority
client_id
Returns
rocprofiler_tool_configure_attach_result_t*