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:
venkat1361
2024-10-22 07:39:25 -05:00
committed by GitHub
parent a92fa8f071
commit 3f91d90bbc
36 changed files with 66 additions and 61 deletions
+1
View File
@@ -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;