Callback API#
ROC tracer provides support for runtime API callbacks and activity records logging. More...
Typedefs | |
typedef activity_rtapi_callback_t | roctracer_rtapi_callback_t |
Runtime API callback type. More... | |
Functions | |
ROCTRACER_API roctracer_status_t | roctracer_enable_op_callback (activity_domain_t domain, uint32_t op, activity_rtapi_callback_t callback, void *arg) ROCTRACER_VERSION_4_1 |
Enable runtime API callback for a specific operation of a domain. More... | |
ROCTRACER_API roctracer_status_t | roctracer_enable_domain_callback (activity_domain_t domain, activity_rtapi_callback_t callback, void *arg) ROCTRACER_VERSION_4_1 |
Enable runtime API callback for all operations of a domain. More... | |
ROCTRACER_API roctracer_status_t | roctracer_disable_op_callback (activity_domain_t domain, uint32_t op) ROCTRACER_VERSION_4_1 |
Disable runtime API callback for a specific operation of a domain. More... | |
ROCTRACER_API roctracer_status_t | roctracer_disable_domain_callback (activity_domain_t domain) ROCTRACER_VERSION_4_1 |
Disable runtime API callback for all operations of a domain. More... | |
Detailed Description
ROC tracer provides support for runtime API callbacks and activity records logging.
The API callbacks provide the API calls arguments and are called on different phases, on enter, on exit, on kernel completion.
Typedef Documentation
◆ roctracer_rtapi_callback_t
typedef activity_rtapi_callback_t roctracer_rtapi_callback_t |
Runtime API callback type.
The callback that will be invoked when an enabled runtime API is called. The callback is invoked on entry and on exit.
Function Documentation
◆ roctracer_disable_domain_callback()
ROCTRACER_API roctracer_status_t roctracer_disable_domain_callback | ( | activity_domain_t | domain | ) |
Disable runtime API callback for all operations of a domain.
- Parameters
-
domain The domain
- Return values
-
ROCTRACER_STATUS_SUCCESS The function has been executed successfully. ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_ID domain
is invalid.
◆ roctracer_disable_op_callback()
ROCTRACER_API roctracer_status_t roctracer_disable_op_callback | ( | activity_domain_t | domain, |
uint32_t | op | ||
) |
Disable runtime API callback for a specific operation of a domain.
- Parameters
-
domain The domain op The operation in domain
.
- Return values
-
ROCTRACER_STATUS_SUCCESS The function has been executed successfully. ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_ID domain
is invalid.ROCTRACER_STATUS_ERROR_INVALID_ARGUMENT op
is invalid fordomain
.
◆ roctracer_enable_domain_callback()
ROCTRACER_API roctracer_status_t roctracer_enable_domain_callback | ( | activity_domain_t | domain, |
activity_rtapi_callback_t | callback, | ||
void * | arg | ||
) |
Enable runtime API callback for all operations of a domain.
- Parameters
-
domain The domain callback The callback to invoke each time the operation is performed on entry and exit. arg Value to pass as last argument of callback
.
- Return values
-
ROCTRACER_STATUS_SUCCESS The function has been executed successfully. ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_ID domain
is invalid.
◆ roctracer_enable_op_callback()
ROCTRACER_API roctracer_status_t roctracer_enable_op_callback | ( | activity_domain_t | domain, |
uint32_t | op, | ||
activity_rtapi_callback_t | callback, | ||
void * | arg | ||
) |
Enable runtime API callback for a specific operation of a domain.
- Parameters
-
domain The domain. op The operation ID in domain
.callback The callback to invoke each time the operation is performed on entry and exit. arg Value to pass as last argument of callback
.
- Return values
-
ROCTRACER_STATUS_SUCCESS The function has been executed successfully. ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_ID domain
is invalid.ROCTRACER_STATUS_ERROR_INVALID_ARGUMENT op
is invalid fordomain
.