Misc API cleanup and consistency fixes (#1023)

- ROCPROFILER_API after function
- use rocprofiler_tracing_operation_t in lieu of uint32_t where appropriate
- rocprofiler_tracing_operation_t is not int32_t typedef (formerly uint32_t)
- use const T* instead of T* where appropriate
This commit is contained in:
Jonathan R. Madsen
2024-08-20 01:06:12 -05:00
committed by GitHub
parent b15e498945
commit bb25376480
32 changed files with 185 additions and 176 deletions
@@ -95,12 +95,12 @@ get_kind_name(rocprofiler_callback_tracing_kind_t kind, std::index_sequence<Idx,
extern "C" {
rocprofiler_status_t
rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_id,
rocprofiler_callback_tracing_kind_t kind,
rocprofiler_tracing_operation_t* operations,
size_t operations_count,
rocprofiler_callback_tracing_cb_t callback,
void* callback_args)
rocprofiler_configure_callback_tracing_service(rocprofiler_context_id_t context_id,
rocprofiler_callback_tracing_kind_t kind,
const rocprofiler_tracing_operation_t* operations,
size_t operations_count,
rocprofiler_callback_tracing_cb_t callback,
void* callback_args)
{
if(rocprofiler::registration::get_init_status() > -1)
return ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED;
@@ -144,9 +144,9 @@ rocprofiler_query_callback_tracing_kind_name(rocprofiler_callback_tracing_kind_t
rocprofiler_status_t
rocprofiler_query_callback_tracing_kind_operation_name(rocprofiler_callback_tracing_kind_t kind,
uint32_t operation,
const char** name,
uint64_t* name_len)
rocprofiler_tracing_operation_t operation,
const char** name,
uint64_t* name_len)
{
if(kind < ROCPROFILER_CALLBACK_TRACING_NONE || kind >= ROCPROFILER_CALLBACK_TRACING_LAST)
return ROCPROFILER_STATUS_ERROR_KIND_NOT_FOUND;