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>
Αυτή η υποβολή περιλαμβάνεται σε:
venkat1361καιGopesh Bhardwaj authored and GitHub committed 2024-10-22 18:09:25 +05:30
1 γονέας a92fa8f071
υποβολή 3f91d90bbc
36 files changed
+66 -61

No files matched your search

@@ -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;