Check to force tools to initialize the ctx id to zero. (#1135)
* Check to force tool to initialize the ctx id to zero. * initialize rocprofiler_context_id_t with 0 in units tests * changelog --------- Co-authored-by: Gopesh Bhardwaj <gopesh.bhardwaj@amd.com>
This commit is contained in:
@@ -68,6 +68,7 @@ typedef enum // NOLINT(performance-enum-size)
|
||||
///< into active array failed)
|
||||
ROCPROFILER_STATUS_ERROR_CONTEXT_CONFLICT, ///< Context operation failed due to a conflict with
|
||||
///< another context
|
||||
ROCPROFILER_STATUS_ERROR_CONTEXT_ID_NOT_ZERO, ///< Context ID is not initialized to zero
|
||||
ROCPROFILER_STATUS_ERROR_BUFFER_BUSY, ///< buffer operation failed because it currently busy
|
||||
///< handling another request (e.g. flushing)
|
||||
ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED, ///< service has already been configured
|
||||
|
||||
@@ -153,7 +153,7 @@ rocprofiler_is_finalized(int* status) ROCPROFILER_API ROCPROFILER_NONNULL(1);
|
||||
*
|
||||
* assert(*static_cast<int*>(tool_data) == 1234 && "tool_data is wrong");
|
||||
*
|
||||
* rocprofiler_context_id_t ctx;
|
||||
* rocprofiler_context_id_t ctx{0};
|
||||
* rocprofiler_create_context(&ctx);
|
||||
*
|
||||
* if(int valid_ctx = 0;
|
||||
|
||||
Reference in New Issue
Block a user