rocprofiler-sdk/external_correlation.h Source File#
|
ROCprofiler-SDK developer API 1.0.0
ROCm Profiling API and tools
|
external_correlation.h
32 * @brief User-defined correlation identifiers to supplement rocprofiler generated correlation ids
42 * correlation IDs. Typically, rocprofiler-sdk uses the most recent external correlation ID on the
43 * current thread set via ::rocprofiler_push_external_correlation_id; however, this approach can be
45 * ::ROCPROFILER_CALLBACK_PHASE_ENTER callback or if relevant external correlation IDs are desired
48 * overhead for those who only need these callbacks for, say, kernel dispatches while the HSA API is
49 * being traced (i.e. lots of callbacks for HSA API functions). The enumeration below is provided to
50 * ensure that tools can default to using the external correlation IDs set via the push/pop methods
88 * ::ROCPROFILER_BUFFER_TRACING_HSA_CORE_API, the data/record for `hsa_init` will have an operation
91 * @param [out] external_corr_id_value Set this value to the desired external correlation ID value
97 * correlation ID value and the thread-local value for the most recently pushed external correlation
115 * this parameter is null, all tracing operations will invoke the callback to request an external
125 * @retval ::ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND The provided context is not valid/registered
127 * ::rocprofiler_callback_tracing_kind_t value is provided more than once (per context) -- in other
141 * function is a string literal that is encoded in the read-only section of the binary (i.e. it is
148 * @param [out] name_len If non-null, this will be assigned the length of the name (regardless of
165 * External correlation ids are thread-local values. However, if rocprofiler internally requests an
166 * external correlation id on a non-main thread and an external correlation id has not been pushed
167 * for this thread, the external correlation ID will default to the latest external correlation id
169 * thread for, say, the MPI rank or process-wide UUID and this value will be used by all subsequent
int32_t rocprofiler_tracing_operation_t
Tracing Operation ID. Depending on the kind, operations can be determined. If the value is equal to z...
Definition fwd.h:516
uint64_t rocprofiler_thread_id_t
Thread ID. Value will be equivalent to syscall(__NR_gettid)
Definition fwd.h:507
rocprofiler_status_t rocprofiler_configure_external_correlation_id_request_service(rocprofiler_context_id_t context_id, const rocprofiler_external_correlation_id_request_kind_t *kinds, unsigned long kinds_count, rocprofiler_external_correlation_id_request_cb_t callback, void *callback_args)
(experimental) Configure External Correlation ID Request Service.
rocprofiler_status_t rocprofiler_push_external_correlation_id(rocprofiler_context_id_t context, rocprofiler_thread_id_t tid, rocprofiler_user_data_t external_correlation_id)
Push default value for external field in rocprofiler_correlation_id_t onto stack.
rocprofiler_status_t rocprofiler_query_external_correlation_id_request_kind_name(rocprofiler_external_correlation_id_request_kind_t kind, const char **name, uint64_t *name_len)
Query the name of the external correlation request kind. The name retrieved from this function is a s...
int(* rocprofiler_external_correlation_id_request_cb_t)(rocprofiler_thread_id_t thread_id, rocprofiler_context_id_t context_id, rocprofiler_external_correlation_id_request_kind_t kind, rocprofiler_tracing_operation_t operation, uint64_t internal_corr_id_value, rocprofiler_user_data_t *external_corr_id_value, void *data)
(experimental) Callback requesting a value for the external correlation id.
Definition external_correlation.h:101
rocprofiler_status_t rocprofiler_pop_external_correlation_id(rocprofiler_context_id_t context, rocprofiler_thread_id_t tid, rocprofiler_user_data_t *external_correlation_id)
Pop default value for external field in rocprofiler_correlation_id_t off of stack.
rocprofiler_external_correlation_id_request_kind_t
(experimental) ROCProfiler External Correlation ID Operations.
Definition external_correlation.h:56
Generated by