This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocprofiler-docs/checkouts/amd-master/include/rocprofiler/v2/rocprofiler.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocprofiler-docs/checkouts/amd-master/include/rocprofiler/v2/rocprofiler.h Source File#

rocprofiler: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocprofiler-docs/checkouts/amd-master/include/rocprofiler/v2/rocprofiler.h Source File
rocprofiler.h
Go to the documentation of this file.
1 /******************************************************************************
2 Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 *******************************************************************************/
22 
24 //
25 // ROC Profiler API
26 //
27 // The goal of the implementation is to provide a HW specific low-level
28 // performance analysis interface for profiling of GPU compute applications.
29 // The profiling includes HW performance counters (PMC) with complex
30 // performance metrics and traces.
31 //
32 // The library can be used by a tool library loaded by HSA runtime or by
33 // higher level HW independent performance analysis API like PAPI.
34 //
35 // The library is written on C and will be based on AQLprofile AMD specific
36 // HSA extension. The library implementation requires HSA API intercepting and
37 // a profiling queue supporting a submit callback interface.
38 //
39 //
160 //
165 
167 #ifndef INC_ROCPROFILER_H_
168 #define INC_ROCPROFILER_H_
169 
170 /* Placeholder for calling convention and import/export macros */
171 #if !defined(ROCPROFILER_CALL)
172 #define ROCPROFILER_CALL
173 #endif /* !defined (ROCPROFILER_CALL) */
174 
175 #if !defined(ROCPROFILER_EXPORT_DECORATOR)
176 #if defined(__GNUC__)
177 #define ROCPROFILER_EXPORT_DECORATOR __attribute__((visibility("default")))
178 #elif defined(_MSC_VER)
179 #define ROCPROFILER_EXPORT_DECORATOR __declspec(dllexport)
180 #endif /* defined (_MSC_VER) */
181 #endif /* !defined (ROCPROFILER_EXPORT_DECORATOR) */
182 
183 #if !defined(ROCPROFILER_IMPORT_DECORATOR)
184 #if defined(__GNUC__)
185 #define ROCPROFILER_IMPORT_DECORATOR
186 #elif defined(_MSC_VER)
187 #define ROCPROFILER_IMPORT_DECORATOR __declspec(dllimport)
188 #endif /* defined (_MSC_VER) */
189 #endif /* !defined (ROCPROFILER_IMPORT_DECORATOR) */
190 
191 #define ROCPROFILER_EXPORT ROCPROFILER_EXPORT_DECORATOR ROCPROFILER_CALL
192 #define ROCPROFILER_IMPORT ROCPROFILER_IMPORT_DECORATOR ROCPROFILER_CALL
193 
194 #if !defined(ROCPROFILER)
195 #if defined(ROCPROFILER_EXPORTS)
196 #define ROCPROFILER_API ROCPROFILER_EXPORT
197 #else /* !defined (ROCPROFILER_EXPORTS) */
198 #define ROCPROFILER_API ROCPROFILER_IMPORT
199 #endif /* !defined (ROCPROFILER_EXPORTS) */
200 #endif /* !defined (ROCPROFILER) */
201 
202 #include <stddef.h>
203 #include <stdint.h>
204 
205 #ifdef __cplusplus
206 extern "C" {
207 #endif /* __cplusplus */
208 
228 #define ROCPROFILER_VERSION_9_0
229 
249 #define ROCPROFILER_VERSION_MAJOR 9
250 
255 #define ROCPROFILER_VERSION_MINOR 0
256 
265 
274 
277 // TODO(aelwazir): Fix them to use the new Error codes
288 typedef enum {
448 
459 
466 // TODO(aelwazir): More clear description, (think about nested!!??)
467 
477 
487 
497 typedef struct {
502  uint64_t handle;
504 
520 typedef struct {
521  uint64_t value;
523 
535 
540 typedef struct {
544 
554 typedef struct {
558  uint64_t handle;
560 
564 typedef enum {
591 
595 typedef struct {
605 
616 typedef struct {
621  uint64_t handle; // Topology folder serial number
623 
629 typedef enum {
639 
640 // TODO(aelwazir): check if we need to report the family name as well!!?? OR
641 // return the agent itself so that they can use HSA API
645 typedef enum {
655 
675  size_t* data_size) ROCPROFILER_VERSION_9_0;
676 
696  const char** name) ROCPROFILER_VERSION_9_0;
697 
710 typedef struct {
714  uint64_t handle;
716 
717 // TODO(aelwazir): Check if there is anymore Queue Information needed
721 typedef enum {
727 
748  size_t* data_size) ROCPROFILER_VERSION_9_0;
749 
769  const char** name) ROCPROFILER_VERSION_9_0;
770 
781 typedef struct {
785  uint64_t handle;
787 
791 typedef enum {
797 
819  size_t* data_size) ROCPROFILER_VERSION_9_0;
820 
840  const char** data) ROCPROFILER_VERSION_9_0;
841 
847 typedef struct {
851  uint32_t value;
853 
873 typedef struct {
874  const char* name;
875  const char* description;
876  const char* expression;
877  uint32_t instances_count;
878  const char* block_name;
879  uint32_t block_counters;
881 
883  const char* gpu_name,
884  uint32_t gpu_index) ROCPROFILER_VERSION_9_0;
885 
888 
893 typedef struct {
897  uint64_t handle;
899 
903 typedef enum {
918 
940  rocprofiler_session_id_t session_id, rocprofiler_counter_info_kind_t counter_info_type,
941  rocprofiler_counter_id_t counter_id, size_t* data_size) ROCPROFILER_VERSION_9_0;
942 
963  rocprofiler_counter_id_t counter_id, const char** data) ROCPROFILER_VERSION_9_0;
964 
965 typedef struct {
969  uint64_t value;
971 
972 // TODO(aelwazir): add more types to the values should we use unions??!!
976 typedef struct {
980  double value;
982 
988 typedef struct {
998 
1004 typedef struct {
1008  uint64_t value;
1010 
1016 typedef struct {
1020  uint64_t grid_size;
1024  uint64_t workgroup_size;
1028  uint64_t lds_size;
1032  uint64_t scratch_size;
1044  uint64_t sgpr_count;
1048  uint64_t wave_size;
1052  uint64_t signal_handle;
1053 
1055 
1059 typedef struct {
1060  uint64_t value;
1062 
1070 typedef struct {
1108  uint32_t xcc_index;
1127 
1128 typedef struct {
1129  uint32_t value;
1130 
1132 
1133 typedef struct {
1134  uint16_t value; // Counter Value
1135 
1137 
1142 typedef struct {
1144 
1146 
1147 
1154 typedef struct {
1160 
1168  rocprofiler_record_se_spm_data_t shader_engine_data[4];
1169 
1171 
1175 typedef struct {
1176  void* buffer_ptr;
1177  uint32_t buffer_size;
1179 
1183 typedef struct {
1187  const char* filepath;
1191  uint64_t base_address;
1195  uint64_t mem_size;
1199  const char* data;
1203  uint64_t data_size;
1216  uint32_t att_marker_id;
1218 
1222 typedef enum {
1237 
1241 typedef struct {
1249  uint64_t count;
1254  uint64_t userdata;
1256 
1264 typedef struct {
1301  uint64_t writer_id;
1315 
1316 
1326 typedef enum {
1355  // TODO(aelwazir): Used in kernel Info, memcpy, ..etc, refer to hsa_support
1356  // TODO(aelwazir): Move HSA Events to hsa_support
1363 
1367 typedef struct {
1368  uint32_t id;
1370 
1374 typedef struct {
1378  uint64_t value;
1380 
1384 typedef struct {
1385  union {
1386  const struct hip_api_data_s* hip;
1387  const struct hsa_api_data_s* hsa;
1388  const struct roctx_api_data_s* roctx;
1389  };
1391 
1406  const char** name);
1407 
1418  rocprofiler_tracer_operation_id_t* operation_id);
1419 
1423 typedef struct {
1424  uint64_t id;
1426 
1427 typedef enum {
1441 
1449 typedef struct {
1500  const char* name;
1502 
1506 typedef struct {
1507  uint64_t value;
1509 
1513 typedef struct {
1519  union {
1527  uint64_t cycle;
1528  };
1532  uint64_t pc;
1536  uint32_t se;
1542 
1547 typedef struct {
1558 
1571 typedef enum {
1576  // Periodic Flush
1577  // Size
1578  // Think of using the kind as an end of the array!!??
1580 
1581 typedef struct {
1583  uint64_t value;
1585 
1586 typedef struct {
1587  uint64_t value;
1589 
1590 typedef struct {
1591  uint64_t value;
1593 
1610  const rocprofiler_record_header_t* end,
1611  rocprofiler_session_id_t session_id,
1612  rocprofiler_buffer_id_t buffer_id);
1613 
1630 
1651  const rocprofiler_record_header_t* record, const rocprofiler_record_header_t** next,
1653 
1663 typedef enum {
1670 
1704 
1722 
1728 typedef enum {
1758 
1763 typedef enum {
1776  // TODO(aelwazir): Add more clear description on how to use?
1790 
1791 // TODO(aelwazir): Another way to define this as needed
1794 
1798 typedef enum {
1844 
1850 
1851 
1852 // att tracing parameters object
1853 typedef struct {
1855  union {
1856  uint32_t value;
1857  const char* counter_name;
1858  };
1860 
1866 typedef struct {
1871  // TODO(aelwazir): get HIP or HSA or counters as enums
1875  union {
1876  const char** name_regex;
1879  uint32_t range[2];
1880  struct {
1881  uint64_t start;
1882  uint64_t end;
1883  }* dispatch_ids;
1884  };
1888  uint64_t data_count;
1890 
1891 typedef struct {
1895  const char** counters_names;
1903  uint32_t sampling_rate;
1908 
1910 
1911 typedef enum {
1915 
1916 typedef struct {
1917  char* name;
1920 
1921 typedef struct {
1925 
1926 typedef struct {
1938  uint32_t sampling_rate;
1946  uint32_t initial_delay;
1952 
1953 typedef struct {
1972  uint32_t num_counters;
1974 
1978 typedef union {
1986  const char** counters_names;
2000 
2025  rocprofiler_session_id_t session_id, rocprofiler_filter_kind_t filter_kind,
2026  rocprofiler_filter_data_t data, uint64_t data_count, rocprofiler_filter_id_t* filter_id,
2028 
2047  rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id,
2049 
2059  rocprofiler_session_id_t session_id);
2060 
2083  rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id,
2085 
2102 
2127  rocprofiler_session_id_t session_id, rocprofiler_buffer_callback_t buffer_callback,
2128  size_t buffer_size, rocprofiler_buffer_id_t* buffer_id) ROCPROFILER_VERSION_9_0;
2129 
2154  rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id,
2155  rocprofiler_buffer_property_t* buffer_properties,
2156  uint32_t buffer_properties_count) ROCPROFILER_VERSION_9_0;
2157 
2179 
2229  rocprofiler_replay_mode_t replay_mode, rocprofiler_filter_kind_t filter_kind,
2230  rocprofiler_filter_data_t data, uint64_t data_count, size_t buffer_size,
2231  rocprofiler_buffer_callback_t buffer_callback, rocprofiler_session_id_t* session_id,
2234 
2235 // TODO(aelwazir): Multiple sessions activate for different set of filters
2257 
2274 
2281 typedef struct {
2282  double value;
2284 
2285 typedef struct {
2286  char metric_name[64];
2289 
2308  const char** counter_names, uint64_t num_counters, rocprofiler_session_id_t* session_id,
2309  int cpu_index, int gpu_index) ROCPROFILER_VERSION_9_0;
2310 
2321 
2335  rocprofiler_session_id_t session_id,
2337 
2348 
2358 
2372  uint64_t userdata
2373 );
2374 
2386 
2395 
2404 
2414 
2417 #ifdef __cplusplus
2418 } // extern "C" block
2419 #endif // __cplusplus
2420 
2421 #endif // INC_ROCPROFILER_H_
ROCPROFILER_API rocprofiler_status_t rocprofiler_codeobj_capture_start(rocprofiler_record_id_t id)
Records the current loaded codeobjs and any following loads until stop() is called.
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_destroy(rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
Destroy the device profiling session that was created previously.
ROCPROFILER_API rocprofiler_status_t rocprofiler_codeobj_capture_free(rocprofiler_record_id_t id)
API to delete a record.
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_stop(rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
Stop the device profiling session that was created previously.
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_create(const char **counter_names, uint64_t num_counters, rocprofiler_session_id_t *session_id, int cpu_index, int gpu_index) ROCPROFILER_VERSION_9_0
Create a device profiling session.
ROCPROFILER_API rocprofiler_status_t rocprofiler_codeobj_capture_stop(rocprofiler_record_id_t id)
Stops recording of future codeobjs, until start() is called again.
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_poll(rocprofiler_session_id_t session_id, rocprofiler_device_profile_metric_t *data) ROCPROFILER_VERSION_9_0
Poll the device profiling session to read counters from the GPU device.
ROCPROFILER_API rocprofiler_status_t rocprofiler_codeobj_capture_get(rocprofiler_record_id_t id, rocprofiler_codeobj_symbols_t *capture)
API to get the captured codeobj.
ROCPROFILER_API rocprofiler_status_t rocprofiler_codeobj_capture_create(rocprofiler_record_id_t *id, rocprofiler_codeobj_capture_mode_t mode, uint64_t userdata)
Creates a codeobj capture record, returned in ID.
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_start(rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
Start the device profiling session that was created previously.
rocprofiler_record_kind_t
Record kind.
Definition: rocprofiler.h:564
@ ROCPROFILER_PC_SAMPLING_RECORD
Represents a PC sampling record.
Definition: rocprofiler.h:581
@ ROCPROFILER_TRACER_RECORD
Represents records that have tracing data (ex.
Definition: rocprofiler.h:573
@ ROCPROFILER_COUNTERS_SAMPLER_RECORD
Represents Counters sampler records.
Definition: rocprofiler.h:589
@ ROCPROFILER_PROFILER_RECORD
Represents records that have profiling data (ex.
Definition: rocprofiler.h:569
@ ROCPROFILER_SPM_RECORD
Represents SPM records.
Definition: rocprofiler.h:585
@ ROCPROFILER_ATT_TRACER_RECORD
Represents a ATT tracing record (Not available yet)
Definition: rocprofiler.h:577
void(* rocprofiler_buffer_callback_t)(const rocprofiler_record_header_t *begin, const rocprofiler_record_header_t *end, rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id)
Memory pool buffer callback.
Definition: rocprofiler.h:1609
ROCPROFILER_API rocprofiler_status_t rocprofiler_next_record(const rocprofiler_record_header_t *record, const rocprofiler_record_header_t **next, rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
Get a pointer to the next profiling record.
rocprofiler_buffer_property_kind_t
Buffer Property Options.
Definition: rocprofiler.h:1571
ROCPROFILER_API rocprofiler_status_t rocprofiler_flush_data(rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
Flush specific Buffer.
@ ROCPROFILER_BUFFER_PROPERTY_KIND_INTERVAL_FLUSH
Flush interval.
Definition: rocprofiler.h:1575
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_counter_info_size(rocprofiler_session_id_t session_id, rocprofiler_counter_info_kind_t counter_info_type, rocprofiler_counter_id_t counter_id, size_t *data_size) ROCPROFILER_VERSION_9_0
Query Counter Information Data size to allow the user to allocate the right size for the information ...
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_counter_info(rocprofiler_session_id_t session_id, rocprofiler_counter_info_kind_t kind, rocprofiler_counter_id_t counter_id, const char **data) ROCPROFILER_VERSION_9_0
Query Counter Information Data using an allocated data pointer by the user, user can get the size of ...
rocprofiler_counter_info_kind_t
Counter Information Types, can be used by rocprofiler_query_counter_info.
Definition: rocprofiler.h:903
ROCPROFILER_API rocprofiler_status_t rocprofiler_iterate_counters(rocprofiler_counters_info_callback_t counters_info_callback) ROCPROFILER_VERSION_9_0
rocprofiler_codeobj_capture_mode_t
Enum defines how code object is captured for ATT and PC Sampling.
Definition: rocprofiler.h:1222
int(* rocprofiler_counters_info_callback_t)(rocprofiler_counter_info_t counter, const char *gpu_name, uint32_t gpu_index) ROCPROFILER_VERSION_9_0
Definition: rocprofiler.h:882
@ ROCPROFILER_COUNTER_NAME
Can be used to get the counter name.
Definition: rocprofiler.h:907
@ ROCPROFILER_COUNTER_BLOCK_ID
Can be used to get the block id of a counter.
Definition: rocprofiler.h:911
@ ROCPROFILER_COUNTER_HIERARCHY_LEVEL
This is the level of hierarchy from the GFX_IP where the counter value should be collected.
Definition: rocprofiler.h:916
@ ROCPROFILER_CAPTURE_COPY_MEMORY
Capture symbols for file:// and memory:// type objects, and generate a copy of all kernel code for ob...
Definition: rocprofiler.h:1231
@ ROCPROFILER_CAPTURE_SYMBOLS_ONLY
Capture file and memory paths for the loaded code object.
Definition: rocprofiler.h:1226
@ ROCPROFILER_CAPTURE_COPY_FILE_AND_MEMORY
Capture symbols and all kernel code for file:// and memory:// type objects.
Definition: rocprofiler.h:1235
const char ** counters_names
Counters to profile.
Definition: rocprofiler.h:1895
int counters_count
Counters count.
Definition: rocprofiler.h:1899
rocprofiler_filter_property_kind_t kind
Filter Property kind.
Definition: rocprofiler.h:1870
uint64_t workgroup_size
workgroup size
Definition: rocprofiler.h:1024
uint64_t lds_size
lds_size
Definition: rocprofiler.h:1028
uint64_t userdata
Userdata space for custom capture.
Definition: rocprofiler.h:1254
uint32_t initial_delay
Initial delay (ms)
Definition: rocprofiler.h:1946
const struct hsa_api_data_s * hsa
Definition: rocprofiler.h:1387
rocprofiler_counters_sampler_counter_output_t * counters
Counters, including identifiers to get counter information and Counters values.
Definition: rocprofiler.h:1968
rocprofiler_timestamp_t timestamp
Host timestamp.
Definition: rocprofiler.h:1523
uint64_t handle
Session Identifier to get the session or to be used to call any API that needs to deal with a specifi...
Definition: rocprofiler.h:502
uint32_t se
Sampled shader element.
Definition: rocprofiler.h:1536
uint64_t value
Definition: rocprofiler.h:1591
const rocprofiler_intercepted_codeobj_t * symbols
List of symbols.
Definition: rocprofiler.h:1245
rocprofiler_kernel_properties_t kernel_properties
kernel properties, including the grid size, work group size, registers count, wave size and completio...
Definition: rocprofiler.h:1289
uint32_t att_marker_id
Identifier for code object loading.
Definition: rocprofiler.h:1216
uint64_t shader_engine_data_count
The count of the shader engine ATT data.
Definition: rocprofiler.h:1309
rocprofiler_thread_id_t thread_id
Thread id.
Definition: rocprofiler.h:1293
rocprofiler_tracer_api_data_t api_data
API Data.
Definition: rocprofiler.h:1470
uint64_t handle
Kernel object identifier.
Definition: rocprofiler.h:785
uint64_t cycle
GPU clock counter (not currently used)
Definition: rocprofiler.h:1527
rocprofiler_kernel_id_t kernel_id
Kernel Identifier to be used by the user to get the kernel info using rocprofiler_query_kernel_info.
Definition: rocprofiler.h:1274
rocprofiler_agent_id_t gpu_id
Agent Identifier to be used by the user to get the Agent Information using rocprofiler_query_agent_in...
Definition: rocprofiler.h:1085
rocprofiler_kernel_properties_t kernel_properties
kernel properties, including the grid size, work group size, registers count, wave size and completio...
Definition: rocprofiler.h:1113
uint32_t sampling_duration
Total sampling duration (ms); time between sampling start/stop.
Definition: rocprofiler.h:1942
uint64_t value
Correlation ID Value.
Definition: rocprofiler.h:1378
uint32_t num_counters
Number of counter values.
Definition: rocprofiler.h:1972
uint32_t instances_count
Definition: rocprofiler.h:877
rocprofiler_api_tracing_phase_t phase
API Tracing phase (Enter/Exit/None(Activity Records/Asynchronous Output Records))
Definition: rocprofiler.h:1496
rocprofiler_correlation_id_t correlation_id
Correlation id.
Definition: rocprofiler.h:1125
const char * data
If a copy of the codeobj is made, contains the data.
Definition: rocprofiler.h:1199
uint32_t value
Definition: rocprofiler.h:1856
rocprofiler_tracer_operation_id_t operation_id
Tracing Operation ID for HIP/HSA.
Definition: rocprofiler.h:1466
rocprofiler_record_counter_value_t value
Definition: rocprofiler.h:1923
uint32_t sampling_rate
Sampling rate.
Definition: rocprofiler.h:1903
uint64_t start
Definition: rocprofiler.h:1881
uint64_t handle
Record ID handle.
Definition: rocprofiler.h:558
rocprofiler_counter_id_t counter_handler
Counter Instance Identifier.
Definition: rocprofiler.h:992
rocprofiler_queue_index_t queue_idx
Queue Index - packet index in the queue.
Definition: rocprofiler.h:1297
uint64_t value
Definition: rocprofiler.h:1587
double value
Counter value.
Definition: rocprofiler.h:980
uint64_t accum_vgpr_count
accum vgpr count
Definition: rocprofiler.h:1040
const char * description
Definition: rocprofiler.h:875
rocprofiler_kernel_id_t kernel_id
Kernel Identifier to be used by the user to get the kernel info using rocprofiler_query_kernel_info.
Definition: rocprofiler.h:1080
uint64_t base_address
Addr where codeobj is loaded.
Definition: rocprofiler.h:1191
rocprofiler_codeobj_symbols_t intercept_list
Filepaths for the intercepted code objects at the time of kernel dispatch.
Definition: rocprofiler.h:1313
rocprofiler_record_kind_t kind
Represents the kind of the record using rocprofiler_record_kind_t.
Definition: rocprofiler.h:599
uint64_t signal_handle
Dispatch completion signal handle.
Definition: rocprofiler.h:1052
uint64_t end
Definition: rocprofiler.h:1882
rocprofiler_queue_id_t queue_id
Queue Identifier to be used by the user to get the Queue Information using rocprofiler_query_agent_in...
Definition: rocprofiler.h:1090
rocprofiler_pc_sample_t pc_sample
PC sample data.
Definition: rocprofiler.h:1556
rocprofiler_thread_id_t thread_id
Thread id.
Definition: rocprofiler.h:1117
rocprofiler_timestamp_t begin
Definition: rocprofiler.h:541
uint32_t value
Thread ID.
Definition: rocprofiler.h:851
rocprofiler_hip_function_name_t * hip_functions_names
Definition: rocprofiler.h:1877
uint64_t value
queue index value
Definition: rocprofiler.h:969
uint64_t handle
a unique id to represent every agent on the system, this handle should be unique across all nodes in ...
Definition: rocprofiler.h:621
rocprofiler_record_header_t header
ROCProfiler General Record base header to identify the id and kind of every record.
Definition: rocprofiler.h:1269
uint64_t data_size
If a copy of the codeobj is made, contains the size of the data.
Definition: rocprofiler.h:1203
rocprofiler_record_header_t header
ROCProfiler General Record base header to identify the id and kind of every record.
Definition: rocprofiler.h:1454
rocprofiler_counters_sampler_counter_type_t type
Definition: rocprofiler.h:1918
rocprofiler_timestamp_t clock_end
Timestamp for the time point this codeobj was unloaded.
Definition: rocprofiler.h:1212
uint64_t pc
Sampled program counter.
Definition: rocprofiler.h:1532
uint64_t sgpr_count
sgpr_count
Definition: rocprofiler.h:1044
rocprofiler_tracer_activity_domain_t domain
Activity domain id, represents the type of the APIs that are being traced.
Definition: rocprofiler.h:1462
rocprofiler_record_header_t header
ROCProfiler General Record base header to identify the id and kind of every record.
Definition: rocprofiler.h:1075
rocprofiler_record_header_t header
ROCProfiler General Record base header to identify the id and kind of every record.
Definition: rocprofiler.h:1552
const char ** name_regex
Definition: rocprofiler.h:1876
uint64_t value
Definition: rocprofiler.h:521
rocprofiler_record_counter_value_t value
Counter Instance Value.
Definition: rocprofiler.h:996
uint64_t scratch_size
scratch_size
Definition: rocprofiler.h:1032
rocprofiler_record_header_timestamp_t timestamps
Timestamps, start and end timestamps of the record data (ex.
Definition: rocprofiler.h:1095
uint32_t value
Definition: rocprofiler.h:1129
rocprofiler_timestamp_t end
Definition: rocprofiler.h:542
uint64_t arch_vgpr_count
arch vgpr count
Definition: rocprofiler.h:1036
uint32_t id
Definition: rocprofiler.h:1368
const char * counter_name
Definition: rocprofiler.h:1857
rocprofiler_agent_id_t gpu_id
Sampled GPU agent.
Definition: rocprofiler.h:1540
rocprofiler_hsa_function_name_t * hsa_functions_names
Definition: rocprofiler.h:1878
int counters_num
Counters count.
Definition: rocprofiler.h:1934
uint64_t value
Counters Instances Count for every record.
Definition: rocprofiler.h:1008
rocprofiler_record_header_t header
ROCProfiler General Record base header to identify the id and kind of every record.
Definition: rocprofiler.h:1159
rocprofiler_record_counters_instances_count_t counters_count
The count of the counters that were collected by the profiler.
Definition: rocprofiler.h:1104
uint64_t handle
Unique Id for every queue for one agent for one system.
Definition: rocprofiler.h:714
const char * name
Definition: rocprofiler.h:874
uint64_t id
Definition: rocprofiler.h:1424
uint64_t grid_size
Grid Size.
Definition: rocprofiler.h:1020
rocprofiler_agent_id_t gpu_id
Agent Identifier to be used by the user to get the Agent Information using rocprofiler_query_agent_in...
Definition: rocprofiler.h:1279
rocprofiler_queue_id_t queue_id
Queue Identifier to be used by the user to get the Queue Information using rocprofiler_query_agent_in...
Definition: rocprofiler.h:1284
double value
Definition: rocprofiler.h:2282
rocprofiler_queue_id_t queue_id
Queue identifier that can be used as a handler in rocprofiler_query_queue_info.
Definition: rocprofiler.h:1488
rocprofiler_tracer_external_id_t external_id
Tracing external ID, and ROCTX ID if domain is ACTIVITY_DOMAIN_ROCTX.
Definition: rocprofiler.h:1458
const struct roctx_api_data_s * roctx
Definition: rocprofiler.h:1388
const char * expression
Definition: rocprofiler.h:876
const struct hip_api_data_s * hip
Definition: rocprofiler.h:1386
rocprofiler_record_se_att_data_t * shader_engine_data
ATT data output from each shader engine.
Definition: rocprofiler.h:1305
int gpu_agent_index
Preferred agents to collect counters from.
Definition: rocprofiler.h:1950
uint16_t value
Definition: rocprofiler.h:1134
rocprofiler_att_parameter_name_t parameter_name
Definition: rocprofiler.h:1854
rocprofiler_record_header_timestamp_t timestamps
Timestamps.
Definition: rocprofiler.h:1478
rocprofiler_counters_sampler_counter_input_t * counters
Counters to profile.
Definition: rocprofiler.h:1930
const char * name
Kernel Name for HIP API calls that launches kernels or ROCTx message for ROCTx api calls.
Definition: rocprofiler.h:1500
rocprofiler_counters_sampler_parameters_t counters_sampler_parameters
sampled counters parameters
Definition: rocprofiler.h:1998
char * name
Definition: rocprofiler.h:1917
rocprofiler_agent_id_t agent_id
Agent identifier that can be used as a handler in rocprofiler_query_agent_info.
Definition: rocprofiler.h:1483
uint32_t sampling_rate
Sampling rate (ms)
Definition: rocprofiler.h:1938
uint32_t buffer_size
Definition: rocprofiler.h:1177
rocprofiler_record_id_t id
Represents the id of the record.
Definition: rocprofiler.h:603
uint64_t value
Definition: rocprofiler.h:1507
const char * filepath
File path (file://, memory://) of the code object.
Definition: rocprofiler.h:1187
rocprofiler_counters_sampler_counter_type_t type
Definition: rocprofiler.h:1922
const char * block_name
Definition: rocprofiler.h:878
rocprofiler_kernel_dispatch_id_t dispatch_id
Kernel dispatch ID.
Definition: rocprofiler.h:1518
const char ** counters_names
Counters to profile.
Definition: rocprofiler.h:1986
uint64_t count
Number of symbols.
Definition: rocprofiler.h:1249
rocprofiler_record_header_timestamp_t timestamps
Timestamps at which the counters were sampled.
Definition: rocprofiler.h:1164
uint64_t wave_size
wave size
Definition: rocprofiler.h:1048
rocprofiler_buffer_property_kind_t kind
Definition: rocprofiler.h:1582
void * buffer_ptr
Definition: rocprofiler.h:1176
uint64_t mem_size
Maximum offset from base address.
Definition: rocprofiler.h:1195
rocprofiler_att_parameter_t * att_parameters
att parameters
Definition: rocprofiler.h:1990
rocprofiler_agent_id_t gpu_id
Agent Identifier to be used by the user to get the Agent Information using rocprofiler_query_agent_in...
Definition: rocprofiler.h:1963
uint64_t data_count
Data array count.
Definition: rocprofiler.h:1888
uint64_t value
Definition: rocprofiler.h:1060
uint64_t handle
A unique id generated for every counter requested by the user.
Definition: rocprofiler.h:897
rocprofiler_counter_value_t value
Definition: rocprofiler.h:2287
uint32_t xcc_index
The index of the xcc from which these counters were collected.
Definition: rocprofiler.h:1108
const rocprofiler_record_counter_instance_t * counters
Counters, including identifiers to get counter information and Counters values.
Definition: rocprofiler.h:1100
rocprofiler_tracer_activity_correlation_id_t correlation_id
Activity correlation ID.
Definition: rocprofiler.h:1474
uint32_t block_counters
Definition: rocprofiler.h:879
uint64_t writer_id
Writer ID for counting how many kernels.
Definition: rocprofiler.h:1301
rocprofiler_spm_parameter_t * spm_parameters
spm counters parameters
Definition: rocprofiler.h:1994
rocprofiler_tracer_activity_domain_t * trace_apis
APIs to trace.
Definition: rocprofiler.h:1982
rocprofiler_thread_id_t thread_id
Thread id.
Definition: rocprofiler.h:1492
rocprofiler_timestamp_t clock_start
Timestamp for the time point this codeobj was loaded.
Definition: rocprofiler.h:1207
rocprofiler_agent_id_t * gpu_agent_id
Preferred agents to collect SPM on.
Definition: rocprofiler.h:1907
rocprofiler_record_header_t header
ROCProfiler General Record base header to identify the id and kind of every record.
Definition: rocprofiler.h:1958
uint64_t value
Definition: rocprofiler.h:1583
rocprofiler_queue_index_t queue_idx
Queue Index - packet index in the queue.
Definition: rocprofiler.h:1121
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_agent_info(rocprofiler_agent_info_kind_t kind, rocprofiler_agent_id_t descriptor, const char **name) ROCPROFILER_VERSION_9_0
Query Agent Information Data using an allocated data pointer by the user, user can get the size of th...
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_agent_info_size(rocprofiler_agent_info_kind_t kind, rocprofiler_agent_id_t agent_id, size_t *data_size) ROCPROFILER_VERSION_9_0
Query Agent Information size to allow the user to allocate the right size for the information data re...
rocprofiler_agent_info_kind_t
Types of information that can be requested about the Agents.
Definition: rocprofiler.h:645
rocprofiler_agent_type_t
Using rocprofiler_query_agent_info, user can determine the type of the agent the following struct wil...
Definition: rocprofiler.h:629
@ ROCPROFILER_AGENT_TYPE
GPU Agent Type.
Definition: rocprofiler.h:653
@ ROCPROFILER_AGENT_NAME
GPU Agent Name.
Definition: rocprofiler.h:649
@ ROCPROFILER_CPU_AGENT
CPU Agent.
Definition: rocprofiler.h:633
@ ROCPROFILER_GPU_AGENT
GPU Agent.
Definition: rocprofiler.h:637
rocprofiler_kernel_info_kind_t
Kernel Information Types, can be used by rocprofiler_query_kernel_info.
Definition: rocprofiler.h:791
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_kernel_info(rocprofiler_kernel_info_kind_t kind, rocprofiler_kernel_id_t kernel_id, const char **data) ROCPROFILER_VERSION_9_0
Query Kernel Information Data using an allocated data pointer by the user, user can get the size of t...
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_kernel_info_size(rocprofiler_kernel_info_kind_t kind, rocprofiler_kernel_id_t kernel_id, size_t *data_size) ROCPROFILER_VERSION_9_0
Query Kernel Information Data size to allow the user to allocate the right size for the information d...
@ ROCPROFILER_KERNEL_NAME
Kernel Name Information Type.
Definition: rocprofiler.h:795
rocprofiler_queue_info_kind_t
Types of information that can be requested about the Queues.
Definition: rocprofiler.h:721
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_queue_info_size(rocprofiler_queue_info_kind_t kind, rocprofiler_queue_id_t agent_id, size_t *data_size) ROCPROFILER_VERSION_9_0
Query Queue Information size to allow the user to allocate the right size for the information data re...
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_queue_info(rocprofiler_queue_info_kind_t kind, rocprofiler_queue_id_t descriptor, const char **name) ROCPROFILER_VERSION_9_0
Query Queue Information Data using an allocated data pointer by the user, user can get the size of th...
@ ROCPROFILER_QUEUE_SIZE
AMD HSA Queue Size.
Definition: rocprofiler.h:725
ROCPROFILER_API rocprofiler_status_t rocprofiler_finalize() ROCPROFILER_VERSION_9_0
Finalize the API Tools.
ROCPROFILER_API rocprofiler_status_t rocprofiler_initialize() ROCPROFILER_VERSION_9_0
Initialize the API Tools.
rocprofiler_filter_kind_t
Definition: rocprofiler.h:1728
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_filter_buffer(rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
Set Session Filter Buffer This function will associate buffer to a specific filter.
rocprofiler_counters_sampler_counter_type_t
Definition: rocprofiler.h:1911
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_api_trace_sync_callback(rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id, rocprofiler_sync_callback_t callback) ROCPROFILER_VERSION_9_0
Set Session API Tracing Filter Synchronous Callback This function will associate buffer to a specific...
const char * rocprofiler_hip_function_name_t
Definition: rocprofiler.h:1792
const char * rocprofiler_hsa_function_name_t
Definition: rocprofiler.h:1793
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_filter(rocprofiler_session_id_t session_id, rocprofiler_filter_id_t filter_id) ROCPROFILER_VERSION_9_0
Destroy Session Filter This function will destroy a specific filter.
ROCPROFILER_API rocprofiler_status_t rocprofiler_set_buffer_properties(rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id, rocprofiler_buffer_property_t *buffer_properties, uint32_t buffer_properties_count) ROCPROFILER_VERSION_9_0
Setting Buffer Properties This function will set buffer properties.
void(* rocprofiler_sync_callback_t)(rocprofiler_record_tracer_t record, rocprofiler_session_id_t session_id)
Synchronous Callback To be only used by rocprofiler_set_api_trace_sync_callback, please refer to rocp...
Definition: rocprofiler.h:2058
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_filter(rocprofiler_session_id_t session_id, rocprofiler_filter_kind_t filter_kind, rocprofiler_filter_data_t data, uint64_t data_count, rocprofiler_filter_id_t *filter_id, rocprofiler_filter_property_t property) ROCPROFILER_VERSION_9_0
Create Session Filter This function will create filter and associate it with a specific session For e...
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_buffer(rocprofiler_session_id_t session_id, rocprofiler_buffer_callback_t buffer_callback, size_t buffer_size, rocprofiler_buffer_id_t *buffer_id) ROCPROFILER_VERSION_9_0
Create Buffer This function will create a buffer that can be associated with a filter.
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_buffer(rocprofiler_session_id_t session_id, rocprofiler_buffer_id_t buffer_id) ROCPROFILER_VERSION_9_0
Destroy Buffer This function will destroy a buffer given its id and session id.
rocprofiler_att_parameter_name_t
ATT parameters to be used by for collection.
Definition: rocprofiler.h:1798
rocprofiler_filter_property_kind_t
Data Filter Types to be used by ::rocprofiler_session_set_filter to add filters to a specific session...
Definition: rocprofiler.h:1763
@ ROCPROFILER_DISPATCH_TIMESTAMPS_COLLECTION
Kernel Dispatch Timestamp collection.
Definition: rocprofiler.h:1732
@ ROCPROFILER_ATT_TRACE_COLLECTION
ATT Tracing.
Definition: rocprofiler.h:1744
@ ROCPROFILER_COUNTERS_COLLECTION
GPU Application counter collection.
Definition: rocprofiler.h:1736
@ ROCPROFILER_SPM_COLLECTION
SPM collection.
Definition: rocprofiler.h:1748
@ ROCPROFILER_API_TRACE
HIP/HSA/ROCTX/SYS Trace.
Definition: rocprofiler.h:1752
@ ROCPROFILER_PC_SAMPLING_COLLECTION
PC Sampling collection.
Definition: rocprofiler.h:1740
@ ROCPROFILER_COUNTERS_SAMPLER
Sampled Counters.
Definition: rocprofiler.h:1756
@ ROCPROFILER_COUNTERS_SAMPLER_XGMI_COUNTERS
Definition: rocprofiler.h:1913
@ ROCPROFILER_COUNTERS_SAMPLER_PCIE_COUNTERS
Definition: rocprofiler.h:1912
@ ROCPROFILER_ATT_CAPTURE_MODE
Set ISA capture during ATT collection (rocprofiler_codeobj_capture_mode_t)
Definition: rocprofiler.h:1826
@ ROCPROFILER_ATT_VMID_MASK
VMID Mask.
Definition: rocprofiler.h:1806
@ ROCPROFILER_ATT_SIMD_SELECT
Set SIMD Mask (GFX9) or SIMD ID for collection (Navi)
Definition: rocprofiler.h:1814
@ ROCPROFILER_ATT_COMPUTE_UNIT
Select the target compute unit (wgp) for profiling.
Definition: rocprofiler.h:1802
@ ROCPROFILER_ATT_TOKEN_MASK
Deprecated.
Definition: rocprofiler.h:1846
@ ROCPROFILER_ATT_PERF_CTRL
Select collection period for perfcounters.
Definition: rocprofiler.h:1834
@ ROCPROFILER_ATT_MAXVALUE
Definition: rocprofiler.h:1843
@ ROCPROFILER_ATT_TOKEN_MASK2
Deprecated.
Definition: rocprofiler.h:1847
@ ROCPROFILER_ATT_PERFCOUNTER_NAME
Select perfcounter name (SQ block) for collection.
Definition: rocprofiler.h:1842
@ ROCPROFILER_ATT_PERFCOUNTER
Select perfcounter ID (SQ block) for collection.
Definition: rocprofiler.h:1838
@ ROCPROFILER_ATT_OCCUPANCY
Set true for occupancy collection only.
Definition: rocprofiler.h:1818
@ ROCPROFILER_ATT_MASK
Definition: rocprofiler.h:1845
@ ROCPROFILER_ATT_SAMPLE_RATE
Deprecated.
Definition: rocprofiler.h:1848
@ ROCPROFILER_ATT_BUFFER_SIZE
ATT collection max data size, in MB.
Definition: rocprofiler.h:1822
@ ROCPROFILER_ATT_SE_MASK
Shader engine mask for selection.
Definition: rocprofiler.h:1810
@ ROCPROFILER_ATT_PERF_MASK
Mask of which compute units to generate perfcounters.
Definition: rocprofiler.h:1830
@ ROCPROFILER_FILTER_RANGE
Add Range of calls to be traced or kernels to be profiled.
Definition: rocprofiler.h:1780
@ ROCPROFILER_FILTER_HIP_TRACER_API_FUNCTIONS
Add HIP API calls that will be only traced (ex.
Definition: rocprofiler.h:1771
@ ROCPROFILER_FILTER_HSA_TRACER_API_FUNCTIONS
Add HSA API calls that will be only traced (ex.
Definition: rocprofiler.h:1767
@ ROCPROFILER_FILTER_KERNEL_NAMES
Add Kernel names that will be profiled or traced.
Definition: rocprofiler.h:1784
@ ROCPROFILER_FILTER_DISPATCH_IDS
Add Kernel correlation ids that will be profiled or traced for ATT.
Definition: rocprofiler.h:1788
@ ROCPROFILER_FILTER_GPU_NAME
Add GPU names that will be only profiled or traced.
Definition: rocprofiler.h:1775
ROCPROFILER_API rocprofiler_status_t rocprofiler_destroy_session(rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
Destroy Session Destroy session created by rocprofiler_create_session, please refer to the samples fo...
ROCPROFILER_API rocprofiler_status_t rocprofiler_terminate_session(rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
Deactivate Session Deactivate session created by rocprofiler_create_session, please refer to the samp...
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_ready_session(rocprofiler_replay_mode_t replay_mode, rocprofiler_filter_kind_t filter_kind, rocprofiler_filter_data_t data, uint64_t data_count, size_t buffer_size, rocprofiler_buffer_callback_t buffer_callback, rocprofiler_session_id_t *session_id, rocprofiler_filter_property_t property, rocprofiler_sync_callback_t callback) ROCPROFILER_VERSION_9_0
Create Ready Session A one call to create a ready profiling or tracing session, so that the session w...
ROCPROFILER_API rocprofiler_status_t rocprofiler_create_session(rocprofiler_replay_mode_t replay_mode, rocprofiler_session_id_t *session_id) ROCPROFILER_VERSION_9_0
Create Session A ROCProfiler Session is having enough information about what needs to be collected or...
rocprofiler_replay_mode_t
Replay Profiling Modes.
Definition: rocprofiler.h:1663
ROCPROFILER_API rocprofiler_status_t rocprofiler_start_session(rocprofiler_session_id_t session_id) ROCPROFILER_VERSION_9_0
Activate Session Activating session created by rocprofiler_create_session, please refer to the sample...
@ ROCPROFILER_NONE_REPLAY_MODE
No Replay to be done, Mostly for tracing tool or if the user wants to make sure that no replays will ...
Definition: rocprofiler.h:1668
ROCPROFILER_API const char * rocprofiler_error_str(rocprofiler_status_t status) ROCPROFILER_VERSION_9_0
Query the textual description of the given error for the current thread.
rocprofiler_status_t
ROCProfiler API status codes.
Definition: rocprofiler.h:288
@ ROCPROFILER_STATUS_ERROR_CORRUPTED_SESSION_BUFFER
The requested Session Buffer given the session identifier is corrupted or deleted.
Definition: rocprofiler.h:365
@ ROCPROFILER_STATUS_ERROR_TRACER_API_DATA_INFORMATION_MISSING
The requested information for the tracing API Data is missing.
Definition: rocprofiler.h:352
@ ROCPROFILER_STATUS_ERROR_QUEUE_INFORMATION_MISSING
The requested information about the queue is not found.
Definition: rocprofiler.h:328
@ ROCPROFILER_STATUS_ERROR_COUNTER_INFORMATION_MISSING
The requested Counter information for the given kernel is missing.
Definition: rocprofiler.h:344
@ ROCPROFILER_STATUS_ERROR_SESSION_MISSING_FILTER
Missing Filter for a session.
Definition: rocprofiler.h:377
@ ROCPROFILER_STATUS_ERROR_SESSION_MISSING_BUFFER
Missing Buffer for a session.
Definition: rocprofiler.h:308
@ ROCPROFILER_STATUS_ERROR_HAS_ACTIVE_SESSION
There is already Active session, Can't activate two session at the same time.
Definition: rocprofiler.h:410
@ ROCPROFILER_STATUS_ERROR_KERNEL_NOT_FOUND
Kernel is not found with given identifier.
Definition: rocprofiler.h:332
@ ROCPROFILER_STATUS_ERROR_FILTER_DATA_CORRUPTED
The given filter data is corrupted.
Definition: rocprofiler.h:393
@ ROCPROFILER_STATUS_ERROR_BUFFER_NOT_FOUND
The required buffer is not found for the given session.
Definition: rocprofiler.h:422
@ ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND
Counter is not found with the given identifier.
Definition: rocprofiler.h:340
@ ROCPROFILER_STATUS_ERROR_CORRUPTED_LABEL_DATA
The given label is corrupted.
Definition: rocprofiler.h:397
@ ROCPROFILER_STATUS_ERROR_INCORRECT_REPLAY_MODE
Incorrect Replay mode.
Definition: rocprofiler.h:373
@ ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED
The feature requested is not implemented.
Definition: rocprofiler.h:442
@ ROCPROFILER_STATUS_ERROR_QUEUE_NOT_FOUND
Queue is not found for the given identifier.
Definition: rocprofiler.h:324
@ ROCPROFILER_STATUS_ERROR_INVALID_OPERATION_ID
The given operation id is not valid.
Definition: rocprofiler.h:434
@ ROCPROFILER_STATUS_ERROR_INVALID_DOMAIN_ID
The given domain id is not valid.
Definition: rocprofiler.h:438
@ ROCPROFILER_STATUS_ERROR_INCORRECT_FLUSH_INTERVAL
Incorrect Flush interval.
Definition: rocprofiler.h:385
@ ROCPROFILER_STATUS_ERROR_TRACER_API_DATA_NOT_FOUND
The requested Tracing API Data for the given data identifier is missing.
Definition: rocprofiler.h:348
@ ROCPROFILER_STATUS_ERROR_SESSION_NOT_FOUND
The requested Session given the session identifier is not found.
Definition: rocprofiler.h:360
@ ROCPROFILER_STATUS_ERROR_MISMATCHED_EXTERNAL_CORRELATION_ID
External Correlation id pop called without matching push.
Definition: rocprofiler.h:446
@ ROCPROFILER_STATUS_ERROR_SESSION_FILTER_DATA_MISMATCH
The session filter can't accept the given data.
Definition: rocprofiler.h:389
@ ROCPROFILER_STATUS_ERROR_INCORRECT_DOMAIN
The given Domain is incorrect.
Definition: rocprofiler.h:356
@ ROCPROFILER_STATUS_ERROR_INVALID_ARGUMENTS
Invalid Arguments were given to the function.
Definition: rocprofiler.h:430
@ ROCPROFILER_STATUS_ERROR_AGENT_NOT_FOUND
Agent is not found with given identifier.
Definition: rocprofiler.h:316
@ ROCPROFILER_STATUS_ERROR_SESSION_NOT_ACTIVE
Can't terminate a non active session.
Definition: rocprofiler.h:414
@ ROCPROFILER_STATUS_ERROR
A generic error has occurred.
Definition: rocprofiler.h:296
@ ROCPROFILER_STATUS_ERROR_KERNEL_INFORMATION_MISSING
The requested information about the kernel is not found.
Definition: rocprofiler.h:336
@ ROCPROFILER_STATUS_ERROR_RANGE_STACK_IS_EMPTY
There is no label in the labels stack to be popped.
Definition: rocprofiler.h:401
@ ROCPROFILER_STATUS_ERROR_TIMESTAMP_NOT_APPLICABLE
Timestamps can't be collected.
Definition: rocprofiler.h:312
@ ROCPROFILER_STATUS_ERROR_FILTER_NOT_FOUND
The required filter is not found for the given session.
Definition: rocprofiler.h:418
@ ROCPROFILER_STATUS_ERROR_INCORRECT_SIZE
The size given for the buffer is not applicable.
Definition: rocprofiler.h:381
@ ROCPROFILER_STATUS_ERROR_RECORD_CORRUPTED
The requested record given the record identifier is corrupted or deleted.
Definition: rocprofiler.h:369
@ ROCPROFILER_STATUS_ERROR_ALREADY_INITIALIZED
ROCProfiler is already initialized.
Definition: rocprofiler.h:300
@ ROCPROFILER_STATUS_SUCCESS
The function has executed successfully.
Definition: rocprofiler.h:292
@ ROCPROFILER_STATUS_ERROR_PASS_NOT_STARTED
There is no pass that started.
Definition: rocprofiler.h:405
@ ROCPROFILER_STATUS_ERROR_FILTER_NOT_SUPPORTED
The required Filter is not supported.
Definition: rocprofiler.h:426
@ ROCPROFILER_STATUS_ERROR_AGENT_INFORMATION_MISSING
Agent information is missing for the given identifier.
Definition: rocprofiler.h:320
@ ROCPROFILER_STATUS_ERROR_NOT_INITIALIZED
ROCProfiler is not initialized.
Definition: rocprofiler.h:304
#define ROCPROFILER_VERSION_9_0
The function was introduced in version 9.0 of the interface and has the symbol version string of "ROC...
Definition: rocprofiler.h:228
ROCPROFILER_API rocprofiler_status_t rocprofiler_get_timestamp(rocprofiler_timestamp_t *timestamp) ROCPROFILER_VERSION_9_0
Get the system clock timestamp.
rocprofiler_tracer_activity_domain_t
Traced API domains.
Definition: rocprofiler.h:1326
ROCPROFILER_API rocprofiler_status_t rocprofiler_tracer_operation_id(rocprofiler_tracer_activity_domain_t domain, const char *name, rocprofiler_tracer_operation_id_t *operation_id)
Get Tracer API Operation ID.
rocprofiler_api_tracing_phase_t
Definition: rocprofiler.h:1427
ROCPROFILER_API rocprofiler_status_t rocprofiler_query_tracer_operation_name(rocprofiler_tracer_activity_domain_t domain, rocprofiler_tracer_operation_id_t operation_id, const char **name)
Get Tracer API Function Name.
@ ACTIVITY_DOMAIN_ROCTX
ROCTX domain.
Definition: rocprofiler.h:1354
@ ACTIVITY_DOMAIN_EXT_API
External ID domain.
Definition: rocprofiler.h:1350
@ ACTIVITY_DOMAIN_HSA_EVT
HSA events (Device Activity)
Definition: rocprofiler.h:1360
@ ACTIVITY_DOMAIN_HSA_OPS
HSA async activity domain.
Definition: rocprofiler.h:1334
@ ACTIVITY_DOMAIN_HIP_API
HIP API domain.
Definition: rocprofiler.h:1342
@ ACTIVITY_DOMAIN_NUMBER
Definition: rocprofiler.h:1361
@ ACTIVITY_DOMAIN_HSA_API
HSA API domain.
Definition: rocprofiler.h:1330
@ ACTIVITY_DOMAIN_HIP_OPS
HIP async activity domain.
Definition: rocprofiler.h:1338
@ ACTIVITY_DOMAIN_KFD_API
KFD API domain.
Definition: rocprofiler.h:1346
@ ROCPROFILER_PHASE_NONE
No phase, it is an activity record or asynchronous output data.
Definition: rocprofiler.h:1431
@ ROCPROFILER_PHASE_ENTER
Enter phase for API calls.
Definition: rocprofiler.h:1435
@ ROCPROFILER_PHASE_EXIT
Exit phase for API calls.
Definition: rocprofiler.h:1439
uint32_t rocprofiler_version_minor()
uint32_t rocprofiler_version_major()
Agent ID handle, which represents a unique id to the agent reported as it can be used to retrieve Age...
Definition: rocprofiler.h:616
Definition: rocprofiler.h:1853
Definition: rocprofiler.h:1586
Definition: rocprofiler.h:1581
struct to store the filepaths and their addresses for intercepted code objects
Definition: rocprofiler.h:1241
Correlation ID.
Definition: rocprofiler.h:1059
Counter ID to be used to query counter information using rocprofiler_query_counter_info.
Definition: rocprofiler.h:893
Definition: rocprofiler.h:873
Definition: rocprofiler.h:2281
Definition: rocprofiler.h:1916
Definition: rocprofiler.h:1921
Definition: rocprofiler.h:1926
Definition: rocprofiler.h:2285
Definition: rocprofiler.h:1128
Definition: rocprofiler.h:1590
Filter Data Type filter data will be used to report required and optional filters for the sessions us...
Definition: rocprofiler.h:1866
struct to store the filepaths and their addresses for intercepted code objects
Definition: rocprofiler.h:1183
Kernel dispatch correlation ID, unique across all dispatches.
Definition: rocprofiler.h:1506
Kernel identifier that represent a unique id for every kernel.
Definition: rocprofiler.h:781
Kernel properties, this will represent the kernel properties such as its grid size,...
Definition: rocprofiler.h:1016
An individual PC sample.
Definition: rocprofiler.h:1513
Unique ID handle to represent an HSA Queue of type hsa_queue_t, this id can be used by the user to ge...
Definition: rocprofiler.h:710
Definition: rocprofiler.h:965
ATT tracing record structure.
Definition: rocprofiler.h:1264
Counter Instance Structure, it will represent every counter reported in the array of counters reporte...
Definition: rocprofiler.h:988
Counter Value Structure.
Definition: rocprofiler.h:976
Counters Instances Count Structure, every profiling record has this structure included to report the ...
Definition: rocprofiler.h:1004
Definition: rocprofiler.h:1953
Generic ROCProfiler record header.
Definition: rocprofiler.h:595
Timestamps (start & end), it will be used for kernel dispatch tracing as well as API Tracing.
Definition: rocprofiler.h:540
A unique identifier for every record.
Definition: rocprofiler.h:554
PC sample record: contains the program counter/instruction pointer observed during periodic sampling ...
Definition: rocprofiler.h:1547
Profiling record, this will represent all the information reported by the profiler regarding kernel d...
Definition: rocprofiler.h:1070
struct to store the trace data from a shader engine.
Definition: rocprofiler.h:1175
Counters, including identifiers to get counter information and Counters values.
Definition: rocprofiler.h:1142
SPM record, this will represent all the information reported by the SPM regarding counters and their ...
Definition: rocprofiler.h:1154
Tracing record, this will represent all the information reported by the tracer regarding APIs and the...
Definition: rocprofiler.h:1449
Session Identifier.
Definition: rocprofiler.h:497
Definition: rocprofiler.h:1891
Holds the thread id.
Definition: rocprofiler.h:847
ROCProfiling Timestamp Type.
Definition: rocprofiler.h:520
Correlation identifier.
Definition: rocprofiler.h:1374
Tracer API Calls Data Handler.
Definition: rocprofiler.h:1384
Tracing external ID.
Definition: rocprofiler.h:1423
Tracing Operation ID for HIP/HSA.
Definition: rocprofiler.h:1367
Filter Kind Data.
Definition: rocprofiler.h:1978
#define ROCPROFILER_API
Definition: rocprofiler.h:198