rocprofiler-sdk/deprecated/counters.h Source File

rocprofiler-sdk/deprecated/counters.h Source File#

ROCprofiler-SDK developer API: rocprofiler-sdk/deprecated/counters.h Source File
ROCprofiler-SDK developer API 1.0.0
ROCm Profiling API and tools
counters.h
1// MIT License
2//
3// Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All rights reserved.
4//
5// Permission is hereby granted, free of charge, to any person obtaining a copy
6// of this software and associated documentation files (the "Software"), to deal
7// in the Software without restriction, including without limitation the rights
8// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9// copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in all
13// copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21// SOFTWARE.
22
23#pragma once
24
25#include <rocprofiler-sdk/agent.h>
26#include <rocprofiler-sdk/defines.h>
27#include <rocprofiler-sdk/fwd.h>
28
29ROCPROFILER_EXTERN_C_INIT
30
31/**
32 * @brief (deprecated) Callback that gives a list of available dimensions for a counter
33 *
34 * @param [in] id Counter id the dimension data is for
35 * @param [in] dim_info An array of dimensions for the counter
36 * ::rocprofiler_iterate_counter_dimensions was called on.
37 * @param [in] num_dims Number of dimensions
38 * @param [in] user_data User data supplied by
39 * ::rocprofiler_iterate_agent_supported_counters
40 */
41ROCPROFILER_SDK_DEPRECATED(
42 "Function using this alias has been deprecated. See rocprofiler_iterate_counter_dimensions")
43typedef rocprofiler_status_t (*rocprofiler_available_dimensions_cb_t)(
46 size_t num_dims,
47 void* user_data);
48
49/**
50 * @brief (deprecated) Return information about the dimensions that exists for a specific counter
51 * and the extent of each dimension.
52 *
53 * @param [in] id counter id to query dimension info for.
54 * @param [in] info_cb Callback to return dimension information for counter
55 * @param [in] user_data data to pass into the callback
56 * @return ::rocprofiler_status_t
57 * @retval ROCPROFILER_STATUS_SUCCESS if dimension exists
58 * @retval ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND if counter is not found
59 * @retval ROCPROFILER_STATUS_ERROR_DIM_NOT_FOUND if counter does not have this dimension
60 */
61ROCPROFILER_SDK_DEPRECATED("Information now available in rocprofiler_counter_info_v1_t. "
62 "This function will be removed in the future.")
64rocprofiler_iterate_counter_dimensions(rocprofiler_counter_id_t id,
65 rocprofiler_available_dimensions_cb_t info_cb,
66 void* user_data) ROCPROFILER_API;
67
68/**
69 * @brief (deprecated) This call returns the number of instances specific counter contains.
70 *
71 * @param [in] agent_id rocprofiler agent identifier
72 * @param [in] counter_id counter id (obtained from iterate_agent_supported_counters)
73 * @param [out] instance_count number of instances the counter has
74 * @return ::rocprofiler_status_t
75 * @retval ROCPROFILER_STATUS_SUCCESS if counter found
76 * @retval ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND if counter not found
77 */
78ROCPROFILER_SDK_DEPRECATED("Information now available in rocprofiler_counter_info_v1_t. "
79 "This function will be removed in the future.")
81rocprofiler_query_counter_instance_count(rocprofiler_agent_id_t agent_id,
82 rocprofiler_counter_id_t counter_id,
83 size_t* instance_count) ROCPROFILER_API
84 ROCPROFILER_NONNULL(3);
85
86ROCPROFILER_EXTERN_C_FINI
rocprofiler_status_t
Status codes.
Definition fwd.h:49
Agent Identifier.
Definition fwd.h:677
Counter ID.
Definition fwd.h:685
(experimental) Details for the dimension, including its size, for a counter record.
Definition fwd.h:818
(experimental) Counter info struct version 1. Combines information from rocprofiler_counter_info_v0_t...
Definition counters.h:116