Asynchronous Tracing Service

Asynchronous Tracing Service#

Rocprofiler SDK Developer API: Asynchronous Tracing Service
Rocprofiler SDK Developer API 0.4.0
ROCm Profiling API and tools
Asynchronous Tracing Service

Receive callbacks for batches of records from an internal (background) thread. More...

Data Structures

struct  rocprofiler_buffer_tracing_hsa_api_record_t
 ROCProfiler Buffer HSA API Tracer Record. More...
 
struct  rocprofiler_buffer_tracing_hip_api_record_t
 ROCProfiler Buffer HIP API Tracer Record. More...
 
struct  rocprofiler_buffer_tracing_marker_api_record_t
 ROCProfiler Buffer Marker Tracer Record. More...
 
struct  rocprofiler_buffer_tracing_memory_copy_record_t
 ROCProfiler Buffer Memory Copy Tracer Record. More...
 
struct  rocprofiler_buffer_tracing_kernel_dispatch_record_t
 ROCProfiler Buffer Kernel Dispatch Tracer Record. More...
 
struct  rocprofiler_buffer_tracing_page_migration_page_fault_record_t
 
struct  rocprofiler_buffer_tracing_page_migration_page_migrate_record_t
 
struct  rocprofiler_buffer_tracing_page_migration_queue_suspend_record_t
 
struct  rocprofiler_buffer_tracing_page_migration_unmap_from_gpu_record_t
 
struct  rocprofiler_buffer_tracing_page_migration_record_t
 ROCProfiler Buffer Page Migration Tracer Record. More...
 
struct  rocprofiler_buffer_tracing_scratch_memory_record_t
 ROCProfiler Buffer Scratch Memory Tracer Record. More...
 
struct  rocprofiler_buffer_tracing_correlation_id_retirement_record_t
 ROCProfiler Buffer Correlation ID Retirement Tracer Record. More...
 
union  rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__
 
struct  rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__.__unnamed7__
 

Typedefs

typedef int(* rocprofiler_buffer_tracing_kind_cb_t) (rocprofiler_buffer_tracing_kind_t kind, void *data)
 Callback function for mapping rocprofiler_buffer_tracing_kind_t ids to string names.
 
typedef int(* rocprofiler_buffer_tracing_kind_operation_cb_t) (rocprofiler_buffer_tracing_kind_t kind, uint32_t operation, void *data)
 Callback function for mapping the operations of a given rocprofiler_buffer_tracing_kind_t to string names.
 

Enumerations

enum  rocprofiler_page_migration_trigger_t {
  ROCPROFILER_PAGE_MIGRATION_TRIGGER_NONE = -1 ,
  ROCPROFILER_PAGE_MIGRATION_TRIGGER_PREFETCH ,
  ROCPROFILER_PAGE_MIGRATION_TRIGGER_PAGEFAULT_GPU ,
  ROCPROFILER_PAGE_MIGRATION_TRIGGER_PAGEFAULT_CPU ,
  ROCPROFILER_PAGE_MIGRATION_TRIGGER_TTM_EVICTION ,
  ROCPROFILER_PAGE_MIGRATION_TRIGGER_LAST
}
 Page migration triggers. More...
 
enum  rocprofiler_page_migration_queue_suspend_trigger_t {
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_NONE = -1 ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_SVM ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_USERPTR ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_TTM ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_SUSPEND ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_CRIU_CHECKPOINT ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_CRIU_RESTORE ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_LAST
}
 Page migration triggers causing the queue to suspend. More...
 
enum  rocprofiler_page_migration_unmap_from_gpu_trigger_t {
  ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_NONE = -1 ,
  ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_MMU_NOTIFY ,
  ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_MMU_NOTIFY_MIGRATE ,
  ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_UNMAP_FROM_CPU ,
  ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_LAST
}
 Page migration triggers causing an unmap from the GPU. More...
 

Functions

rocprofiler_status_t rocprofiler_configure_buffer_tracing_service (rocprofiler_context_id_t context_id, rocprofiler_buffer_tracing_kind_t kind, rocprofiler_tracing_operation_t *operations, unsigned long operations_count, rocprofiler_buffer_id_t buffer_id)
 Configure Buffer Tracing Service.
 
rocprofiler_status_t rocprofiler_query_buffer_tracing_kind_name (rocprofiler_buffer_tracing_kind_t kind, const char **name, uint64_t *name_len)
 Query the name of the buffer tracing kind. The name retrieved from this function is a string literal that is encoded in the read-only section of the binary (i.e. it is always "allocated" and never "deallocated").
 
rocprofiler_status_t rocprofiler_query_buffer_tracing_kind_operation_name (rocprofiler_buffer_tracing_kind_t kind, uint32_t operation, const char **name, uint64_t *name_len)
 Query the name of the buffer tracing kind. The name retrieved from this function is a string literal that is encoded in the read-only section of the binary (i.e. it is always "allocated" and never "deallocated").
 
rocprofiler_status_t rocprofiler_iterate_buffer_tracing_kinds (rocprofiler_buffer_tracing_kind_cb_t callback, void *data)
 Iterate over all the buffer tracing kinds and invokes the callback for each buffer tracing kind.
 
rocprofiler_status_t rocprofiler_iterate_buffer_tracing_kind_operations (rocprofiler_buffer_tracing_kind_t kind, rocprofiler_buffer_tracing_kind_operation_cb_t callback, void *data)
 Iterates over all the operations for a given rocprofiler_buffer_tracing_kind_t and invokes the callback with the kind and operation id. This is useful to build a map of the operation names during tool initialization instead of querying rocprofiler everytime in the callback hotpath.
 

Detailed Description

Receive callbacks for batches of records from an internal (background) thread.


Data Structure Documentation

◆ rocprofiler_buffer_tracing_hsa_api_record_t

struct rocprofiler_buffer_tracing_hsa_api_record_t

ROCProfiler Buffer HSA API Tracer Record.

Examples
api_buffered_tracing/client.cpp.

Definition at line 86 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_hsa_api_record_t:
Data Fields
rocprofiler_correlation_id_t correlation_id correlation ids for record
rocprofiler_timestamp_t end_timestamp end time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_CALLBACK_TRACING_HSA_CORE_API, ROCPROFILER_CALLBACK_TRACING_HSA_AMD_EXT_API, ROCPROFILER_CALLBACK_TRACING_HSA_IMAGE_EXT_API, or ROCPROFILER_CALLBACK_TRACING_HSA_FINALIZE_EXT_API
rocprofiler_tracing_operation_t operation Specification of the API function, e.g., rocprofiler_hsa_core_api_id_t, rocprofiler_hsa_amd_ext_api_id_t, rocprofiler_hsa_image_ext_api_id_t, or rocprofiler_hsa_finalize_ext_api_id_t.
uint64_t size size of this struct
rocprofiler_timestamp_t start_timestamp start time in nanoseconds
rocprofiler_thread_id_t thread_id id for thread generating this record

◆ rocprofiler_buffer_tracing_hip_api_record_t

struct rocprofiler_buffer_tracing_hip_api_record_t

ROCProfiler Buffer HIP API Tracer Record.

Examples
api_buffered_tracing/client.cpp.

Definition at line 110 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_hip_api_record_t:
Data Fields
rocprofiler_correlation_id_t correlation_id correlation ids for record
rocprofiler_timestamp_t end_timestamp end time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_CALLBACK_TRACING_HIP_RUNTIME_API or ROCPROFILER_CALLBACK_TRACING_HIP_COMPILER_API
rocprofiler_tracing_operation_t operation Specification of the API function, e.g., rocprofiler_hip_runtime_api_id_t or rocprofiler_hip_compiler_api_id_t.
uint64_t size size of this struct
rocprofiler_timestamp_t start_timestamp start time in nanoseconds
rocprofiler_thread_id_t thread_id id for thread generating this record

◆ rocprofiler_buffer_tracing_marker_api_record_t

struct rocprofiler_buffer_tracing_marker_api_record_t

ROCProfiler Buffer Marker Tracer Record.

Definition at line 131 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_marker_api_record_t:
Data Fields
rocprofiler_correlation_id_t correlation_id correlation ids for record
rocprofiler_timestamp_t end_timestamp end time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_CALLBACK_TRACING_MARKER_CORE_API, ROCPROFILER_CALLBACK_TRACING_MARKER_CONTROL_API, or ROCPROFILER_CALLBACK_TRACING_MARKER_NAME_API

Specification of the API function, e.g., rocprofiler_marker_core_api_id_t, rocprofiler_marker_control_api_id_t, or rocprofiler_marker_name_api_id_t

rocprofiler_tracing_operation_t operation
uint64_t size size of this struct
rocprofiler_timestamp_t start_timestamp start time in nanoseconds
rocprofiler_thread_id_t thread_id id for thread generating this record

◆ rocprofiler_buffer_tracing_memory_copy_record_t

struct rocprofiler_buffer_tracing_memory_copy_record_t

ROCProfiler Buffer Memory Copy Tracer Record.

Examples
api_buffered_tracing/client.cpp.

Definition at line 153 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_memory_copy_record_t:
Data Fields
uint64_t bytes bytes copied
rocprofiler_correlation_id_t correlation_id correlation ids for record
rocprofiler_agent_id_t dst_agent_id destination agent of copy
rocprofiler_timestamp_t end_timestamp end time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_BUFFER_TRACING_MEMORY_COPY
rocprofiler_memory_copy_operation_t operation Specification of the memory copy direction (.
See also
rocprofiler_memory_copy_operation_t)
uint64_t size size of this struct
rocprofiler_agent_id_t src_agent_id source agent of copy
rocprofiler_timestamp_t start_timestamp start time in nanoseconds
rocprofiler_thread_id_t thread_id id for thread that triggered copy

◆ rocprofiler_buffer_tracing_kernel_dispatch_record_t

struct rocprofiler_buffer_tracing_kernel_dispatch_record_t

ROCProfiler Buffer Kernel Dispatch Tracer Record.

Examples
api_buffered_tracing/client.cpp.

Definition at line 176 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_kernel_dispatch_record_t:
Data Fields
rocprofiler_correlation_id_t correlation_id correlation ids for record
rocprofiler_kernel_dispatch_info_t dispatch_info Dispatch info.
rocprofiler_timestamp_t end_timestamp end time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_BUFFER_TRACING_KERNEL_DISPATCH
rocprofiler_kernel_dispatch_operation_t operation Kernel dispatch buffer records only report the ROCPROFILER_KERNEL_DISPATCH_COMPLETE operation because there are no "real" wrapper around the enqueuing of an individual kernel dispatch.
uint64_t size size of this struct
rocprofiler_timestamp_t start_timestamp start time in nanoseconds
rocprofiler_thread_id_t thread_id id for thread that launched kernel

◆ rocprofiler_buffer_tracing_page_migration_page_fault_record_t

struct rocprofiler_buffer_tracing_page_migration_page_fault_record_t

Definition at line 193 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_page_migration_page_fault_record_t:
Data Fields
uint64_t address Address access that caused the page fault.
uint8_t migrated: 1
uint32_t node_id GPU or CPU node ID which reports a page fault.
uint8_t read_fault: 1 Is the fault due to a read or a write.

◆ rocprofiler_buffer_tracing_page_migration_page_migrate_record_t

struct rocprofiler_buffer_tracing_page_migration_page_migrate_record_t

Definition at line 201 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_page_migration_page_migrate_record_t:
Data Fields
uint64_t end_addr End address of the page being migrated.
uint32_t from_node Source node.
uint32_t preferred_node Preferred destinaion node.
uint32_t prefetch_node Node from which page was prefetched.
uint64_t start_addr Start address of the page being migrated.
uint32_t to_node Destination node.
rocprofiler_page_migration_trigger_t trigger Cause of migration.

◆ rocprofiler_buffer_tracing_page_migration_queue_suspend_record_t

struct rocprofiler_buffer_tracing_page_migration_queue_suspend_record_t

Definition at line 212 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_page_migration_queue_suspend_record_t:
Data Fields
uint32_t node_id GPU node from which the queue was suspended.
uint8_t rescheduled: 1
rocprofiler_page_migration_queue_suspend_trigger_t trigger Cause of queue suspension.

◆ rocprofiler_buffer_tracing_page_migration_unmap_from_gpu_record_t

struct rocprofiler_buffer_tracing_page_migration_unmap_from_gpu_record_t

Definition at line 219 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_page_migration_unmap_from_gpu_record_t:
Data Fields
uint64_t end_addr End address of unmapped page.
uint32_t node_id Node ID from which page was unmapped.
uint64_t start_addr Start address of unmapped page.
rocprofiler_page_migration_unmap_from_gpu_trigger_t trigger Cause of unmap.

◆ rocprofiler_buffer_tracing_page_migration_record_t

struct rocprofiler_buffer_tracing_page_migration_record_t

ROCProfiler Buffer Page Migration Tracer Record.

Examples
api_buffered_tracing/client.cpp.

Definition at line 230 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_page_migration_record_t:
Data Fields
union rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__ __unnamed__
rocprofiler_timestamp_t end_timestamp end time in nanoseconds
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_BUFFER_TRACING_PAGE_MIGRATION.
rocprofiler_tracing_operation_t operation
uint32_t pid
uint64_t size size of this struct
rocprofiler_timestamp_t start_timestamp start time in nanoseconds

◆ rocprofiler_buffer_tracing_scratch_memory_record_t

struct rocprofiler_buffer_tracing_scratch_memory_record_t

ROCProfiler Buffer Scratch Memory Tracer Record.

Examples
api_buffered_tracing/client.cpp.

Definition at line 255 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_scratch_memory_record_t:
Data Fields
rocprofiler_agent_id_t agent_id agent kernel was dispatched on
rocprofiler_correlation_id_t correlation_id correlation ids for record
rocprofiler_timestamp_t end_timestamp end time in nanoseconds
rocprofiler_scratch_alloc_flag_t flags
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_BUFFER_TRACING_SCRATCH_MEMORY
rocprofiler_scratch_memory_operation_t operation specification of the kind
rocprofiler_queue_id_t queue_id queue kernel was dispatched on
uint64_t size size of this struct
rocprofiler_timestamp_t start_timestamp start time in nanoseconds
rocprofiler_thread_id_t thread_id id for thread generating this record

◆ rocprofiler_buffer_tracing_correlation_id_retirement_record_t

struct rocprofiler_buffer_tracing_correlation_id_retirement_record_t

ROCProfiler Buffer Correlation ID Retirement Tracer Record.

Definition at line 272 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_correlation_id_retirement_record_t:
Data Fields
uint64_t internal_correlation_id Only internal correlation ID is provided.
rocprofiler_buffer_tracing_kind_t kind ROCPROFILER_BUFFER_TRACING_CORRELATION_ID_RETIREMENT
uint64_t size size of this struct
rocprofiler_timestamp_t timestamp Timestamp (in nanosec) of when rocprofiler detected the correlation ID could be retired. Due to clock skew between the CPU and GPU, this may at times, appear to be before the kernel or memory copy completed but the reality is that if this ever occurred, the API would report a FATAL error.

◆ rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__

union rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__

Definition at line 239 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__:
Data Fields
struct rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__.__unnamed7__ __unnamed__
rocprofiler_buffer_tracing_page_migration_page_fault_record_t page_fault
rocprofiler_buffer_tracing_page_migration_page_migrate_record_t page_migrate
rocprofiler_buffer_tracing_page_migration_queue_suspend_record_t queue_suspend
rocprofiler_buffer_tracing_page_migration_unmap_from_gpu_record_t unmap_from_gpu

◆ rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__.__unnamed7__

struct rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__.__unnamed7__

Definition at line 245 of file buffer_tracing.h.

+ Collaboration diagram for rocprofiler_buffer_tracing_page_migration_record_t.__unnamed5__.__unnamed7__:
Data Fields
uint64_t reserved[12]

Typedef Documentation

◆ rocprofiler_buffer_tracing_kind_cb_t

typedef int(* rocprofiler_buffer_tracing_kind_cb_t) (rocprofiler_buffer_tracing_kind_t kind, void *data)

Callback function for mapping rocprofiler_buffer_tracing_kind_t ids to string names.

See also
rocprofiler_iterate_buffer_trace_kind_names.

Definition at line 294 of file buffer_tracing.h.

◆ rocprofiler_buffer_tracing_kind_operation_cb_t

typedef int(* rocprofiler_buffer_tracing_kind_operation_cb_t) (rocprofiler_buffer_tracing_kind_t kind, uint32_t operation, void *data)

Callback function for mapping the operations of a given rocprofiler_buffer_tracing_kind_t to string names.

See also
rocprofiler_iterate_buffer_trace_kind_operation_names.

Definition at line 302 of file buffer_tracing.h.

Enumeration Type Documentation

◆ rocprofiler_page_migration_queue_suspend_trigger_t

Page migration triggers causing the queue to suspend.

Enumerator
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_NONE 
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_SVM 
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_USERPTR 
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_TTM 
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_SUSPEND 
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_CRIU_CHECKPOINT 
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_CRIU_RESTORE 
ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_LAST 

Definition at line 58 of file buffer_tracing.h.

59{
rocprofiler_page_migration_queue_suspend_trigger_t
Page migration triggers causing the queue to suspend.
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_USERPTR
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_CRIU_RESTORE
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_TTM
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_SUSPEND
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_LAST
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_SVM
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_NONE
@ ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND_TRIGGER_CRIU_CHECKPOINT

◆ rocprofiler_page_migration_trigger_t

Page migration triggers.

Enumerator
ROCPROFILER_PAGE_MIGRATION_TRIGGER_NONE 
ROCPROFILER_PAGE_MIGRATION_TRIGGER_PREFETCH 
ROCPROFILER_PAGE_MIGRATION_TRIGGER_PAGEFAULT_GPU 
ROCPROFILER_PAGE_MIGRATION_TRIGGER_PAGEFAULT_CPU 
ROCPROFILER_PAGE_MIGRATION_TRIGGER_TTM_EVICTION 
ROCPROFILER_PAGE_MIGRATION_TRIGGER_LAST 

Definition at line 44 of file buffer_tracing.h.

◆ rocprofiler_page_migration_unmap_from_gpu_trigger_t

Page migration triggers causing an unmap from the GPU.

Enumerator
ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_NONE 
ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_MMU_NOTIFY 
ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_MMU_NOTIFY_MIGRATE 
ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_UNMAP_FROM_CPU 
ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU_TRIGGER_LAST 

Definition at line 74 of file buffer_tracing.h.

Function Documentation

◆ rocprofiler_configure_buffer_tracing_service()

rocprofiler_status_t rocprofiler_configure_buffer_tracing_service ( rocprofiler_context_id_t  context_id,
rocprofiler_buffer_tracing_kind_t  kind,
rocprofiler_tracing_operation_t operations,
unsigned long  operations_count,
rocprofiler_buffer_id_t  buffer_id 
)

Configure Buffer Tracing Service.

Parameters
[in]context_idAssociated context to control activation of service
[in]kindBuffer tracing category
[in]operationsArray of specific operations (if desired)
[in]operations_countNumber of specific operations (if non-null set of operations)
[in]buffer_idBuffer to store the records in
Returns
rocprofiler_status_t
Return values
ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKEDrocprofiler_configure initialization phase has passed
ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUNDcontext is not valid
ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGUREDContext has already been configured for the rocprofiler_buffer_tracing_kind_t kind
ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUNDInvalid rocprofiler_buffer_tracing_kind_t
ROCPROFILER_STATUS_ERROR_OPERATION_NOT_FOUNDInvalid operation id for rocprofiler_buffer_tracing_kind_t kind was found
Examples
api_buffered_tracing/client.cpp.

◆ rocprofiler_iterate_buffer_tracing_kind_operations()

rocprofiler_status_t rocprofiler_iterate_buffer_tracing_kind_operations ( rocprofiler_buffer_tracing_kind_t  kind,
rocprofiler_buffer_tracing_kind_operation_cb_t  callback,
void *  data 
)

Iterates over all the operations for a given rocprofiler_buffer_tracing_kind_t and invokes the callback with the kind and operation id. This is useful to build a map of the operation names during tool initialization instead of querying rocprofiler everytime in the callback hotpath.

Parameters
[in]kindwhich buffer tracing kind operations to iterate over
[in]callbackCallback function invoked for each operation associated with rocprofiler_buffer_tracing_kind_t with the exception of the NONE and LAST values.
[in]dataUser data passed back into the callback

Referenced by rocprofiler::sdk::get_buffer_tracing_names().

+ Here is the caller graph for this function:

◆ rocprofiler_iterate_buffer_tracing_kinds()

rocprofiler_status_t rocprofiler_iterate_buffer_tracing_kinds ( rocprofiler_buffer_tracing_kind_cb_t  callback,
void *  data 
)

Iterate over all the buffer tracing kinds and invokes the callback for each buffer tracing kind.

This is typically used to invoke rocprofiler_iterate_buffer_tracing_kind_operations for each buffer tracing kind.

Parameters
[in]callbackCallback function invoked for each enumeration value in rocprofiler_buffer_tracing_kind_t with the exception of the NONE and LAST values.
[in]dataUser data passed back into the callback

Referenced by rocprofiler::sdk::get_buffer_tracing_names().

+ Here is the caller graph for this function:

◆ rocprofiler_query_buffer_tracing_kind_name()

rocprofiler_status_t rocprofiler_query_buffer_tracing_kind_name ( rocprofiler_buffer_tracing_kind_t  kind,
const char **  name,
uint64_t *  name_len 
)

Query the name of the buffer tracing kind. The name retrieved from this function is a string literal that is encoded in the read-only section of the binary (i.e. it is always "allocated" and never "deallocated").

Parameters
[in]kindBuffer tracing domain
[out]nameIf non-null and the name is a constant string that does not require dynamic allocation, this paramter will be set to the address of the string literal, otherwise it will be set to nullptr
[out]name_lenIf non-null, this will be assigned the length of the name (regardless of the name is a constant string or requires dynamic allocation)
Returns
rocprofiler_status_t
Return values
ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUNDReturned if the domain id is not valid
ROCPROFILER_STATUS_SUCCESSReturned if a valid domain, regardless if there is a constant string or not.
Examples
api_buffered_tracing/client.cpp.

Referenced by rocprofiler::sdk::get_buffer_tracing_names().

+ Here is the caller graph for this function:

◆ rocprofiler_query_buffer_tracing_kind_operation_name()

rocprofiler_status_t rocprofiler_query_buffer_tracing_kind_operation_name ( rocprofiler_buffer_tracing_kind_t  kind,
uint32_t  operation,
const char **  name,
uint64_t *  name_len 
)

Query the name of the buffer tracing kind. The name retrieved from this function is a string literal that is encoded in the read-only section of the binary (i.e. it is always "allocated" and never "deallocated").

Parameters
[in]kindBuffer tracing domain
[in]operationEnumeration id value which maps to a specific API function or event type
[out]nameIf non-null and the name is a constant string that does not require dynamic allocation, this paramter will be set to the address of the string literal, otherwise it will be set to nullptr
[out]name_lenIf non-null, this will be assigned the length of the name (regardless of the name is a constant string or requires dynamic allocation)
Returns
rocprofiler_status_t
Return values
ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUNDAn invalid domain id
ROCPROFILER_STATUS_ERROR_OPERATION_NOT_FOUNDThe operation number is not recognized for the given domain
ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTEDRocprofiler does not support providing the operation name within this domain
ROCPROFILER_STATUS_SUCCESSValid domain and operation, regardless of whether there is a constant string or not.

Referenced by rocprofiler::sdk::get_buffer_tracing_names().

+ Here is the caller graph for this function: