rocprofiler-sdk/fwd.h File Reference

rocprofiler-sdk/fwd.h File Reference#

Rocprofiler SDK Developer API: rocprofiler-sdk/fwd.h File Reference
Rocprofiler SDK Developer API 0.5.0
ROCm Profiling API and tools
fwd.h File Reference
#include <rocprofiler-sdk/defines.h>
#include <hsa/hsa_amd_tool.h>
#include <stddef.h>
#include <stdint.h>
+ Include dependency graph for fwd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  rocprofiler_user_data_t
 User-assignable data type. More...
 
struct  rocprofiler_context_id_t
 Context ID. More...
 
struct  rocprofiler_queue_id_t
 Queue ID. More...
 
struct  rocprofiler_correlation_id_t
 ROCProfiler Record Correlation ID. More...
 
struct  rocprofiler_buffer_id_t
 Buffer ID. More...
 
struct  rocprofiler_agent_id_t
 Agent Identifier. More...
 
struct  rocprofiler_counter_id_t
 Counter ID. More...
 
struct  rocprofiler_profile_config_id_t
 Profile Configurations. More...
 
struct  rocprofiler_dim3_t
 Multi-dimensional struct of data used to describe GPU workgroup and grid sizes. More...
 
struct  rocprofiler_callback_tracing_record_t
 Tracing record. More...
 
struct  rocprofiler_record_header_t
 Generic record with type identifier(s) and a pointer to data. This data type is used with buffered data. More...
 
struct  rocprofiler_kernel_dispatch_info_t
 ROCProfiler kernel dispatch information. More...
 
struct  rocprofiler_record_dimension_info_t
 Details for the dimension, including its size, for a counter record. More...
 
struct  rocprofiler_record_counter_t
 ROCProfiler Profile Counting Counter Record per instance. More...
 
struct  rocprofiler_counter_info_v0_t
 Counter info struct version 0. More...
 
struct  rocprofiler_spm_record_t
 ROCProfiler SPM Record. More...
 
union  rocprofiler_record_header_t.__unnamed16__
 
struct  rocprofiler_record_header_t.__unnamed16__.__unnamed18__
 

Macros

#define ROCPROFILER_CORRELATION_ID_INTERNAL_NONE   ROCPROFILER_UINT64_C(0)
 The NULL value of an internal correlation ID.
 

Typedefs

typedef uint64_t rocprofiler_timestamp_t
 ROCProfiler Timestamp.
 
typedef uint64_t rocprofiler_address_t
 ROCProfiler Address.
 
typedef uint64_t rocprofiler_thread_id_t
 Thread ID. Value will be equivalent to syscall(__NR_gettid)
 
typedef int32_t rocprofiler_tracing_operation_t
 Tracing Operation ID. Depending on the kind, operations can be determined. If the value is equal to zero that means all operations will be considered for tracing. Detailed API tracing operations can be found at associated header file for that partiular operation. i.e: For ROCProfiler enumeration of HSA AMD Extended API tracing operations, look at source/include/rocprofiler-sdk/hsa/amd_ext_api_id.h.
 
typedef uint64_t rocprofiler_kernel_id_t
 Kernel identifier type.
 
typedef uint64_t rocprofiler_dispatch_id_t
 
typedef uint64_t rocprofiler_counter_instance_id_t
 Unique record id encoding both the counter and dimensional values (positions) for the record.
 
typedef uint64_t rocprofiler_counter_dimension_id_t
 A dimension for counter instances. Some example dimensions include XCC, SM (Shader), etc. This value represents the dimension beind described or queried about.
 

Enumerations

enum  rocprofiler_status_t {
  ROCPROFILER_STATUS_SUCCESS = 0 ,
  ROCPROFILER_STATUS_ERROR ,
  ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_BUFFER_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_OPERATION_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_THREAD_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_AGENT_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_CONTEXT_ERROR ,
  ROCPROFILER_STATUS_ERROR_CONTEXT_INVALID ,
  ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_STARTED ,
  ROCPROFILER_STATUS_ERROR_CONTEXT_CONFLICT ,
  ROCPROFILER_STATUS_ERROR_BUFFER_BUSY ,
  ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED ,
  ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED ,
  ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED ,
  ROCPROFILER_STATUS_ERROR_INCOMPATIBLE_ABI ,
  ROCPROFILER_STATUS_ERROR_INVALID_ARGUMENT ,
  ROCPROFILER_STATUS_ERROR_METRIC_NOT_VALID_FOR_AGENT ,
  ROCPROFILER_STATUS_ERROR_FINALIZED ,
  ROCPROFILER_STATUS_ERROR_HSA_NOT_LOADED ,
  ROCPROFILER_STATUS_ERROR_DIM_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_PROFILE_COUNTER_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_AST_GENERATION_FAILED ,
  ROCPROFILER_STATUS_ERROR_AST_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_AQL_NO_EVENT_COORD ,
  ROCPROFILER_STATUS_ERROR_INCOMPATIBLE_KERNEL ,
  ROCPROFILER_STATUS_ERROR_OUT_OF_RESOURCES ,
  ROCPROFILER_STATUS_ERROR_PROFILE_NOT_FOUND ,
  ROCPROFILER_STATUS_ERROR_AGENT_DISPATCH_CONFLICT ,
  ROCPROFILER_STATUS_INTERNAL_NO_AGENT_CONTEXT ,
  ROCPROFILER_STATUS_ERROR_SAMPLE_RATE_EXCEEDED ,
  ROCPROFILER_STATUS_ERROR_NO_PROFILE_QUEUE ,
  ROCPROFILER_STATUS_ERROR_NO_HARDWARE_COUNTERS ,
  ROCPROFILER_STATUS_ERROR_AGENT_MISMATCH ,
  ROCPROFILER_STATUS_ERROR_NOT_AVAILABLE ,
  ROCPROFILER_STATUS_ERROR_EXCEEDS_HW_LIMIT ,
  ROCPROFILER_STATUS_LAST
}
 Status codes. More...
 
enum  rocprofiler_buffer_category_t {
  ROCPROFILER_BUFFER_CATEGORY_NONE = 0 ,
  ROCPROFILER_BUFFER_CATEGORY_TRACING ,
  ROCPROFILER_BUFFER_CATEGORY_PC_SAMPLING ,
  ROCPROFILER_BUFFER_CATEGORY_COUNTERS ,
  ROCPROFILER_BUFFER_CATEGORY_LAST
}
 Buffer record categories. This enumeration type is encoded in rocprofiler_record_header_t category field. More...
 
enum  rocprofiler_agent_type_t {
  ROCPROFILER_AGENT_TYPE_NONE = 0 ,
  ROCPROFILER_AGENT_TYPE_CPU ,
  ROCPROFILER_AGENT_TYPE_GPU ,
  ROCPROFILER_AGENT_TYPE_LAST
}
 Agent type. More...
 
enum  rocprofiler_callback_phase_t {
  ROCPROFILER_CALLBACK_PHASE_NONE = 0 ,
  ROCPROFILER_CALLBACK_PHASE_ENTER ,
  ROCPROFILER_CALLBACK_PHASE_LOAD ,
  ROCPROFILER_CALLBACK_PHASE_EXIT ,
  ROCPROFILER_CALLBACK_PHASE_UNLOAD ,
  ROCPROFILER_CALLBACK_PHASE_LAST
}
 Service Callback Phase. More...
 
enum  rocprofiler_callback_tracing_kind_t {
  ROCPROFILER_CALLBACK_TRACING_NONE = 0 ,
  ROCPROFILER_CALLBACK_TRACING_HSA_CORE_API ,
  ROCPROFILER_CALLBACK_TRACING_HSA_AMD_EXT_API ,
  ROCPROFILER_CALLBACK_TRACING_HSA_IMAGE_EXT_API ,
  ROCPROFILER_CALLBACK_TRACING_HSA_FINALIZE_EXT_API ,
  ROCPROFILER_CALLBACK_TRACING_HIP_RUNTIME_API ,
  ROCPROFILER_CALLBACK_TRACING_HIP_COMPILER_API ,
  ROCPROFILER_CALLBACK_TRACING_MARKER_CORE_API ,
  ROCPROFILER_CALLBACK_TRACING_MARKER_CONTROL_API ,
  ROCPROFILER_CALLBACK_TRACING_MARKER_NAME_API ,
  ROCPROFILER_CALLBACK_TRACING_CODE_OBJECT ,
  ROCPROFILER_CALLBACK_TRACING_SCRATCH_MEMORY ,
  ROCPROFILER_CALLBACK_TRACING_KERNEL_DISPATCH ,
  ROCPROFILER_CALLBACK_TRACING_MEMORY_COPY ,
  ROCPROFILER_CALLBACK_TRACING_LAST
}
 Service Callback Tracing Kind. More...
 
enum  rocprofiler_buffer_tracing_kind_t {
  ROCPROFILER_BUFFER_TRACING_NONE = 0 ,
  ROCPROFILER_BUFFER_TRACING_HSA_CORE_API ,
  ROCPROFILER_BUFFER_TRACING_HSA_AMD_EXT_API ,
  ROCPROFILER_BUFFER_TRACING_HSA_IMAGE_EXT_API ,
  ROCPROFILER_BUFFER_TRACING_HSA_FINALIZE_EXT_API ,
  ROCPROFILER_BUFFER_TRACING_HIP_RUNTIME_API ,
  ROCPROFILER_BUFFER_TRACING_HIP_COMPILER_API ,
  ROCPROFILER_BUFFER_TRACING_MARKER_CORE_API ,
  ROCPROFILER_BUFFER_TRACING_MARKER_CONTROL_API ,
  ROCPROFILER_BUFFER_TRACING_MARKER_NAME_API ,
  ROCPROFILER_BUFFER_TRACING_MEMORY_COPY ,
  ROCPROFILER_BUFFER_TRACING_KERNEL_DISPATCH ,
  ROCPROFILER_BUFFER_TRACING_PAGE_MIGRATION ,
  ROCPROFILER_BUFFER_TRACING_SCRATCH_MEMORY ,
  ROCPROFILER_BUFFER_TRACING_CORRELATION_ID_RETIREMENT ,
  ROCPROFILER_BUFFER_TRACING_LAST
}
 Service Buffer Tracing Kind. More...
 
enum  rocprofiler_code_object_operation_t {
  ROCPROFILER_CODE_OBJECT_NONE = 0 ,
  ROCPROFILER_CODE_OBJECT_LOAD ,
  ROCPROFILER_CODE_OBJECT_DEVICE_KERNEL_SYMBOL_REGISTER ,
  ROCPROFILER_CODE_OBJECT_LAST
}
 ROCProfiler Code Object Tracer Operation. More...
 
enum  rocprofiler_memory_copy_operation_t {
  ROCPROFILER_MEMORY_COPY_NONE = 0 ,
  ROCPROFILER_MEMORY_COPY_HOST_TO_HOST ,
  ROCPROFILER_MEMORY_COPY_HOST_TO_DEVICE ,
  ROCPROFILER_MEMORY_COPY_DEVICE_TO_HOST ,
  ROCPROFILER_MEMORY_COPY_DEVICE_TO_DEVICE ,
  ROCPROFILER_MEMORY_COPY_LAST
}
 Memory Copy Operation. More...
 
enum  rocprofiler_page_migration_operation_t {
  ROCPROFILER_PAGE_MIGRATION_NONE = 0 ,
  ROCPROFILER_PAGE_MIGRATION_PAGE_MIGRATE ,
  ROCPROFILER_PAGE_MIGRATION_PAGE_FAULT ,
  ROCPROFILER_PAGE_MIGRATION_QUEUE_SUSPEND ,
  ROCPROFILER_PAGE_MIGRATION_UNMAP_FROM_GPU ,
  ROCPROFILER_PAGE_MIGRATION_LAST
}
 Page migration event. More...
 
enum  rocprofiler_kernel_dispatch_operation_t {
  ROCPROFILER_KERNEL_DISPATCH_NONE = 0 ,
  ROCPROFILER_KERNEL_DISPATCH_ENQUEUE = 1 ,
  ROCPROFILER_KERNEL_DISPATCH_COMPLETE ,
  ROCPROFILER_KERNEL_DISPATCH_LAST ,
  ROCPROFILER_KERNEL_DISPATCH_ENQUEUE = 1 ,
  ROCPROFILER_KERNEL_DISPATCH_COMPLETE
}
 ROCProfiler Kernel Dispatch Tracing Operation Types. More...
 
enum  rocprofiler_pc_sampling_method_t {
  ROCPROFILER_PC_SAMPLING_METHOD_NONE = 0 ,
  ROCPROFILER_PC_SAMPLING_METHOD_STOCHASTIC ,
  ROCPROFILER_PC_SAMPLING_METHOD_HOST_TRAP ,
  ROCPROFILER_PC_SAMPLING_METHOD_LAST
}
 PC Sampling Method. More...
 
enum  rocprofiler_pc_sampling_unit_t {
  ROCPROFILER_PC_SAMPLING_UNIT_NONE = 0 ,
  ROCPROFILER_PC_SAMPLING_UNIT_INSTRUCTIONS ,
  ROCPROFILER_PC_SAMPLING_UNIT_CYCLES ,
  ROCPROFILER_PC_SAMPLING_UNIT_TIME ,
  ROCPROFILER_PC_SAMPLING_UNIT_LAST
}
 PC Sampling Unit. More...
 
enum  rocprofiler_buffer_policy_t {
  ROCPROFILER_BUFFER_POLICY_NONE = 0 ,
  ROCPROFILER_BUFFER_POLICY_DISCARD ,
  ROCPROFILER_BUFFER_POLICY_LOSSLESS ,
  ROCPROFILER_BUFFER_POLICY_LAST
}
 Actions when Buffer is full. More...
 
enum  rocprofiler_scratch_memory_operation_t {
  ROCPROFILER_SCRATCH_MEMORY_NONE = 0 ,
  ROCPROFILER_SCRATCH_MEMORY_ALLOC ,
  ROCPROFILER_SCRATCH_MEMORY_FREE ,
  ROCPROFILER_SCRATCH_MEMORY_ASYNC_RECLAIM ,
  ROCPROFILER_SCRATCH_MEMORY_LAST
}
 Scratch event kind. More...
 
enum  rocprofiler_scratch_alloc_flag_t {
  ROCPROFILER_SCRATCH_ALLOC_FLAG_NONE = 0 ,
  ROCPROFILER_SCRATCH_ALLOC_FLAG_USE_ONCE ,
  ROCPROFILER_SCRATCH_ALLOC_FLAG_ALT
}
 Allocation flags for. More...
 
enum  rocprofiler_runtime_library_t {
  ROCPROFILER_LIBRARY = (1 << 0) ,
  ROCPROFILER_HSA_LIBRARY = (1 << 1) ,
  ROCPROFILER_HIP_LIBRARY = (1 << 2) ,
  ROCPROFILER_MARKER_LIBRARY = (1 << 3) ,
  ROCPROFILER_LIBRARY_LAST = ROCPROFILER_MARKER_LIBRARY
}
 Enumeration for specifying runtime libraries supported by rocprofiler. This enumeration is used for thread creation callbacks. More...
 
enum  rocprofiler_intercept_table_t {
  ROCPROFILER_HSA_TABLE = (1 << 0) ,
  ROCPROFILER_HIP_RUNTIME_TABLE = (1 << 1) ,
  ROCPROFILER_HIP_COMPILER_TABLE = (1 << 2) ,
  ROCPROFILER_MARKER_CORE_TABLE = (1 << 3) ,
  ROCPROFILER_MARKER_CONTROL_TABLE = (1 << 4) ,
  ROCPROFILER_MARKER_NAME_TABLE = (1 << 5) ,
  ROCPROFILER_TABLE_LAST = ROCPROFILER_MARKER_NAME_TABLE
}
 Enumeration for specifying intercept tables supported by rocprofiler. This enumeration is used for intercept tables. More...
 
enum  rocprofiler_counter_info_version_id_t {
  ROCPROFILER_COUNTER_INFO_VERSION_NONE ,
  ROCPROFILER_COUNTER_INFO_VERSION_0 ,
  ROCPROFILER_COUNTER_INFO_VERSION_LAST
}
 Enumeration for specifying the counter info struct version you want. More...
 
enum  rocprofiler_counter_record_kind_t {
  ROCPROFILER_COUNTER_RECORD_NONE = 0 ,
  ROCPROFILER_COUNTER_RECORD_PROFILE_COUNTING_DISPATCH_HEADER ,
  ROCPROFILER_COUNTER_RECORD_VALUE ,
  ROCPROFILER_COUNTER_RECORD_LAST
}
 Enumeration for distinguishing different buffer record kinds within the ROCPROFILER_BUFFER_CATEGORY_COUNTERS category. More...
 
enum  rocprofiler_counter_flag_t {
  ROCPROFILER_COUNTER_FLAG_NONE = 0 ,
  ROCPROFILER_COUNTER_FLAG_ASYNC ,
  ROCPROFILER_COUNTER_FLAG_LAST
}
 Enumeration of flags that can be used with some counter api calls. More...
 
enum  rocprofiler_pc_sampling_record_kind_t {
  ROCPROFILER_PC_SAMPLING_RECORD_NONE = 0 ,
  ROCPROFILER_PC_SAMPLING_RECORD_SAMPLE ,
  ROCPROFILER_PC_SAMPLING_RECORD_CODE_OBJECT_LOAD_MARKER ,
  ROCPROFILER_PC_SAMPLING_RECORD_CODE_OBJECT_UNLOAD_MARKER ,
  ROCPROFILER_PC_SAMPLING_RECORD_LAST
}
 Enumeration for distinguishing different buffer record kinds within the ROCPROFILER_BUFFER_CATEGORY_PC_SAMPLING category. More...