Experimental tool registration#
|
ROCprofiler-SDK developer API 1.4.1
ROCm Profiling API and tools
|
Data types and functions for tool registration with rocprofiler. More...
Data Structures | |
| struct | rocprofiler_runtime_registration_info_t |
| Struct containing the information about the libraries which have registered with rocprofiler-register. More... | |
| 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 int(* | rocprofiler_runtime_registration_info_cb_t) (rocprofiler_runtime_registration_info_t *info, void *data) |
| Callback function for iterating over the libraries which have registered with rocprofiler-register. | |
| 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_t * | rocprofiler_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. | |
| rocprofiler_status_t | rocprofiler_iterate_runtime_registration_info (rocprofiler_runtime_registration_info_cb_t callback, void *data) ROCPROFILER_ATTRIBUTE(nonnull(1)) |
| Iterates over all the (valid) libraries which registered their API tables with rocprofiler-register. Any libraries which do not have an accepted common name, have an invalid import function address (in secure mode), or have registered too many instances are not reported by this function. | |
Detailed Description
Data types and functions for tool registration with rocprofiler.
Data Structure Documentation
◆ rocprofiler_runtime_registration_info_t
| struct rocprofiler_runtime_registration_info_t |
Struct containing the information about the libraries which have registered with rocprofiler-register.
Definition at line 40 of file registration.h.
Collaboration diagram for rocprofiler_runtime_registration_info_t:| Data Fields | ||
|---|---|---|
| uint64_t | api_table_length | number of API tables |
| const char * | common_name | name of the library |
| uint32_t | lib_version | version |
| unsigned long | size | in case of future extensions |
◆ 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_attach 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 105 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 53 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] version The version of rocprofiler: (10000 * major) + (100 * minor) + patch[in] runtime_version String descriptor of the rocprofiler version and other relevant info. [in] priority How many client tools were initialized before this client tool [in,out] client_id tool identifier value.
Definition at line 138 of file registration.h.
◆ rocprofiler_runtime_registration_info_cb_t
| typedef int(* rocprofiler_runtime_registration_info_cb_t) (rocprofiler_runtime_registration_info_t *info, void *data) |
#include <rocprofiler-sdk/experimental/registration.h>
Callback function for iterating over the libraries which have registered with rocprofiler-register.
- Parameters
-
[in] info Pointer to library registration instance. Caller should make a copy for reference outside of callback. [in] data User data passed to rocprofiler_iterate_runtime_registration_info
- Returns
- int
- Return values
-
0 If zero is returned from callback, rocprofiler-register will continue to next registration info, if one exists -1 If -1 (or any value != 0) is returned from callback, rocprofiler-register will cease to iterate over the remaining registration info, if any exists
Definition at line 89 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_data tool_datafield returned from rocprofiler_configure_attach in rocprofiler_tool_configure_result_t.
Definition at line 62 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_data tool_datafield returned from rocprofiler_configure in rocprofiler_tool_configure_attach_result_t.
Definition at line 73 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*
◆ rocprofiler_iterate_runtime_registration_info()
| rocprofiler_status_t rocprofiler_iterate_runtime_registration_info | ( | rocprofiler_runtime_registration_info_cb_t | callback, |
| void * | data | ||
| ) |
#include <rocprofiler-sdk/experimental/registration.h>
Iterates over all the (valid) libraries which registered their API tables with rocprofiler-register. Any libraries which do not have an accepted common name, have an invalid import function address (in secure mode), or have registered too many instances are not reported by this function.
- Parameters
-
[in] callback Callback function to invoke for each valid registered library [in] data User data to pass to the callback function
- Returns
- rocprofiler_status_t
- Return values
-
ROCPROFILER_STATUS_SUCCESS if iteration completes successfully other rocprofiler_status_t values if an error occurs
Generated by