Skip to content

Commit 42fc26c

Browse files
author
Jaime Arteaga
authored
Add extension for global metrics timestamps (#78)
Add extension for global metrics timestamps. Resolves: #11 Signed-off-by: Jaime Arteaga <[email protected]>
1 parent 5ed30d8 commit 42fc26c

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<%
2+
import re
3+
from templates import helper as th
4+
%><%
5+
OneApi=tags['$OneApi']
6+
x=tags['$x']
7+
X=x.upper()
8+
t=tags['$t']
9+
T=t.upper()
10+
%>
11+
:orphan:
12+
13+
.. _ZET_experimental_global_metric_timestamps:
14+
15+
==========================================
16+
Global Metrics Timestamps Extension
17+
==========================================
18+
19+
API
20+
----
21+
22+
* Structures
23+
24+
* ${t}_metric_global_timestamps_resolution_exp_t
25+
26+
* Functions
27+
28+
* ${t}MetricGroupGetGlobalTimestampsExp

scripts/tools/GlobalTimestamps.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#
2+
# Copyright (C) 2023 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# See YaML.md for syntax definition
7+
#
8+
--- #--------------------------------------------------------------------------
9+
type: header
10+
desc: "Intel $OneApi Level-Zero Tool Experimental Extension for Global Metric Timestamps"
11+
version: "1.5"
12+
--- #--------------------------------------------------------------------------
13+
type: macro
14+
desc: "Global Metric Timestamps Experimental Extension Name"
15+
version: "1.5"
16+
name: $T_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME
17+
value: '"$XT_experimental_global_metric_timestamps"'
18+
--- #--------------------------------------------------------------------------
19+
type: enum
20+
desc: "Global Metric Timestamps Experimental Extension Version(s)"
21+
version: "1.5"
22+
name: $x_metric_global_timestamps_exp_version_t
23+
etors:
24+
- name: "1_0"
25+
value: "$X_MAKE_VERSION( 1, 0 )"
26+
desc: "version 1.0"
27+
--- #--------------------------------------------------------------------------
28+
type: struct
29+
desc: "Metric timestamps resolution"
30+
version: "1.5"
31+
class: $tMetric
32+
name: $t_metric_global_timestamps_resolution_exp_t
33+
base: $x_base_desc_t
34+
members:
35+
- type: uint64_t
36+
name: timerResolution
37+
desc: "[out] Returns the resolution of device timer in nanoseconds used for timestamps."
38+
- type: uint64_t
39+
name: timestampValidBits
40+
desc: "[out] Returns the number of valid bits in the timestamp value."
41+
details:
42+
- "This structure may be returned from $tMetricGroupGetProperties via `pNext` member of $t_metric_group_properties_t"
43+
- "Used for mapping metric timestamps to other timers."
44+
--- #--------------------------------------------------------------------------
45+
type: function
46+
desc: "Returns metric timestamps synchronized with global device timestamps, optionally synchronized with host"
47+
class: $tMetricGroup
48+
name: GetGlobalTimestampsExp
49+
decl: static
50+
details:
51+
- "The application may call this function from simultaneous threads."
52+
- "By default, the global and metrics timestamps are synchronized to the device."
53+
params:
54+
- type: "$t_metric_group_handle_t"
55+
name: hMetricGroup
56+
desc: "[in] handle of the metric group"
57+
- type: "$x_bool_t"
58+
name: synchronizedWithHost
59+
desc: "[in] Returns the timestamps synchronized to the host or the device."
60+
init: "false"
61+
- type: "uint64_t*"
62+
name: globalTimestamp
63+
desc: |
64+
[out] Device timestamp.
65+
- type: "uint64_t*"
66+
name: metricTimestamp
67+
desc: |
68+
[out] Metric timestamp.

scripts/tools/common.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ etors:
102102
desc: $t_debug_memory_space_desc_t
103103
- name: DEBUG_REGSET_PROPERTIES
104104
desc: $t_debug_regset_properties_t
105+
- name: GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES
106+
desc: $t_metric_global_timestamps_resolution_exp_t
107+
version: "1.5"
105108
- name: TRACER_EXP_DESC
106109
desc: $t_tracer_exp_desc_t
107110
value: "0x00010001"

0 commit comments

Comments
 (0)