/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roctracer-docs/checkouts/docs-5.5.1/inc/roctracer.h File Reference

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roctracer-docs/checkouts/docs-5.5.1/inc/roctracer.h File Reference#

ROC Tracer: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roctracer-docs/checkouts/docs-5.5.1/inc/roctracer.h File Reference
roctracer.h File Reference

ROCtracer API interface. More...

#include <stddef.h>
#include <stdint.h>
#include "ext/prof_protocol.h"

Go to the source code of this file.

Data Structures

struct  roctracer_properties_t
 Memory pool properties. More...
 

Macros

#define ROCTRACER_CALL
 
#define ROCTRACER_EXPORT   ROCTRACER_EXPORT_DECORATOR ROCTRACER_CALL
 
#define ROCTRACER_IMPORT   ROCTRACER_IMPORT_DECORATOR ROCTRACER_CALL
 
#define ROCTRACER_API   ROCTRACER_IMPORT
 
#define ROCTRACER_VERSION_4_1
 The function was introduced in version 4.1 of the interface and has the symbol version string of "ROCTRACER_4.1". More...
 
#define ROCTRACER_VERSION_MAJOR   4
 The major version of the interface as a macro so it can be used by the preprocessor. More...
 
#define ROCTRACER_VERSION_MINOR   1
 The minor version of the interface as a macro so it can be used by the preprocessor. More...
 

Typedefs

typedef activity_domain_t roctracer_domain_t
 Enumeration of domains that can be traced. More...
 
typedef activity_rtapi_callback_t roctracer_rtapi_callback_t
 Runtime API callback type. More...
 
typedef activity_record_t roctracer_record_t
 Activity record. More...
 
typedef void(* roctracer_allocator_t) (char **ptr, size_t size, void *arg)
 Memory pool allocator callback. More...
 
typedef void(* roctracer_buffer_callback_t) (const char *begin, const char *end, void *arg)
 Memory pool buffer callback. More...
 
typedef void roctracer_pool_t
 Tracer memory pool type. More...
 

Enumerations

enum  roctracer_status_t {
  ROCTRACER_STATUS_SUCCESS = 0 , ROCTRACER_STATUS_ERROR = -1 , ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_ID = -2 , ROCTRACER_STATUS_ERROR_INVALID_ARGUMENT = -3 ,
  ROCTRACER_STATUS_ERROR_DEFAULT_POOL_UNDEFINED = -4 , ROCTRACER_STATUS_ERROR_DEFAULT_POOL_ALREADY_DEFINED = -5 , ROCTRACER_STATUS_ERROR_MEMORY_ALLOCATION = -6 , ROCTRACER_STATUS_ERROR_MISMATCHED_EXTERNAL_CORRELATION_ID = -7 ,
  ROCTRACER_STATUS_ERROR_NOT_IMPLEMENTED = -8 , ROCTRACER_STATUS_UNINIT = 2 , ROCTRACER_STATUS_BREAK = 3 , ROCTRACER_STATUS_BAD_DOMAIN = ROCTRACER_STATUS_ERROR_INVALID_DOMAIN_ID ,
  ROCTRACER_STATUS_BAD_PARAMETER = ROCTRACER_STATUS_ERROR_INVALID_ARGUMENT , ROCTRACER_STATUS_HIP_API_ERR = 6 , ROCTRACER_STATUS_HIP_OPS_ERR = 7 , ROCTRACER_STATUS_HCC_OPS_ERR = ROCTRACER_STATUS_HIP_OPS_ERR ,
  ROCTRACER_STATUS_HSA_ERR = 7 , ROCTRACER_STATUS_ROCTX_ERR = 8
}
 ROC Tracer API status codes. More...
 

Functions

ROCTRACER_API uint32_t roctracer_version_major () ROCTRACER_VERSION_4_1
 Query the major version of the installed library. More...
 
ROCTRACER_API uint32_t roctracer_version_minor () ROCTRACER_VERSION_4_1
 Query the minor version of the installed library. More...
 
ROCTRACER_API const char * roctracer_error_string () ROCTRACER_VERSION_4_1
 Query the textual description of the last error for the current thread. More...
 
ROCTRACER_API const char * roctracer_op_string (uint32_t domain, uint32_t op, uint32_t kind) ROCTRACER_VERSION_4_1
 Query textual name of an operation of a domain. More...
 
ROCTRACER_API roctracer_status_t roctracer_op_code (uint32_t domain, const char *str, uint32_t *op, uint32_t *kind) ROCTRACER_VERSION_4_1
 Query the operation code given a domain and the name of an operation. More...
 
ROCTRACER_API roctracer_status_t roctracer_set_properties (roctracer_domain_t domain, void *properties) ROCTRACER_VERSION_4_1
 Set the properties of a domain. More...
 
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...
 
ROCTRACER_API roctracer_status_t roctracer_next_record (const activity_record_t *record, const activity_record_t **next) ROCTRACER_VERSION_4_1
 Get a pointer to the next activity record. More...
 
ROCTRACER_API roctracer_status_t roctracer_open_pool_expl (const roctracer_properties_t *properties, roctracer_pool_t **pool) ROCTRACER_VERSION_4_1
 Create tracer memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_open_pool (const roctracer_properties_t *properties) ROCTRACER_VERSION_4_1
 Create tracer memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_close_pool_expl (roctracer_pool_t *pool) ROCTRACER_VERSION_4_1
 Close tracer memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_close_pool () ROCTRACER_VERSION_4_1
 Close default tracer memory pool, if defined, and set to undefined. More...
 
ROCTRACER_API roctracer_pool_troctracer_default_pool_expl (roctracer_pool_t *pool) ROCTRACER_VERSION_4_1
 Query and set the default memory pool. More...
 
ROCTRACER_API roctracer_pool_troctracer_default_pool () ROCTRACER_VERSION_4_1
 Query the current default memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_enable_op_activity_expl (activity_domain_t domain, uint32_t op, roctracer_pool_t *pool) ROCTRACER_VERSION_4_1
 Enable activity record logging for a specified operation of a domain providing a memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_enable_op_activity (activity_domain_t domain, uint32_t op) ROCTRACER_VERSION_4_1
 Enable activity record logging for a specified operation of a domain using the default memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_enable_domain_activity_expl (activity_domain_t domain, roctracer_pool_t *pool) ROCTRACER_VERSION_4_1
 Enable activity record logging for all operations of a domain providing a memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_enable_domain_activity (activity_domain_t domain) ROCTRACER_VERSION_4_1
 Enable activity record logging for all operations of a domain using the default memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_disable_op_activity (activity_domain_t domain, uint32_t op) ROCTRACER_VERSION_4_1
 Disable activity record logging for a specified operation of a domain. More...
 
ROCTRACER_API roctracer_status_t roctracer_disable_domain_activity (activity_domain_t domain) ROCTRACER_VERSION_4_1
 Disable activity record logging for all operations of a domain. More...
 
ROCTRACER_API roctracer_status_t roctracer_flush_activity_expl (roctracer_pool_t *pool) ROCTRACER_VERSION_4_1
 Flush available activity records for a memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_flush_activity () ROCTRACER_VERSION_4_1
 Flush available activity records for the default memory pool. More...
 
ROCTRACER_API roctracer_status_t roctracer_get_timestamp (roctracer_timestamp_t *timestamp) ROCTRACER_VERSION_4_1
 Get the system clock timestamp. More...
 

Detailed Description

ROCtracer API interface.

Macro Definition Documentation

◆ ROCTRACER_API

#define ROCTRACER_API   ROCTRACER_IMPORT

◆ ROCTRACER_CALL

#define ROCTRACER_CALL

◆ ROCTRACER_EXPORT

#define ROCTRACER_EXPORT   ROCTRACER_EXPORT_DECORATOR ROCTRACER_CALL

◆ ROCTRACER_IMPORT

#define ROCTRACER_IMPORT   ROCTRACER_IMPORT_DECORATOR ROCTRACER_CALL