rocprofiler-sdk/spm.h Source File

rocprofiler-sdk/spm.h Source File#

ROCprofiler-SDK developer API: rocprofiler-sdk/spm.h Source File
ROCprofiler-SDK developer API 1.0.0
ROCm Profiling API and tools
spm.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/defines.h>
26#include <rocprofiler-sdk/fwd.h>
27
28ROCPROFILER_EXTERN_C_INIT
29
30/**
31 * @defgroup SPM_SERVICE SPM Service
32 * @brief Streaming Performance Monitoring
33 *
34 * @{
35 */
36
37/**
38 * @brief (experimental) ROCProfiler SPM Record.
39 *
40 */
41typedef struct ROCPROFILER_SDK_EXPERIMENTAL rocprofiler_spm_record_t
42{
43 /**
44 * Counters, including identifiers to get counter information and Counters
45 * values
46 */
48 uint64_t counters_count;
50
51/**
52 * @brief Configure SPM Service.
53 *
54 * @param [in] context_id
55 * @param [in] buffer_id
56 * @param [in] counter_config
57 * @param [in] interval
58 * @return ::rocprofiler_status_t
59 */
60ROCPROFILER_SDK_EXPERIMENTAL
65 uint64_t interval) ROCPROFILER_API;
66
67/** @} */
68
69ROCPROFILER_EXTERN_C_FINI
rocprofiler_status_t
Status codes.
Definition fwd.h:49
Context ID.
Definition fwd.h:600
Profile Configurations.
Definition fwd.h:694
(experimental) ROCProfiler Profile Counting Counter Record per instance.
Definition fwd.h:835
rocprofiler_counter_record_t * counters
Definition spm.h:47
rocprofiler_status_t rocprofiler_configure_spm_service(rocprofiler_context_id_t context_id, rocprofiler_buffer_id_t buffer_id, rocprofiler_counter_config_id_t counter_config, uint64_t interval)
Configure SPM Service.
(experimental) ROCProfiler SPM Record.
Definition spm.h:42