Callback API

Callback API#

ROCTracer: Callback API
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
domainThe domain
Return values
ROCTRACER_STATUS_SUCCESSThe function has been executed successfully.
ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_IDdomain 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
domainThe domain
opThe operation in domain.
Return values
ROCTRACER_STATUS_SUCCESSThe function has been executed successfully.
ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_IDdomain is invalid.
ROCTRACER_STATUS_ERROR_INVALID_ARGUMENTop is invalid for domain.

◆ 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
domainThe domain
callbackThe callback to invoke each time the operation is performed on entry and exit.
argValue to pass as last argument of callback.
Return values
ROCTRACER_STATUS_SUCCESSThe function has been executed successfully.
ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_IDdomain 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
domainThe domain.
opThe operation ID in domain.
callbackThe callback to invoke each time the operation is performed on entry and exit.
argValue to pass as last argument of callback.
Return values
ROCTRACER_STATUS_SUCCESSThe function has been executed successfully.
ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_IDdomain is invalid.
ROCTRACER_STATUS_ERROR_INVALID_ARGUMENTop is invalid for domain.