This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

Memory Storage Buffer

Memory Storage Buffer#

rocprofiler: Memory Storage Buffer

Sessions. More...

Data Structures

struct  rocprofiler_buffer_property_t
 
struct  rocprofiler_buffer_id_t
 
struct  rocprofiler_filter_id_t
 

Typedefs

typedef void(* rocprofiler_buffer_callback_t) (const rocprofiler_record_header_t *begin, const rocprofiler_record_header_t *end, rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id)
 Memory pool buffer callback. More...
 

Enumerations

enum  rocprofiler_buffer_property_kind_t { ROCPROFILER_BUFFER_PROPERTY_KIND_INTERVAL_FLUSH = 0 }
 Buffer Property Options. More...
 

Functions

ROCPROFILER_API rocprofiler_status_t rocprofiler_flush_data (rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
 Flush specific Buffer. More...
 
ROCPROFILER_API rocprofiler_status_t rocprofiler_next_record (const rocprofiler_record_header_t *record, const rocprofiler_record_header_t **next, rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
 Get a pointer to the next profiling record. More...
 

Detailed Description

Sessions.

In this group, Memory Pools and their types will be discussed.

Typedef Documentation

◆ rocprofiler_buffer_callback_t

typedef void(* rocprofiler_buffer_callback_t) (const rocprofiler_record_header_t *begin, const rocprofiler_record_header_t *end, rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id)

Memory pool buffer callback.

The callback that will be invoked when a memory pool buffer becomes full or is flushed by the user or using flush thread that was initiated using the flush interval set by the user rocprofiler_create_session. The user needs to read the record header to identify the record kind and depending on the kind they can reinterpret_cast to either rocprofiler_record_profiler_t if the kind was ROCPROFILER_PROFILER_RECORD or rocprofiler_record_tracer_t if the kind is ROCPROFILER_TRACER_RECORD

Parameters
[in]beginpointer to first entry in the buffer.
[in]endpointer to one past the end entry in the buffer.
[in]session_idThe session id associated with that record
[in]buffer_idThe buffer id associated with that record

Enumeration Type Documentation

◆ rocprofiler_buffer_property_kind_t

Buffer Property Options.

Enumerator
ROCPROFILER_BUFFER_PROPERTY_KIND_INTERVAL_FLUSH 

Flush interval.

Function Documentation

◆ rocprofiler_flush_data()

ROCPROFILER_API rocprofiler_status_t rocprofiler_flush_data ( rocprofiler_session_id_t  session_id,
rocprofiler_buffer_id_t  buffer_id 
)

Flush specific Buffer.

Parameters
[in]session_idThe created session id
[in]buffer_idThe buffer ID of the created filter group
Return values
ROCPROFILER_STATUS_SUCCESSThe function has been executed successfully.
ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,ifrocprofiler_initialize wasn't called before or if rocprofiler_finalize is called
ROCPROFILER_STATUS_ERROR_SESSION_NOT_FOUND
may return if the session is not found
ROCPROFILER_STATUS_ERROR_CORRUPTED_SESSION_BUFFER
may return if the session buffer is corrupted

◆ rocprofiler_next_record()

ROCPROFILER_API rocprofiler_status_t rocprofiler_next_record ( const rocprofiler_record_header_t record,
const rocprofiler_record_header_t **  next,
rocprofiler_session_id_t  session_id,
rocprofiler_buffer_id_t  buffer_id 
)

Get a pointer to the next profiling record.

A memory pool generates buffers that contain multiple profiling records. This function steps to the next profiling record.

Parameters
[in]recordPointer to the current profiling record in a memory pool buffer.
[out]nextPointer to the following profiling record in the memory pool buffer.
[in]session_idSession ID
[in]buffer_idBuffer ID
Return values
ROCPROFILER_STATUS_SUCCESSThe function has been executed successfully.
ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED,ifrocprofiler_initialize wasn't called before or if rocprofiler_finalize is called
ROCPROFILER_STATUS_ERROR_RECORD_CORRUPTED
if the function couldn't get the next record because of corrupted data reported by the previous record