Initialization and Finalization

Initialization and Finalization#

ROCTracer: Initialization and Finalization
Initialization and Finalization

The ROCtracer Plugin API must be initialized before using any of the operations to report trace data, and finalized after the last trace data has been reported. More...

Functions

ROCTRACER_EXPORT int roctracer_plugin_initialize (uint32_t roctracer_major_version, uint32_t roctracer_minor_version)
 Initialize plugin. More...
 
ROCTRACER_EXPORT void roctracer_plugin_finalize ()
 Finalize plugin. More...
 

Detailed Description

The ROCtracer Plugin API must be initialized before using any of the operations to report trace data, and finalized after the last trace data has been reported.

Function Documentation

◆ roctracer_plugin_finalize()

ROCTRACER_EXPORT void roctracer_plugin_finalize ( )

Finalize plugin.

This must be called after roctracer_plugin_initialize and after all trace data has been reported by roctracer_plugin_write_callback_record and roctracer_plugin_write_activity_records.

◆ roctracer_plugin_initialize()

ROCTRACER_EXPORT int roctracer_plugin_initialize ( uint32_t  roctracer_major_version,
uint32_t  roctracer_minor_version 
)

Initialize plugin.

Must be called before any other operation.

Parameters
[in]roctracer_major_versionThe major version of the ROCtracer API being used by the ROCtracer Tool. An error is reported if this does not match the major version of the ROCtracer API used to build the plugin library. This ensures compatibility of the trace data format.
[in]roctracer_minor_versionThe minor version of the ROCtracer API being used by the ROCtracer Tool. An error is reported if the roctracer_major_version matches and this is greater than the minor version of the ROCtracer API used to build the plugin library. This ensures compatibility of the trace data format.
Returns
Returns 0 on success and -1 on error.