@@ -45,6 +45,127 @@ ze_result_t ZE_APICALL zetIntelCommandListAppendMarkerExp(zet_command_list_handl
45
45
zet_metric_group_handle_t hMetricGroup ,
46
46
uint32_t value );
47
47
48
+ typedef zet_metric_tracer_exp_desc_t zet_intel_metric_tracer_exp_desc_t ;
49
+ typedef zet_metric_tracer_exp_handle_t zet_intel_metric_tracer_exp_handle_t ;
50
+ typedef zet_metric_decoder_exp_handle_t zet_intel_metric_decoder_exp_handle_t ;
51
+ typedef zet_metric_entry_exp_t zet_intel_metric_entry_exp_t ;
52
+
53
+ ze_result_t ZE_APICALL zetIntelMetricTracerCreateExp (
54
+ zet_context_handle_t hContext , ///< [in] handle of the context object
55
+ zet_device_handle_t hDevice , ///< [in] handle of the device
56
+ uint32_t metricGroupCount , ///< [in] metric group count
57
+ zet_metric_group_handle_t * phMetricGroups , ///< [in][range(0, metricGroupCount )] handles of the metric groups to
58
+ ///< trace
59
+ zet_intel_metric_tracer_exp_desc_t * desc , ///< [in,out] metric tracer descriptor
60
+ ze_event_handle_t hNotificationEvent , ///< [in][optional] event used for report availability notification. Note:
61
+ ///< If buffer is not drained when the event it flagged, there is a risk of
62
+ ///< HW event buffer being overrun
63
+ zet_intel_metric_tracer_exp_handle_t * phMetricTracer ///< [out] handle of the metric tracer
64
+ );
65
+
66
+ ze_result_t ZE_APICALL zetIntelMetricTracerDestroyExp (
67
+ zet_intel_metric_tracer_exp_handle_t hMetricTracer ///< [in] handle of the metric tracer
68
+ );
69
+
70
+ ze_result_t ZE_APICALL zetIntelMetricTracerEnableExp (
71
+ zet_intel_metric_tracer_exp_handle_t hMetricTracer , ///< [in] handle of the metric tracer
72
+ ze_bool_t synchronous ///< [in] request synchronous behavior. Confirmation of successful
73
+ ///< asynchronous operation is done by calling ::zetMetricTracerReadDataExp()
74
+ ///< and checking the return status: ::ZE_RESULT_NOT_READY will be returned
75
+ ///< when the tracer is inactive. ::ZE_RESULT_SUCCESS will be returned
76
+ ///< when the tracer is active.
77
+ );
78
+
79
+ ze_result_t ZE_APICALL zetIntelMetricTracerDisableExp (
80
+ zet_intel_metric_tracer_exp_handle_t hMetricTracer , ///< [in] handle of the metric tracer
81
+ ze_bool_t synchronous ///< [in] request synchronous behavior. Confirmation of successful
82
+ ///< asynchronous operation is done by calling ::zetMetricTracerReadDataExp()
83
+ ///< and checking the return status: ::ZE_RESULT_SUCCESS will be returned
84
+ ///< when the tracer is active or when it is inactive but still has data.
85
+ ///< ::ZE_RESULT_NOT_READY will be returned when the tracer is inactive and
86
+ ///< has no more data to be retrieved.
87
+ );
88
+
89
+ ze_result_t ZE_APICALL zetIntelMetricTracerReadDataExp (
90
+ zet_intel_metric_tracer_exp_handle_t hMetricTracer , ///< [in] handle of the metric tracer
91
+ size_t * pRawDataSize , ///< [in,out] pointer to size in bytes of raw data requested to read.
92
+ ///< if size is zero, then the driver will update the value with the total
93
+ ///< size in bytes needed for all data available.
94
+ ///< if size is non-zero, then driver will only retrieve that amount of
95
+ ///< data.
96
+ ///< if size is larger than size needed for all data, then driver will
97
+ ///< update the value with the actual size needed.
98
+ uint8_t * pRawData ///< [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer
99
+ ///< data in raw format
100
+ );
101
+
102
+ ze_result_t ZE_APICALL zetIntelMetricDecoderCreateExp (
103
+ zet_intel_metric_tracer_exp_handle_t hMetricTracer , ///< [in] handle of the metric tracer
104
+ zet_intel_metric_decoder_exp_handle_t * phMetricDecoder ///< [out] handle of the metric decoder object
105
+ );
106
+
107
+ ze_result_t ZE_APICALL zetIntelMetricDecoderDestroyExp (
108
+ zet_intel_metric_decoder_exp_handle_t phMetricDecoder ///< [in] handle of the metric decoder object
109
+ );
110
+
111
+ ze_result_t ZE_APICALL zetIntelMetricDecoderGetDecodableMetricsExp (
112
+ zet_intel_metric_decoder_exp_handle_t hMetricDecoder , ///< [in] handle of the metric decoder object
113
+ uint32_t * pCount , ///< [in,out] pointer to number of decodable metric in the hMetricDecoder
114
+ ///< handle. If count is zero, then the driver shall
115
+ ///< update the value with the total number of decodable metrics available
116
+ ///< in the decoder. if count is greater than zero
117
+ ///< but less than the total number of decodable metrics available in the
118
+ ///< decoder, then only that number will be returned.
119
+ ///< if count is greater than the number of decodable metrics available in
120
+ ///< the decoder, then the driver shall update the
121
+ ///< value with the actual number of decodable metrics available.
122
+ zet_metric_handle_t * phMetrics ///< [in,out] [range(0, *pCount)] array of handles of decodable metrics in
123
+ ///< the hMetricDecoder handle provided.
124
+ );
125
+
126
+ ze_result_t ZE_APICALL zetIntelMetricTracerDecodeExp (
127
+ zet_intel_metric_decoder_exp_handle_t phMetricDecoder , ///< [in] handle of the metric decoder object
128
+ size_t * pRawDataSize , ///< [in,out] size in bytes of raw data buffer. If pMetricEntriesCount is
129
+ ///< greater than zero but less than total number of
130
+ ///< decodable metrics available in the raw data buffer, then driver shall
131
+ ///< update this value with actual number of raw
132
+ ///< data bytes processed.
133
+ uint8_t * pRawData , ///< [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer
134
+ ///< data in raw format
135
+ uint32_t metricsCount , ///< [in] number of decodable metrics in the tracer for which the
136
+ ///< hMetricDecoder handle was provided. See
137
+ ///< ::zetMetricDecoderGetDecodableMetricsExp(). If metricCount is greater
138
+ ///< than zero but less than the number decodable
139
+ ///< metrics available in the raw data buffer, then driver shall only
140
+ ///< decode those.
141
+ zet_metric_handle_t * phMetrics , ///< [in] [range(0, metricsCount)] array of handles of decodable metrics in
142
+ ///< the decoder for which the hMetricDecoder handle was
143
+ ///< provided. Metrics handles are expected to be for decodable metrics,
144
+ ///< see ::zetMetricDecoderGetDecodableMetricsExp()
145
+ uint32_t * pSetCount , ///< [in,out] pointer to number of metric sets. If count is zero, then the
146
+ ///< driver shall update the value with the total
147
+ ///< number of metric sets to be decoded. If count is greater than the
148
+ ///< number available in the raw data buffer, then the
149
+ ///< driver shall update the value with the actual number of metric sets to
150
+ ///< be decoded. There is a 1:1 relation between
151
+ ///< the number of sets and sub-devices returned in the decoded entries.
152
+ uint32_t * pMetricEntriesCountPerSet , ///< [in,out][optional][range(0, *pSetCount)] buffer of metric entries
153
+ ///< counts per metric set, one value per set.
154
+ uint32_t * pMetricEntriesCount , ///< [in,out] pointer to the total number of metric entries decoded, for
155
+ ///< all metric sets. If count is zero, then the
156
+ ///< driver shall update the value with the total number of metric entries
157
+ ///< to be decoded. If count is greater than zero
158
+ ///< but less than the total number of metric entries available in the raw
159
+ ///< data, then user provided number will be decoded.
160
+ ///< If count is greater than the number available in the raw data buffer,
161
+ ///< then the driver shall update the value with
162
+ ///< the actual number of decodable metric entries decoded. If set to null,
163
+ ///< then driver will only update the value of
164
+ ///< pSetCount.
165
+ zet_intel_metric_entry_exp_t * pMetricEntries ///< [in,out][optional][range(0, *pMetricEntriesCount)] buffer containing
166
+ ///< decoded metric entries
167
+ );
168
+
48
169
#if defined(__cplusplus )
49
170
} // extern "C"
50
171
#endif
0 commit comments