Session Filters Handling#
Data Structures | |
struct | rocprofiler_att_parameter_t |
struct | rocprofiler_filter_property_t |
Filter Data Type filter data will be used to report required and optional filters for the sessions using ::rocprofiler_session_add_filters. More... | |
struct | rocprofiler_spm_parameter_t |
struct | rocprofiler_counters_sampler_counter_input_t |
struct | rocprofiler_counters_sampler_counter_output_t |
struct | rocprofiler_counters_sampler_parameters_t |
struct | rocprofiler_record_counters_sampler_t |
union | rocprofiler_filter_data_t |
Filter Kind Data. More... | |
Typedefs | |
typedef const char * | rocprofiler_hip_function_name_t |
typedef const char * | rocprofiler_hsa_function_name_t |
typedef void(* | rocprofiler_sync_callback_t) (rocprofiler_record_tracer_t record, rocprofiler_session_id_t session_id) |
Synchronous Callback To be only used by rocprofiler_set_api_trace_sync_callback, please refer to rocprofiler_set_api_trace_sync_callback for more details. More... | |
Detailed Description
Typedef Documentation
◆ rocprofiler_hip_function_name_t
typedef const char* rocprofiler_hip_function_name_t |
◆ rocprofiler_hsa_function_name_t
typedef const char* rocprofiler_hsa_function_name_t |
◆ rocprofiler_sync_callback_t
typedef void(* rocprofiler_sync_callback_t) (rocprofiler_record_tracer_t record, rocprofiler_session_id_t session_id) |
Synchronous Callback To be only used by rocprofiler_set_api_trace_sync_callback, please refer to rocprofiler_set_api_trace_sync_callback for more details.
- Parameters
-
[in] record pointer to the record. [in] session_id The session id associated with that record
Enumeration Type Documentation
◆ rocprofiler_att_parameter_name_t
ATT parameters to be used by for collection.
◆ rocprofiler_counters_sampler_counter_type_t
◆ rocprofiler_filter_kind_t
◆ rocprofiler_filter_property_kind_t
Data Filter Types to be used by ::rocprofiler_session_set_filter to add filters to a specific session.
Function Documentation
◆ rocprofiler_create_buffer()
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_buffer | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_buffer_callback_t | buffer_callback, | ||
size_t | buffer_size, | ||
rocprofiler_buffer_id_t * | buffer_id | ||
) |
Create Buffer This function will create a buffer that can be associated with a filter.
- Parameters
-
[in] session_id Session id where these filters will applied to [in] buffer_callback Providing a callback for the buffer specialized for that filters [in] buffer_size Providing size for the buffer that will be created [in] buffer_properties Array of Flush Properties provided by the user [in] buffer_properties_count The count of the flush properties in the array [out] buffer_id Buffer id that was created
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully. ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called ::ROCPROFILER_STATUS_SESSION_NOT_FOUND Couldn't find session associated with the given session identifier ::ROCPROFILER_STATUS_ERROR_SESSION_PROPERTIES_MISMATCH The given properties data are mismatching the properties kind ::ROCPROFILER_STATUS_ERROR_PROPERTY_DATA_CORRUPTED Data can't be read or corrupted
◆ rocprofiler_create_filter()
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_filter | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_filter_kind_t | filter_kind, | ||
rocprofiler_filter_data_t | data, | ||
uint64_t | data_count, | ||
rocprofiler_filter_id_t * | filter_id, | ||
rocprofiler_filter_property_t | property | ||
) |
Create Session Filter This function will create filter and associate it with a specific session For every kind, one filter only is allowed per session.
- Parameters
-
[in] session_id Session id where these filters will applied to [in] filter_kind Filter kind associated with these filters [in] data Pointer to the filter data [in] data_count Count of data in the data array given in ::data [out] filter_id The id of the filter created [in] property property needed for more filteration requests by the user (Only one property is allowed per filter) (Optional)
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully. ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called ::ROCPROFILER_STATUS_SESSION_NOT_FOUND Couldn't find session associated with the given session identifier ROCPROFILER_STATUS_ERROR_SESSION_FILTER_DATA_MISMATCH
The session filter can't accept the given dataROCPROFILER_STATUS_ERROR_FILTER_DATA_CORRUPTED
Data can't be read or corrupted
◆ rocprofiler_destroy_buffer()
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_buffer | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_buffer_id_t | buffer_id | ||
) |
Destroy Buffer This function will destroy a buffer given its id and session id.
- Parameters
-
[in] session_id Session id where these filters will applied to [in] buffer_id Buffer id that will b e destroyed
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully. ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called ::ROCPROFILER_STATUS_SESSION_NOT_FOUND Couldn't find session associated with the given session identifier ::ROCPROFILER_STATUS_BUFFER_NOT_FOUND Couldn't find buffer associated with the given buffer identifier ::ROCPROFILER_STATUS_ERROR_SESSION_PROPERTIES_MISMATCH The given properties data are mismatching the properties kind ::ROCPROFILER_STATUS_ERROR_PROPERTY_DATA_CORRUPTED Data can't be read or corrupted
◆ rocprofiler_destroy_filter()
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_filter | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_filter_id_t | filter_id | ||
) |
Destroy Session Filter This function will destroy a specific filter.
- Parameters
-
[in] session_id Session id where these filters will applied to [in] filter_id The id of the filter
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully. ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called ::ROCPROFILER_STATUS_SESSION_NOT_FOUND Couldn't find session associated with the given session identifier ::ROCPROFILER_STATUS_FILTER_NOT_FOUND Couldn't find session filter
◆ rocprofiler_set_api_trace_sync_callback()
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_api_trace_sync_callback | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_filter_id_t | filter_id, | ||
rocprofiler_sync_callback_t | callback | ||
) |
Set Session API Tracing Filter Synchronous Callback This function will associate buffer to a specific filter.
Currently Synchronous callbacks are only available to API Tracing filters for the api calls tracing and not available for the api activities or any other filter type, the user is responsible to create and set buffer for the other types
- Parameters
-
[in] session_id Session id where these filters will applied to [in] filter_id The id of the filter [in] callback Synchronous callback
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully. ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called ::ROCPROFILER_STATUS_SESSION_NOT_FOUND,Couldn't find session associated with the given session identifier ROCPROFILER_STATUS_ERROR_FILTER_NOT_SUPPORTED
if the filter is not related to API tracing
◆ rocprofiler_set_buffer_properties()
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_buffer_properties | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_buffer_id_t | buffer_id, | ||
rocprofiler_buffer_property_t * | buffer_properties, | ||
uint32_t | buffer_properties_count | ||
) |
Setting Buffer Properties This function will set buffer properties.
- Parameters
-
[in] session_id Session id where the buffer is associated with [in] buffer_id Buffer id of the buffer that the properties are going to be associated with for that filters [in] buffer_properties Array of Flush Properties provided by the user [in] buffer_properties_count The count of the flush properties in the array
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully. ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called ::ROCPROFILER_STATUS_SESSION_NOT_FOUND Couldn't find session associated with the given session identifier ::ROCPROFILER_STATUS_BUFFER_NOT_FOUND Couldn't find buffer associated with the given buffer identifier ::ROCPROFILER_STATUS_ERROR_SESSION_PROPERTIES_MISMATCH The given properties data are mismatching the properties kind ::ROCPROFILER_STATUS_ERROR_PROPERTY_DATA_CORRUPTED Data can't be read or corrupted
◆ rocprofiler_set_filter_buffer()
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_filter_buffer | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_filter_id_t | filter_id, | ||
rocprofiler_buffer_id_t | buffer_id | ||
) |
Set Session Filter Buffer This function will associate buffer to a specific filter.
if the user wants to get the API traces for the api calls synchronously then the user is required to call rocprofiler_set_api_trace_sync_callback
- Parameters
-
[in] session_id Session id where these filters will applied to [in] filter_id The id of the filter [in] buffer_id The id of the buffer
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully. ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,if rocprofiler_initialize wasn't called before or if rocprofiler_finalize is called ::ROCPROFILER_STATUS_SESSION_NOT_FOUND Couldn't find session associated with the given session identifier