/src/opencv/3rdparty/ittnotify/include/ittnotify.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | Copyright (C) 2005-2019 Intel Corporation |
3 | | |
4 | | SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause |
5 | | */ |
6 | | #ifndef _ITTNOTIFY_H_ |
7 | | #define _ITTNOTIFY_H_ |
8 | | |
9 | | /** |
10 | | @file |
11 | | @brief Public User API functions and types |
12 | | @mainpage |
13 | | |
14 | | The Instrumentation and Tracing Technology API (ITT API) is used to |
15 | | annotate a user's program with additional information |
16 | | that can be used by correctness and performance tools. The user inserts |
17 | | calls in their program. Those calls generate information that is collected |
18 | | at runtime, and used by Intel(R) Threading Tools. |
19 | | |
20 | | @section API Concepts |
21 | | The following general concepts are used throughout the API. |
22 | | |
23 | | @subsection Unicode Support |
24 | | Many API functions take character string arguments. On Windows, there |
25 | | are two versions of each such function. The function name is suffixed |
26 | | by W if Unicode support is enabled, and by A otherwise. Any API function |
27 | | that takes a character string argument adheres to this convention. |
28 | | |
29 | | @subsection Conditional Compilation |
30 | | Many users prefer having an option to modify ITT API code when linking it |
31 | | inside their runtimes. ITT API header file provides a mechanism to replace |
32 | | ITT API function names inside your code with empty strings. To do this, |
33 | | define the macros INTEL_NO_ITTNOTIFY_API during compilation and remove the |
34 | | static library from the linker script. |
35 | | |
36 | | @subsection Domains |
37 | | [see domains] |
38 | | Domains provide a way to separate notification for different modules or |
39 | | libraries in a program. Domains are specified by dotted character strings, |
40 | | e.g. TBB.Internal.Control. |
41 | | |
42 | | A mechanism (to be specified) is provided to enable and disable |
43 | | domains. By default, all domains are enabled. |
44 | | @subsection Named Entities and Instances |
45 | | Named entities (frames, regions, tasks, and markers) communicate |
46 | | information about the program to the analysis tools. A named entity often |
47 | | refers to a section of program code, or to some set of logical concepts |
48 | | that the programmer wants to group together. |
49 | | |
50 | | Named entities relate to the programmer's static view of the program. When |
51 | | the program actually executes, many instances of a given named entity |
52 | | may be created. |
53 | | |
54 | | The API annotations denote instances of named entities. The actual |
55 | | named entities are displayed using the analysis tools. In other words, |
56 | | the named entities come into existence when instances are created. |
57 | | |
58 | | Instances of named entities may have instance identifiers (IDs). Some |
59 | | API calls use instance identifiers to create relationships between |
60 | | different instances of named entities. Other API calls associate data |
61 | | with instances of named entities. |
62 | | |
63 | | Some named entities must always have instance IDs. In particular, regions |
64 | | and frames always have IDs. Task and markers need IDs only if the ID is |
65 | | needed in another API call (such as adding a relation or metadata). |
66 | | |
67 | | The lifetime of instance IDs is distinct from the lifetime of |
68 | | instances. This allows various relationships to be specified separate |
69 | | from the actual execution of instances. This flexibility comes at the |
70 | | expense of extra API calls. |
71 | | |
72 | | The same ID may not be reused for different instances, unless a previous |
73 | | [ref] __itt_id_destroy call for that ID has been issued. |
74 | | */ |
75 | | |
76 | | /** @cond exclude_from_documentation */ |
77 | | #ifndef ITT_OS_WIN |
78 | | # define ITT_OS_WIN 1 |
79 | | #endif /* ITT_OS_WIN */ |
80 | | |
81 | | #ifndef ITT_OS_LINUX |
82 | | # define ITT_OS_LINUX 2 |
83 | | #endif /* ITT_OS_LINUX */ |
84 | | |
85 | | #ifndef ITT_OS_MAC |
86 | | # define ITT_OS_MAC 3 |
87 | | #endif /* ITT_OS_MAC */ |
88 | | |
89 | | #ifndef ITT_OS_FREEBSD |
90 | | # define ITT_OS_FREEBSD 4 |
91 | | #endif /* ITT_OS_FREEBSD */ |
92 | | |
93 | | #ifndef ITT_OS_OPENBSD |
94 | | # define ITT_OS_OPENBSD 5 |
95 | | #endif /* ITT_OS_OPENBSD */ |
96 | | |
97 | | #ifndef ITT_OS |
98 | | # if defined WIN32 || defined _WIN32 |
99 | | # define ITT_OS ITT_OS_WIN |
100 | | # elif defined( __APPLE__ ) && defined( __MACH__ ) |
101 | | # define ITT_OS ITT_OS_MAC |
102 | | # elif defined( __FreeBSD__ ) |
103 | | # define ITT_OS ITT_OS_FREEBSD |
104 | | # elif defined( __OpenBSD__) |
105 | | # define ITT_OS ITT_OS_OPENBSD |
106 | | # else |
107 | | # define ITT_OS ITT_OS_LINUX |
108 | | # endif |
109 | | #endif /* ITT_OS */ |
110 | | |
111 | | #ifndef ITT_PLATFORM_WIN |
112 | | # define ITT_PLATFORM_WIN 1 |
113 | | #endif /* ITT_PLATFORM_WIN */ |
114 | | |
115 | | #ifndef ITT_PLATFORM_POSIX |
116 | | # define ITT_PLATFORM_POSIX 2 |
117 | | #endif /* ITT_PLATFORM_POSIX */ |
118 | | |
119 | | #ifndef ITT_PLATFORM_MAC |
120 | | # define ITT_PLATFORM_MAC 3 |
121 | | #endif /* ITT_PLATFORM_MAC */ |
122 | | |
123 | | #ifndef ITT_PLATFORM_FREEBSD |
124 | | # define ITT_PLATFORM_FREEBSD 4 |
125 | | #endif /* ITT_PLATFORM_FREEBSD */ |
126 | | |
127 | | #ifndef ITT_PLATFORM_OPENBSD |
128 | | # define ITT_PLATFORM_OPENBSD 5 |
129 | | #endif /* ITT_PLATFORM_OPENBSD */ |
130 | | |
131 | | #ifndef ITT_PLATFORM |
132 | | # if ITT_OS==ITT_OS_WIN |
133 | | # define ITT_PLATFORM ITT_PLATFORM_WIN |
134 | | # elif ITT_OS==ITT_OS_MAC |
135 | | # define ITT_PLATFORM ITT_PLATFORM_MAC |
136 | | # elif ITT_OS==ITT_OS_FREEBSD |
137 | | # define ITT_PLATFORM ITT_PLATFORM_FREEBSD |
138 | | # elif ITT_OS==ITT_OS_OPENBSD |
139 | | # define ITT_PLATFORM ITT_PLATFORM_OPENBSD |
140 | | # else |
141 | | # define ITT_PLATFORM ITT_PLATFORM_POSIX |
142 | | # endif |
143 | | #endif /* ITT_PLATFORM */ |
144 | | |
145 | | #if defined(_UNICODE) && !defined(UNICODE) |
146 | | #define UNICODE |
147 | | #endif |
148 | | |
149 | | #include <stddef.h> |
150 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
151 | | #include <tchar.h> |
152 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
153 | | #include <stdint.h> |
154 | | #if defined(UNICODE) || defined(_UNICODE) |
155 | | #include <wchar.h> |
156 | | #endif /* UNICODE || _UNICODE */ |
157 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
158 | | |
159 | | #ifndef ITTAPI_CDECL |
160 | | # if ITT_PLATFORM==ITT_PLATFORM_WIN |
161 | | # define ITTAPI_CDECL __cdecl |
162 | | # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
163 | | # if defined _M_IX86 || defined __i386__ |
164 | | # define ITTAPI_CDECL __attribute__ ((cdecl)) |
165 | | # else /* _M_IX86 || __i386__ */ |
166 | | # define ITTAPI_CDECL /* actual only on x86 platform */ |
167 | | # endif /* _M_IX86 || __i386__ */ |
168 | | # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
169 | | #endif /* ITTAPI_CDECL */ |
170 | | |
171 | | #ifndef STDCALL |
172 | | # if ITT_PLATFORM==ITT_PLATFORM_WIN |
173 | | # define STDCALL __stdcall |
174 | | # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
175 | | # if defined _M_IX86 || defined __i386__ |
176 | | # define STDCALL __attribute__ ((stdcall)) |
177 | | # else /* _M_IX86 || __i386__ */ |
178 | | # define STDCALL /* supported only on x86 platform */ |
179 | | # endif /* _M_IX86 || __i386__ */ |
180 | | # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
181 | | #endif /* STDCALL */ |
182 | | |
183 | | #define ITTAPI ITTAPI_CDECL |
184 | | #define LIBITTAPI ITTAPI_CDECL |
185 | | |
186 | | /* TODO: Temporary for compatibility! */ |
187 | | #define ITTAPI_CALL ITTAPI_CDECL |
188 | | #define LIBITTAPI_CALL ITTAPI_CDECL |
189 | | |
190 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
191 | | /* use __forceinline (VC++ specific) */ |
192 | | #if defined(__MINGW32__) && !defined(__cplusplus) |
193 | | #define ITT_INLINE static __inline__ __attribute__((__always_inline__,__gnu_inline__)) |
194 | | #else |
195 | | #define ITT_INLINE static __forceinline |
196 | | #endif /* __MINGW32__ */ |
197 | | |
198 | | #define ITT_INLINE_ATTRIBUTE /* nothing */ |
199 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
200 | | /* |
201 | | * Generally, functions are not inlined unless optimization is specified. |
202 | | * For functions declared inline, this attribute inlines the function even |
203 | | * if no optimization level was specified. |
204 | | */ |
205 | | #ifdef __STRICT_ANSI__ |
206 | | #define ITT_INLINE static |
207 | | #define ITT_INLINE_ATTRIBUTE __attribute__((unused)) |
208 | | #else /* __STRICT_ANSI__ */ |
209 | | #define ITT_INLINE static inline |
210 | | #define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused)) |
211 | | #endif /* __STRICT_ANSI__ */ |
212 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
213 | | /** @endcond */ |
214 | | |
215 | | #ifdef INTEL_ITTNOTIFY_ENABLE_LEGACY |
216 | | # if ITT_PLATFORM==ITT_PLATFORM_WIN |
217 | | # pragma message("WARNING!!! Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro") |
218 | | # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
219 | | # warning "Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro" |
220 | | # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
221 | | # include "legacy/ittnotify.h" |
222 | | #endif /* INTEL_ITTNOTIFY_ENABLE_LEGACY */ |
223 | | |
224 | | /** @cond exclude_from_documentation */ |
225 | | /* Helper macro for joining tokens */ |
226 | 70 | #define ITT_JOIN_AUX(p,n) p##n |
227 | 70 | #define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) |
228 | | |
229 | | #ifdef ITT_MAJOR |
230 | | #undef ITT_MAJOR |
231 | | #endif |
232 | | #ifdef ITT_MINOR |
233 | | #undef ITT_MINOR |
234 | | #endif |
235 | | #define ITT_MAJOR 3 |
236 | | #define ITT_MINOR 0 |
237 | | |
238 | | /* Standard versioning of a token with major and minor version numbers */ |
239 | | #define ITT_VERSIONIZE(x) \ |
240 | 70 | ITT_JOIN(x, \ |
241 | 70 | ITT_JOIN(_, \ |
242 | 70 | ITT_JOIN(ITT_MAJOR, \ |
243 | 70 | ITT_JOIN(_, ITT_MINOR)))) |
244 | | |
245 | | #ifndef INTEL_ITTNOTIFY_PREFIX |
246 | | # define INTEL_ITTNOTIFY_PREFIX __itt_ |
247 | | #endif /* INTEL_ITTNOTIFY_PREFIX */ |
248 | | #ifndef INTEL_ITTNOTIFY_POSTFIX |
249 | | # define INTEL_ITTNOTIFY_POSTFIX _ptr_ |
250 | | #endif /* INTEL_ITTNOTIFY_POSTFIX */ |
251 | | |
252 | | #define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) |
253 | 70 | #define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) |
254 | | |
255 | 31 | #define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) |
256 | 4 | #define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) |
257 | | |
258 | 0 | #define ITTNOTIFY_VOID_D0(n,d) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) |
259 | 0 | #define ITTNOTIFY_VOID_D1(n,d,x) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) |
260 | | #define ITTNOTIFY_VOID_D2(n,d,x,y) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) |
261 | 0 | #define ITTNOTIFY_VOID_D3(n,d,x,y,z) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) |
262 | 0 | #define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) |
263 | 0 | #define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) |
264 | | #define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (d == NULL) ? (void)0 : (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) |
265 | | #define ITTNOTIFY_DATA_D0(n,d) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) |
266 | | #define ITTNOTIFY_DATA_D1(n,d,x) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) |
267 | | #define ITTNOTIFY_DATA_D2(n,d,x,y) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) |
268 | | #define ITTNOTIFY_DATA_D3(n,d,x,y,z) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) |
269 | | #define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) |
270 | | #define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) |
271 | | #define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (d == NULL) ? 0 : (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) |
272 | | |
273 | | #ifdef ITT_STUB |
274 | | #undef ITT_STUB |
275 | | #endif |
276 | | #ifdef ITT_STUBV |
277 | | #undef ITT_STUBV |
278 | | #endif |
279 | | #define ITT_STUBV(api,type,name,args) \ |
280 | | typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ |
281 | | extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); |
282 | | #define ITT_STUB ITT_STUBV |
283 | | /** @endcond */ |
284 | | |
285 | | #ifdef __cplusplus |
286 | | extern "C" { |
287 | | #endif /* __cplusplus */ |
288 | | |
289 | | /** @cond exclude_from_gpa_documentation */ |
290 | | /** |
291 | | * @defgroup public Public API |
292 | | * @{ |
293 | | * @} |
294 | | */ |
295 | | |
296 | | /** |
297 | | * @defgroup control Collection Control |
298 | | * @ingroup public |
299 | | * General behavior: application continues to run, but no profiling information is being collected |
300 | | * |
301 | | * Pausing occurs not only for the current thread but for all process as well as spawned processes |
302 | | * - Intel(R) Parallel Inspector and Intel(R) Inspector XE: |
303 | | * - Does not analyze or report errors that involve memory access. |
304 | | * - Other errors are reported as usual. Pausing data collection in |
305 | | * Intel(R) Parallel Inspector and Intel(R) Inspector XE |
306 | | * only pauses tracing and analyzing memory access. |
307 | | * It does not pause tracing or analyzing threading APIs. |
308 | | * . |
309 | | * - Intel(R) VTune(TM) Profiler: |
310 | | * - Does continue to record when new threads are started. |
311 | | * . |
312 | | * - Other effects: |
313 | | * - Possible reduction of runtime overhead. |
314 | | * . |
315 | | * @{ |
316 | | */ |
317 | | /** @brief Pause collection */ |
318 | | void ITTAPI __itt_pause(void); |
319 | | /** @brief Resume collection */ |
320 | | void ITTAPI __itt_resume(void); |
321 | | /** @brief Detach collection */ |
322 | | void ITTAPI __itt_detach(void); |
323 | | |
324 | | /** |
325 | | * @enum __itt_collection_scope |
326 | | * @brief Enumerator for collection scopes |
327 | | */ |
328 | | typedef enum { |
329 | | __itt_collection_scope_host = 1 << 0, |
330 | | __itt_collection_scope_offload = 1 << 1, |
331 | | __itt_collection_scope_all = 0x7FFFFFFF |
332 | | } __itt_collection_scope; |
333 | | |
334 | | /** @brief Pause scoped collection */ |
335 | | void ITTAPI __itt_pause_scoped(__itt_collection_scope); |
336 | | /** @brief Resume scoped collection */ |
337 | | void ITTAPI __itt_resume_scoped(__itt_collection_scope); |
338 | | |
339 | | /** @cond exclude_from_documentation */ |
340 | | #ifndef INTEL_NO_MACRO_BODY |
341 | | #ifndef INTEL_NO_ITTNOTIFY_API |
342 | | ITT_STUBV(ITTAPI, void, pause, (void)) |
343 | | ITT_STUBV(ITTAPI, void, pause_scoped, (__itt_collection_scope)) |
344 | | ITT_STUBV(ITTAPI, void, resume, (void)) |
345 | | ITT_STUBV(ITTAPI, void, resume_scoped, (__itt_collection_scope)) |
346 | | ITT_STUBV(ITTAPI, void, detach, (void)) |
347 | | #define __itt_pause ITTNOTIFY_VOID(pause) |
348 | | #define __itt_pause_ptr ITTNOTIFY_NAME(pause) |
349 | | #define __itt_pause_scoped ITTNOTIFY_VOID(pause_scoped) |
350 | | #define __itt_pause_scoped_ptr ITTNOTIFY_NAME(pause_scoped) |
351 | | #define __itt_resume ITTNOTIFY_VOID(resume) |
352 | | #define __itt_resume_ptr ITTNOTIFY_NAME(resume) |
353 | | #define __itt_resume_scoped ITTNOTIFY_VOID(resume_scoped) |
354 | | #define __itt_resume_scoped_ptr ITTNOTIFY_NAME(resume_scoped) |
355 | | #define __itt_detach ITTNOTIFY_VOID(detach) |
356 | | #define __itt_detach_ptr ITTNOTIFY_NAME(detach) |
357 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
358 | | #define __itt_pause() |
359 | | #define __itt_pause_ptr 0 |
360 | | #define __itt_pause_scoped(scope) |
361 | | #define __itt_pause_scoped_ptr 0 |
362 | | #define __itt_resume() |
363 | | #define __itt_resume_ptr 0 |
364 | | #define __itt_resume_scoped(scope) |
365 | | #define __itt_resume_scoped_ptr 0 |
366 | | #define __itt_detach() |
367 | | #define __itt_detach_ptr 0 |
368 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
369 | | #else /* INTEL_NO_MACRO_BODY */ |
370 | | #define __itt_pause_ptr 0 |
371 | | #define __itt_pause_scoped_ptr 0 |
372 | | #define __itt_resume_ptr 0 |
373 | | #define __itt_resume_scoped_ptr 0 |
374 | | #define __itt_detach_ptr 0 |
375 | | #endif /* INTEL_NO_MACRO_BODY */ |
376 | | /** @endcond */ |
377 | | /** @} control group */ |
378 | | /** @endcond */ |
379 | | |
380 | | /** |
381 | | * @defgroup Intel Processor Trace control |
382 | | * API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data |
383 | | * Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35): |
384 | | * https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf |
385 | | * Use this API to mark particular code regions for loading detailed performance statistics. |
386 | | * This mode makes your analysis faster and more accurate. |
387 | | * @{ |
388 | | */ |
389 | | typedef unsigned char __itt_pt_region; |
390 | | |
391 | | /** |
392 | | * @brief function saves a region name marked with Intel PT API and returns a region id. |
393 | | * Only 7 names can be registered. Attempts to register more names will be ignored and a region id with auto names will be returned. |
394 | | * For automatic naming of regions pass NULL as function parameter |
395 | | */ |
396 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
397 | | __itt_pt_region ITTAPI __itt_pt_region_createA(const char *name); |
398 | | __itt_pt_region ITTAPI __itt_pt_region_createW(const wchar_t *name); |
399 | | #if defined(UNICODE) || defined(_UNICODE) |
400 | | # define __itt_pt_region_create __itt_pt_region_createW |
401 | | #else /* UNICODE */ |
402 | | # define __itt_pt_region_create __itt_pt_region_createA |
403 | | #endif /* UNICODE */ |
404 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
405 | | __itt_pt_region ITTAPI __itt_pt_region_create(const char *name); |
406 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
407 | | |
408 | | /** @cond exclude_from_documentation */ |
409 | | #ifndef INTEL_NO_MACRO_BODY |
410 | | #ifndef INTEL_NO_ITTNOTIFY_API |
411 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
412 | | ITT_STUB(ITTAPI, __itt_pt_region, pt_region_createA, (const char *name)) |
413 | | ITT_STUB(ITTAPI, __itt_pt_region, pt_region_createW, (const wchar_t *name)) |
414 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
415 | | ITT_STUB(ITTAPI, __itt_pt_region, pt_region_create, (const char *name)) |
416 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
417 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
418 | | #define __itt_pt_region_createA ITTNOTIFY_DATA(pt_region_createA) |
419 | | #define __itt_pt_region_createA_ptr ITTNOTIFY_NAME(pt_region_createA) |
420 | | #define __itt_pt_region_createW ITTNOTIFY_DATA(pt_region_createW) |
421 | | #define __itt_pt_region_createW_ptr ITTNOTIFY_NAME(pt_region_createW) |
422 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
423 | | #define __itt_pt_region_create ITTNOTIFY_DATA(pt_region_create) |
424 | | #define __itt_pt_region_create_ptr ITTNOTIFY_NAME(pt_region_create) |
425 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
426 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
427 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
428 | | #define __itt_pt_region_createA(name) (__itt_pt_region)0 |
429 | | #define __itt_pt_region_createA_ptr 0 |
430 | | #define __itt_pt_region_createW(name) (__itt_pt_region)0 |
431 | | #define __itt_pt_region_createW_ptr 0 |
432 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
433 | | #define __itt_pt_region_create(name) (__itt_pt_region)0 |
434 | | #define __itt_pt_region_create_ptr 0 |
435 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
436 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
437 | | #else /* INTEL_NO_MACRO_BODY */ |
438 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
439 | | #define __itt_pt_region_createA_ptr 0 |
440 | | #define __itt_pt_region_createW_ptr 0 |
441 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
442 | | #define __itt_pt_region_create_ptr 0 |
443 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
444 | | #endif /* INTEL_NO_MACRO_BODY */ |
445 | | /** @endcond */ |
446 | | |
447 | | /** |
448 | | * @brief function contains a special code pattern identified on the post-processing stage and |
449 | | * marks the beginning of a code region targeted for Intel PT analysis |
450 | | * @param[in] region - region id, 0 <= region < 8 |
451 | | */ |
452 | | void __itt_mark_pt_region_begin(__itt_pt_region region); |
453 | | /** |
454 | | * @brief function contains a special code pattern identified on the post-processing stage and |
455 | | * marks the end of a code region targeted for Intel PT analysis |
456 | | * @param[in] region - region id, 0 <= region < 8 |
457 | | */ |
458 | | void __itt_mark_pt_region_end(__itt_pt_region region); |
459 | | /** @} Intel PT control group*/ |
460 | | |
461 | | /** |
462 | | * @defgroup threads Threads |
463 | | * @ingroup public |
464 | | * Give names to threads |
465 | | * @{ |
466 | | */ |
467 | | /** |
468 | | * @brief Sets thread name of calling thread |
469 | | * @param[in] name - name of thread |
470 | | */ |
471 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
472 | | void ITTAPI __itt_thread_set_nameA(const char *name); |
473 | | void ITTAPI __itt_thread_set_nameW(const wchar_t *name); |
474 | | #if defined(UNICODE) || defined(_UNICODE) |
475 | | # define __itt_thread_set_name __itt_thread_set_nameW |
476 | | # define __itt_thread_set_name_ptr __itt_thread_set_nameW_ptr |
477 | | #else /* UNICODE */ |
478 | | # define __itt_thread_set_name __itt_thread_set_nameA |
479 | | # define __itt_thread_set_name_ptr __itt_thread_set_nameA_ptr |
480 | | #endif /* UNICODE */ |
481 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
482 | | void ITTAPI __itt_thread_set_name(const char *name); |
483 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
484 | | |
485 | | /** @cond exclude_from_documentation */ |
486 | | #ifndef INTEL_NO_MACRO_BODY |
487 | | #ifndef INTEL_NO_ITTNOTIFY_API |
488 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
489 | | ITT_STUBV(ITTAPI, void, thread_set_nameA, (const char *name)) |
490 | | ITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name)) |
491 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
492 | | ITT_STUBV(ITTAPI, void, thread_set_name, (const char *name)) |
493 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
494 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
495 | | #define __itt_thread_set_nameA ITTNOTIFY_VOID(thread_set_nameA) |
496 | | #define __itt_thread_set_nameA_ptr ITTNOTIFY_NAME(thread_set_nameA) |
497 | | #define __itt_thread_set_nameW ITTNOTIFY_VOID(thread_set_nameW) |
498 | | #define __itt_thread_set_nameW_ptr ITTNOTIFY_NAME(thread_set_nameW) |
499 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
500 | 31 | #define __itt_thread_set_name ITTNOTIFY_VOID(thread_set_name) |
501 | | #define __itt_thread_set_name_ptr ITTNOTIFY_NAME(thread_set_name) |
502 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
503 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
504 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
505 | | #define __itt_thread_set_nameA(name) |
506 | | #define __itt_thread_set_nameA_ptr 0 |
507 | | #define __itt_thread_set_nameW(name) |
508 | | #define __itt_thread_set_nameW_ptr 0 |
509 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
510 | | #define __itt_thread_set_name(name) |
511 | | #define __itt_thread_set_name_ptr 0 |
512 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
513 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
514 | | #else /* INTEL_NO_MACRO_BODY */ |
515 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
516 | | #define __itt_thread_set_nameA_ptr 0 |
517 | | #define __itt_thread_set_nameW_ptr 0 |
518 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
519 | | #define __itt_thread_set_name_ptr 0 |
520 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
521 | | #endif /* INTEL_NO_MACRO_BODY */ |
522 | | /** @endcond */ |
523 | | |
524 | | /** @cond exclude_from_gpa_documentation */ |
525 | | |
526 | | /** |
527 | | * @brief Mark current thread as ignored from this point on, for the duration of its existence. |
528 | | */ |
529 | | void ITTAPI __itt_thread_ignore(void); |
530 | | |
531 | | /** @cond exclude_from_documentation */ |
532 | | #ifndef INTEL_NO_MACRO_BODY |
533 | | #ifndef INTEL_NO_ITTNOTIFY_API |
534 | | ITT_STUBV(ITTAPI, void, thread_ignore, (void)) |
535 | | #define __itt_thread_ignore ITTNOTIFY_VOID(thread_ignore) |
536 | | #define __itt_thread_ignore_ptr ITTNOTIFY_NAME(thread_ignore) |
537 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
538 | | #define __itt_thread_ignore() |
539 | | #define __itt_thread_ignore_ptr 0 |
540 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
541 | | #else /* INTEL_NO_MACRO_BODY */ |
542 | | #define __itt_thread_ignore_ptr 0 |
543 | | #endif /* INTEL_NO_MACRO_BODY */ |
544 | | /** @endcond */ |
545 | | /** @} threads group */ |
546 | | |
547 | | /** |
548 | | * @defgroup suppress Error suppression |
549 | | * @ingroup public |
550 | | * General behavior: application continues to run, but errors are suppressed |
551 | | * |
552 | | * @{ |
553 | | */ |
554 | | |
555 | | /*****************************************************************//** |
556 | | * @name group of functions used for error suppression in correctness tools |
557 | | *********************************************************************/ |
558 | | /** @{ */ |
559 | | /** |
560 | | * @hideinitializer |
561 | | * @brief possible value for suppression mask |
562 | | */ |
563 | | #define __itt_suppress_all_errors 0x7fffffff |
564 | | |
565 | | /** |
566 | | * @hideinitializer |
567 | | * @brief possible value for suppression mask (suppresses errors from threading analysis) |
568 | | */ |
569 | | #define __itt_suppress_threading_errors 0x000000ff |
570 | | |
571 | | /** |
572 | | * @hideinitializer |
573 | | * @brief possible value for suppression mask (suppresses errors from memory analysis) |
574 | | */ |
575 | | #define __itt_suppress_memory_errors 0x0000ff00 |
576 | | |
577 | | /** |
578 | | * @brief Start suppressing errors identified in mask on this thread |
579 | | */ |
580 | | void ITTAPI __itt_suppress_push(unsigned int mask); |
581 | | |
582 | | /** @cond exclude_from_documentation */ |
583 | | #ifndef INTEL_NO_MACRO_BODY |
584 | | #ifndef INTEL_NO_ITTNOTIFY_API |
585 | | ITT_STUBV(ITTAPI, void, suppress_push, (unsigned int mask)) |
586 | | #define __itt_suppress_push ITTNOTIFY_VOID(suppress_push) |
587 | | #define __itt_suppress_push_ptr ITTNOTIFY_NAME(suppress_push) |
588 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
589 | | #define __itt_suppress_push(mask) |
590 | | #define __itt_suppress_push_ptr 0 |
591 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
592 | | #else /* INTEL_NO_MACRO_BODY */ |
593 | | #define __itt_suppress_push_ptr 0 |
594 | | #endif /* INTEL_NO_MACRO_BODY */ |
595 | | /** @endcond */ |
596 | | |
597 | | /** |
598 | | * @brief Undo the effects of the matching call to __itt_suppress_push |
599 | | */ |
600 | | void ITTAPI __itt_suppress_pop(void); |
601 | | |
602 | | /** @cond exclude_from_documentation */ |
603 | | #ifndef INTEL_NO_MACRO_BODY |
604 | | #ifndef INTEL_NO_ITTNOTIFY_API |
605 | | ITT_STUBV(ITTAPI, void, suppress_pop, (void)) |
606 | | #define __itt_suppress_pop ITTNOTIFY_VOID(suppress_pop) |
607 | | #define __itt_suppress_pop_ptr ITTNOTIFY_NAME(suppress_pop) |
608 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
609 | | #define __itt_suppress_pop() |
610 | | #define __itt_suppress_pop_ptr 0 |
611 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
612 | | #else /* INTEL_NO_MACRO_BODY */ |
613 | | #define __itt_suppress_pop_ptr 0 |
614 | | #endif /* INTEL_NO_MACRO_BODY */ |
615 | | /** @endcond */ |
616 | | |
617 | | /** |
618 | | * @enum __itt_suppress_mode |
619 | | * @brief Enumerator for the suppressing modes |
620 | | */ |
621 | | typedef enum __itt_suppress_mode { |
622 | | __itt_unsuppress_range, |
623 | | __itt_suppress_range |
624 | | } __itt_suppress_mode_t; |
625 | | |
626 | | /** |
627 | | * @enum __itt_collection_state |
628 | | * @brief Enumerator for collection state. |
629 | | */ |
630 | | typedef enum { |
631 | | __itt_collection_uninitialized = 0, /* uninitialized */ |
632 | | __itt_collection_init_fail = 1, /* failed to init */ |
633 | | __itt_collection_collector_absent = 2, /* non work state collector is absent */ |
634 | | __itt_collection_collector_exists = 3, /* work state collector exists */ |
635 | | __itt_collection_init_successful = 4 /* success to init */ |
636 | | } __itt_collection_state; |
637 | | |
638 | | /** |
639 | | * @brief Mark a range of memory for error suppression or unsuppression for error types included in mask |
640 | | */ |
641 | | void ITTAPI __itt_suppress_mark_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size); |
642 | | |
643 | | /** @cond exclude_from_documentation */ |
644 | | #ifndef INTEL_NO_MACRO_BODY |
645 | | #ifndef INTEL_NO_ITTNOTIFY_API |
646 | | ITT_STUBV(ITTAPI, void, suppress_mark_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size)) |
647 | | #define __itt_suppress_mark_range ITTNOTIFY_VOID(suppress_mark_range) |
648 | | #define __itt_suppress_mark_range_ptr ITTNOTIFY_NAME(suppress_mark_range) |
649 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
650 | | #define __itt_suppress_mark_range(mask) |
651 | | #define __itt_suppress_mark_range_ptr 0 |
652 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
653 | | #else /* INTEL_NO_MACRO_BODY */ |
654 | | #define __itt_suppress_mark_range_ptr 0 |
655 | | #endif /* INTEL_NO_MACRO_BODY */ |
656 | | /** @endcond */ |
657 | | |
658 | | /** |
659 | | * @brief Undo the effect of a matching call to __itt_suppress_mark_range. If not matching |
660 | | * call is found, nothing is changed. |
661 | | */ |
662 | | void ITTAPI __itt_suppress_clear_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size); |
663 | | |
664 | | /** @cond exclude_from_documentation */ |
665 | | #ifndef INTEL_NO_MACRO_BODY |
666 | | #ifndef INTEL_NO_ITTNOTIFY_API |
667 | | ITT_STUBV(ITTAPI, void, suppress_clear_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size)) |
668 | | #define __itt_suppress_clear_range ITTNOTIFY_VOID(suppress_clear_range) |
669 | | #define __itt_suppress_clear_range_ptr ITTNOTIFY_NAME(suppress_clear_range) |
670 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
671 | | #define __itt_suppress_clear_range(mask) |
672 | | #define __itt_suppress_clear_range_ptr 0 |
673 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
674 | | #else /* INTEL_NO_MACRO_BODY */ |
675 | | #define __itt_suppress_clear_range_ptr 0 |
676 | | #endif /* INTEL_NO_MACRO_BODY */ |
677 | | /** @endcond */ |
678 | | /** @} */ |
679 | | /** @} suppress group */ |
680 | | |
681 | | /** |
682 | | * @defgroup sync Synchronization |
683 | | * @ingroup public |
684 | | * Indicate user-written synchronization code |
685 | | * @{ |
686 | | */ |
687 | | /** |
688 | | * @hideinitializer |
689 | | * @brief possible value of attribute argument for sync object type |
690 | | */ |
691 | | #define __itt_attr_barrier 1 |
692 | | |
693 | | /** |
694 | | * @hideinitializer |
695 | | * @brief possible value of attribute argument for sync object type |
696 | | */ |
697 | | #define __itt_attr_mutex 2 |
698 | | |
699 | | /** |
700 | | @brief Name a synchronization object |
701 | | @param[in] addr Handle for the synchronization object. You should |
702 | | use a real address to uniquely identify the synchronization object. |
703 | | @param[in] objtype null-terminated object type string. If NULL is |
704 | | passed, the name will be "User Synchronization". |
705 | | @param[in] objname null-terminated object name string. If NULL, |
706 | | no name will be assigned to the object. |
707 | | @param[in] attribute one of [#__itt_attr_barrier, #__itt_attr_mutex] |
708 | | */ |
709 | | |
710 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
711 | | void ITTAPI __itt_sync_createA(void *addr, const char *objtype, const char *objname, int attribute); |
712 | | void ITTAPI __itt_sync_createW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute); |
713 | | #if defined(UNICODE) || defined(_UNICODE) |
714 | | # define __itt_sync_create __itt_sync_createW |
715 | | # define __itt_sync_create_ptr __itt_sync_createW_ptr |
716 | | #else /* UNICODE */ |
717 | | # define __itt_sync_create __itt_sync_createA |
718 | | # define __itt_sync_create_ptr __itt_sync_createA_ptr |
719 | | #endif /* UNICODE */ |
720 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
721 | | void ITTAPI __itt_sync_create (void *addr, const char *objtype, const char *objname, int attribute); |
722 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
723 | | |
724 | | /** @cond exclude_from_documentation */ |
725 | | #ifndef INTEL_NO_MACRO_BODY |
726 | | #ifndef INTEL_NO_ITTNOTIFY_API |
727 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
728 | | ITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char *objtype, const char *objname, int attribute)) |
729 | | ITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute)) |
730 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
731 | | ITT_STUBV(ITTAPI, void, sync_create, (void *addr, const char* objtype, const char* objname, int attribute)) |
732 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
733 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
734 | | #define __itt_sync_createA ITTNOTIFY_VOID(sync_createA) |
735 | | #define __itt_sync_createA_ptr ITTNOTIFY_NAME(sync_createA) |
736 | | #define __itt_sync_createW ITTNOTIFY_VOID(sync_createW) |
737 | | #define __itt_sync_createW_ptr ITTNOTIFY_NAME(sync_createW) |
738 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
739 | | #define __itt_sync_create ITTNOTIFY_VOID(sync_create) |
740 | | #define __itt_sync_create_ptr ITTNOTIFY_NAME(sync_create) |
741 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
742 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
743 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
744 | | #define __itt_sync_createA(addr, objtype, objname, attribute) |
745 | | #define __itt_sync_createA_ptr 0 |
746 | | #define __itt_sync_createW(addr, objtype, objname, attribute) |
747 | | #define __itt_sync_createW_ptr 0 |
748 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
749 | | #define __itt_sync_create(addr, objtype, objname, attribute) |
750 | | #define __itt_sync_create_ptr 0 |
751 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
752 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
753 | | #else /* INTEL_NO_MACRO_BODY */ |
754 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
755 | | #define __itt_sync_createA_ptr 0 |
756 | | #define __itt_sync_createW_ptr 0 |
757 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
758 | | #define __itt_sync_create_ptr 0 |
759 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
760 | | #endif /* INTEL_NO_MACRO_BODY */ |
761 | | /** @endcond */ |
762 | | |
763 | | /** |
764 | | @brief Rename a synchronization object |
765 | | |
766 | | You can use the rename call to assign or reassign a name to a given |
767 | | synchronization object. |
768 | | @param[in] addr handle for the synchronization object. |
769 | | @param[in] name null-terminated object name string. |
770 | | */ |
771 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
772 | | void ITTAPI __itt_sync_renameA(void *addr, const char *name); |
773 | | void ITTAPI __itt_sync_renameW(void *addr, const wchar_t *name); |
774 | | #if defined(UNICODE) || defined(_UNICODE) |
775 | | # define __itt_sync_rename __itt_sync_renameW |
776 | | # define __itt_sync_rename_ptr __itt_sync_renameW_ptr |
777 | | #else /* UNICODE */ |
778 | | # define __itt_sync_rename __itt_sync_renameA |
779 | | # define __itt_sync_rename_ptr __itt_sync_renameA_ptr |
780 | | #endif /* UNICODE */ |
781 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
782 | | void ITTAPI __itt_sync_rename(void *addr, const char *name); |
783 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
784 | | |
785 | | /** @cond exclude_from_documentation */ |
786 | | #ifndef INTEL_NO_MACRO_BODY |
787 | | #ifndef INTEL_NO_ITTNOTIFY_API |
788 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
789 | | ITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char *name)) |
790 | | ITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name)) |
791 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
792 | | ITT_STUBV(ITTAPI, void, sync_rename, (void *addr, const char *name)) |
793 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
794 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
795 | | #define __itt_sync_renameA ITTNOTIFY_VOID(sync_renameA) |
796 | | #define __itt_sync_renameA_ptr ITTNOTIFY_NAME(sync_renameA) |
797 | | #define __itt_sync_renameW ITTNOTIFY_VOID(sync_renameW) |
798 | | #define __itt_sync_renameW_ptr ITTNOTIFY_NAME(sync_renameW) |
799 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
800 | | #define __itt_sync_rename ITTNOTIFY_VOID(sync_rename) |
801 | | #define __itt_sync_rename_ptr ITTNOTIFY_NAME(sync_rename) |
802 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
803 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
804 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
805 | | #define __itt_sync_renameA(addr, name) |
806 | | #define __itt_sync_renameA_ptr 0 |
807 | | #define __itt_sync_renameW(addr, name) |
808 | | #define __itt_sync_renameW_ptr 0 |
809 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
810 | | #define __itt_sync_rename(addr, name) |
811 | | #define __itt_sync_rename_ptr 0 |
812 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
813 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
814 | | #else /* INTEL_NO_MACRO_BODY */ |
815 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
816 | | #define __itt_sync_renameA_ptr 0 |
817 | | #define __itt_sync_renameW_ptr 0 |
818 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
819 | | #define __itt_sync_rename_ptr 0 |
820 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
821 | | #endif /* INTEL_NO_MACRO_BODY */ |
822 | | /** @endcond */ |
823 | | |
824 | | /** |
825 | | @brief Destroy a synchronization object. |
826 | | @param addr Handle for the synchronization object. |
827 | | */ |
828 | | void ITTAPI __itt_sync_destroy(void *addr); |
829 | | |
830 | | /** @cond exclude_from_documentation */ |
831 | | #ifndef INTEL_NO_MACRO_BODY |
832 | | #ifndef INTEL_NO_ITTNOTIFY_API |
833 | | ITT_STUBV(ITTAPI, void, sync_destroy, (void *addr)) |
834 | | #define __itt_sync_destroy ITTNOTIFY_VOID(sync_destroy) |
835 | | #define __itt_sync_destroy_ptr ITTNOTIFY_NAME(sync_destroy) |
836 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
837 | | #define __itt_sync_destroy(addr) |
838 | | #define __itt_sync_destroy_ptr 0 |
839 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
840 | | #else /* INTEL_NO_MACRO_BODY */ |
841 | | #define __itt_sync_destroy_ptr 0 |
842 | | #endif /* INTEL_NO_MACRO_BODY */ |
843 | | /** @endcond */ |
844 | | |
845 | | /*****************************************************************//** |
846 | | * @name group of functions is used for performance measurement tools |
847 | | *********************************************************************/ |
848 | | /** @{ */ |
849 | | /** |
850 | | * @brief Enter spin loop on user-defined sync object |
851 | | */ |
852 | | void ITTAPI __itt_sync_prepare(void* addr); |
853 | | |
854 | | /** @cond exclude_from_documentation */ |
855 | | #ifndef INTEL_NO_MACRO_BODY |
856 | | #ifndef INTEL_NO_ITTNOTIFY_API |
857 | | ITT_STUBV(ITTAPI, void, sync_prepare, (void *addr)) |
858 | | #define __itt_sync_prepare ITTNOTIFY_VOID(sync_prepare) |
859 | | #define __itt_sync_prepare_ptr ITTNOTIFY_NAME(sync_prepare) |
860 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
861 | | #define __itt_sync_prepare(addr) |
862 | | #define __itt_sync_prepare_ptr 0 |
863 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
864 | | #else /* INTEL_NO_MACRO_BODY */ |
865 | | #define __itt_sync_prepare_ptr 0 |
866 | | #endif /* INTEL_NO_MACRO_BODY */ |
867 | | /** @endcond */ |
868 | | |
869 | | /** |
870 | | * @brief Quit spin loop without acquiring spin object |
871 | | */ |
872 | | void ITTAPI __itt_sync_cancel(void *addr); |
873 | | |
874 | | /** @cond exclude_from_documentation */ |
875 | | #ifndef INTEL_NO_MACRO_BODY |
876 | | #ifndef INTEL_NO_ITTNOTIFY_API |
877 | | ITT_STUBV(ITTAPI, void, sync_cancel, (void *addr)) |
878 | | #define __itt_sync_cancel ITTNOTIFY_VOID(sync_cancel) |
879 | | #define __itt_sync_cancel_ptr ITTNOTIFY_NAME(sync_cancel) |
880 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
881 | | #define __itt_sync_cancel(addr) |
882 | | #define __itt_sync_cancel_ptr 0 |
883 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
884 | | #else /* INTEL_NO_MACRO_BODY */ |
885 | | #define __itt_sync_cancel_ptr 0 |
886 | | #endif /* INTEL_NO_MACRO_BODY */ |
887 | | /** @endcond */ |
888 | | |
889 | | /** |
890 | | * @brief Successful spin loop completion (sync object acquired) |
891 | | */ |
892 | | void ITTAPI __itt_sync_acquired(void *addr); |
893 | | |
894 | | /** @cond exclude_from_documentation */ |
895 | | #ifndef INTEL_NO_MACRO_BODY |
896 | | #ifndef INTEL_NO_ITTNOTIFY_API |
897 | | ITT_STUBV(ITTAPI, void, sync_acquired, (void *addr)) |
898 | | #define __itt_sync_acquired ITTNOTIFY_VOID(sync_acquired) |
899 | | #define __itt_sync_acquired_ptr ITTNOTIFY_NAME(sync_acquired) |
900 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
901 | | #define __itt_sync_acquired(addr) |
902 | | #define __itt_sync_acquired_ptr 0 |
903 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
904 | | #else /* INTEL_NO_MACRO_BODY */ |
905 | | #define __itt_sync_acquired_ptr 0 |
906 | | #endif /* INTEL_NO_MACRO_BODY */ |
907 | | /** @endcond */ |
908 | | |
909 | | /** |
910 | | * @brief Start sync object releasing code. Is called before the lock release call. |
911 | | */ |
912 | | void ITTAPI __itt_sync_releasing(void* addr); |
913 | | |
914 | | /** @cond exclude_from_documentation */ |
915 | | #ifndef INTEL_NO_MACRO_BODY |
916 | | #ifndef INTEL_NO_ITTNOTIFY_API |
917 | | ITT_STUBV(ITTAPI, void, sync_releasing, (void *addr)) |
918 | | #define __itt_sync_releasing ITTNOTIFY_VOID(sync_releasing) |
919 | | #define __itt_sync_releasing_ptr ITTNOTIFY_NAME(sync_releasing) |
920 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
921 | | #define __itt_sync_releasing(addr) |
922 | | #define __itt_sync_releasing_ptr 0 |
923 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
924 | | #else /* INTEL_NO_MACRO_BODY */ |
925 | | #define __itt_sync_releasing_ptr 0 |
926 | | #endif /* INTEL_NO_MACRO_BODY */ |
927 | | /** @endcond */ |
928 | | /** @} */ |
929 | | |
930 | | /** @} sync group */ |
931 | | |
932 | | /**************************************************************//** |
933 | | * @name group of functions is used for correctness checking tools |
934 | | ******************************************************************/ |
935 | | /** @{ */ |
936 | | /** |
937 | | * @ingroup legacy |
938 | | * @deprecated Legacy API |
939 | | * @brief Fast synchronization which does no require spinning. |
940 | | * - This special function is to be used by TBB and OpenMP libraries only when they know |
941 | | * there is no spin but they need to suppress TC warnings about shared variable modifications. |
942 | | * - It only has corresponding pointers in static library and does not have corresponding function |
943 | | * in dynamic library. |
944 | | * @see void __itt_sync_prepare(void* addr); |
945 | | */ |
946 | | void ITTAPI __itt_fsync_prepare(void* addr); |
947 | | |
948 | | /** @cond exclude_from_documentation */ |
949 | | #ifndef INTEL_NO_MACRO_BODY |
950 | | #ifndef INTEL_NO_ITTNOTIFY_API |
951 | | ITT_STUBV(ITTAPI, void, fsync_prepare, (void *addr)) |
952 | | #define __itt_fsync_prepare ITTNOTIFY_VOID(fsync_prepare) |
953 | | #define __itt_fsync_prepare_ptr ITTNOTIFY_NAME(fsync_prepare) |
954 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
955 | | #define __itt_fsync_prepare(addr) |
956 | | #define __itt_fsync_prepare_ptr 0 |
957 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
958 | | #else /* INTEL_NO_MACRO_BODY */ |
959 | | #define __itt_fsync_prepare_ptr 0 |
960 | | #endif /* INTEL_NO_MACRO_BODY */ |
961 | | /** @endcond */ |
962 | | |
963 | | /** |
964 | | * @ingroup legacy |
965 | | * @deprecated Legacy API |
966 | | * @brief Fast synchronization which does no require spinning. |
967 | | * - This special function is to be used by TBB and OpenMP libraries only when they know |
968 | | * there is no spin but they need to suppress TC warnings about shared variable modifications. |
969 | | * - It only has corresponding pointers in static library and does not have corresponding function |
970 | | * in dynamic library. |
971 | | * @see void __itt_sync_cancel(void *addr); |
972 | | */ |
973 | | void ITTAPI __itt_fsync_cancel(void *addr); |
974 | | |
975 | | /** @cond exclude_from_documentation */ |
976 | | #ifndef INTEL_NO_MACRO_BODY |
977 | | #ifndef INTEL_NO_ITTNOTIFY_API |
978 | | ITT_STUBV(ITTAPI, void, fsync_cancel, (void *addr)) |
979 | | #define __itt_fsync_cancel ITTNOTIFY_VOID(fsync_cancel) |
980 | | #define __itt_fsync_cancel_ptr ITTNOTIFY_NAME(fsync_cancel) |
981 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
982 | | #define __itt_fsync_cancel(addr) |
983 | | #define __itt_fsync_cancel_ptr 0 |
984 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
985 | | #else /* INTEL_NO_MACRO_BODY */ |
986 | | #define __itt_fsync_cancel_ptr 0 |
987 | | #endif /* INTEL_NO_MACRO_BODY */ |
988 | | /** @endcond */ |
989 | | |
990 | | /** |
991 | | * @ingroup legacy |
992 | | * @deprecated Legacy API |
993 | | * @brief Fast synchronization which does no require spinning. |
994 | | * - This special function is to be used by TBB and OpenMP libraries only when they know |
995 | | * there is no spin but they need to suppress TC warnings about shared variable modifications. |
996 | | * - It only has corresponding pointers in static library and does not have corresponding function |
997 | | * in dynamic library. |
998 | | * @see void __itt_sync_acquired(void *addr); |
999 | | */ |
1000 | | void ITTAPI __itt_fsync_acquired(void *addr); |
1001 | | |
1002 | | /** @cond exclude_from_documentation */ |
1003 | | #ifndef INTEL_NO_MACRO_BODY |
1004 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1005 | | ITT_STUBV(ITTAPI, void, fsync_acquired, (void *addr)) |
1006 | | #define __itt_fsync_acquired ITTNOTIFY_VOID(fsync_acquired) |
1007 | | #define __itt_fsync_acquired_ptr ITTNOTIFY_NAME(fsync_acquired) |
1008 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1009 | | #define __itt_fsync_acquired(addr) |
1010 | | #define __itt_fsync_acquired_ptr 0 |
1011 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1012 | | #else /* INTEL_NO_MACRO_BODY */ |
1013 | | #define __itt_fsync_acquired_ptr 0 |
1014 | | #endif /* INTEL_NO_MACRO_BODY */ |
1015 | | /** @endcond */ |
1016 | | |
1017 | | /** |
1018 | | * @ingroup legacy |
1019 | | * @deprecated Legacy API |
1020 | | * @brief Fast synchronization which does no require spinning. |
1021 | | * - This special function is to be used by TBB and OpenMP libraries only when they know |
1022 | | * there is no spin but they need to suppress TC warnings about shared variable modifications. |
1023 | | * - It only has corresponding pointers in static library and does not have corresponding function |
1024 | | * in dynamic library. |
1025 | | * @see void __itt_sync_releasing(void* addr); |
1026 | | */ |
1027 | | void ITTAPI __itt_fsync_releasing(void* addr); |
1028 | | |
1029 | | /** @cond exclude_from_documentation */ |
1030 | | #ifndef INTEL_NO_MACRO_BODY |
1031 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1032 | | ITT_STUBV(ITTAPI, void, fsync_releasing, (void *addr)) |
1033 | | #define __itt_fsync_releasing ITTNOTIFY_VOID(fsync_releasing) |
1034 | | #define __itt_fsync_releasing_ptr ITTNOTIFY_NAME(fsync_releasing) |
1035 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1036 | | #define __itt_fsync_releasing(addr) |
1037 | | #define __itt_fsync_releasing_ptr 0 |
1038 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1039 | | #else /* INTEL_NO_MACRO_BODY */ |
1040 | | #define __itt_fsync_releasing_ptr 0 |
1041 | | #endif /* INTEL_NO_MACRO_BODY */ |
1042 | | /** @endcond */ |
1043 | | /** @} */ |
1044 | | |
1045 | | /** |
1046 | | * @defgroup model Modeling by Intel(R) Parallel Advisor |
1047 | | * @ingroup public |
1048 | | * This is the subset of itt used for modeling by Intel(R) Parallel Advisor. |
1049 | | * This API is called ONLY using annotate.h, by "Annotation" macros |
1050 | | * the user places in their sources during the parallelism modeling steps. |
1051 | | * |
1052 | | * site_begin/end and task_begin/end take the address of handle variables, |
1053 | | * which are writeable by the API. Handles must be 0 initialized prior |
1054 | | * to the first call to begin, or may cause a run-time failure. |
1055 | | * The handles are initialized in a multi-thread safe way by the API if |
1056 | | * the handle is 0. The commonly expected idiom is one static handle to |
1057 | | * identify a site or task. If a site or task of the same name has already |
1058 | | * been started during this collection, the same handle MAY be returned, |
1059 | | * but is not required to be - it is unspecified if data merging is done |
1060 | | * based on name. These routines also take an instance variable. Like |
1061 | | * the lexical instance, these must be 0 initialized. Unlike the lexical |
1062 | | * instance, this is used to track a single dynamic instance. |
1063 | | * |
1064 | | * API used by the Intel(R) Parallel Advisor to describe potential concurrency |
1065 | | * and related activities. User-added source annotations expand to calls |
1066 | | * to these procedures to enable modeling of a hypothetical concurrent |
1067 | | * execution serially. |
1068 | | * @{ |
1069 | | */ |
1070 | | #if !defined(_ADVISOR_ANNOTATE_H_) || defined(ANNOTATE_EXPAND_NULL) |
1071 | | |
1072 | | typedef void* __itt_model_site; /*!< @brief handle for lexical site */ |
1073 | | typedef void* __itt_model_site_instance; /*!< @brief handle for dynamic instance */ |
1074 | | typedef void* __itt_model_task; /*!< @brief handle for lexical site */ |
1075 | | typedef void* __itt_model_task_instance; /*!< @brief handle for dynamic instance */ |
1076 | | |
1077 | | /** |
1078 | | * @enum __itt_model_disable |
1079 | | * @brief Enumerator for the disable methods |
1080 | | */ |
1081 | | typedef enum { |
1082 | | __itt_model_disable_observation, |
1083 | | __itt_model_disable_collection |
1084 | | } __itt_model_disable; |
1085 | | |
1086 | | #endif /* !_ADVISOR_ANNOTATE_H_ || ANNOTATE_EXPAND_NULL */ |
1087 | | |
1088 | | /** |
1089 | | * @brief ANNOTATE_SITE_BEGIN/ANNOTATE_SITE_END support. |
1090 | | * |
1091 | | * site_begin/end model a potential concurrency site. |
1092 | | * site instances may be recursively nested with themselves. |
1093 | | * site_end exits the most recently started but unended site for the current |
1094 | | * thread. The handle passed to end may be used to validate structure. |
1095 | | * Instances of a site encountered on different threads concurrently |
1096 | | * are considered completely distinct. If the site name for two different |
1097 | | * lexical sites match, it is unspecified whether they are treated as the |
1098 | | * same or different for data presentation. |
1099 | | */ |
1100 | | void ITTAPI __itt_model_site_begin(__itt_model_site *site, __itt_model_site_instance *instance, const char *name); |
1101 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1102 | | void ITTAPI __itt_model_site_beginW(const wchar_t *name); |
1103 | | #endif |
1104 | | void ITTAPI __itt_model_site_beginA(const char *name); |
1105 | | void ITTAPI __itt_model_site_beginAL(const char *name, size_t siteNameLen); |
1106 | | void ITTAPI __itt_model_site_end (__itt_model_site *site, __itt_model_site_instance *instance); |
1107 | | void ITTAPI __itt_model_site_end_2(void); |
1108 | | |
1109 | | /** @cond exclude_from_documentation */ |
1110 | | #ifndef INTEL_NO_MACRO_BODY |
1111 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1112 | | ITT_STUBV(ITTAPI, void, model_site_begin, (__itt_model_site *site, __itt_model_site_instance *instance, const char *name)) |
1113 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1114 | | ITT_STUBV(ITTAPI, void, model_site_beginW, (const wchar_t *name)) |
1115 | | #endif |
1116 | | ITT_STUBV(ITTAPI, void, model_site_beginA, (const char *name)) |
1117 | | ITT_STUBV(ITTAPI, void, model_site_beginAL, (const char *name, size_t siteNameLen)) |
1118 | | ITT_STUBV(ITTAPI, void, model_site_end, (__itt_model_site *site, __itt_model_site_instance *instance)) |
1119 | | ITT_STUBV(ITTAPI, void, model_site_end_2, (void)) |
1120 | | #define __itt_model_site_begin ITTNOTIFY_VOID(model_site_begin) |
1121 | | #define __itt_model_site_begin_ptr ITTNOTIFY_NAME(model_site_begin) |
1122 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1123 | | #define __itt_model_site_beginW ITTNOTIFY_VOID(model_site_beginW) |
1124 | | #define __itt_model_site_beginW_ptr ITTNOTIFY_NAME(model_site_beginW) |
1125 | | #endif |
1126 | | #define __itt_model_site_beginA ITTNOTIFY_VOID(model_site_beginA) |
1127 | | #define __itt_model_site_beginA_ptr ITTNOTIFY_NAME(model_site_beginA) |
1128 | | #define __itt_model_site_beginAL ITTNOTIFY_VOID(model_site_beginAL) |
1129 | | #define __itt_model_site_beginAL_ptr ITTNOTIFY_NAME(model_site_beginAL) |
1130 | | #define __itt_model_site_end ITTNOTIFY_VOID(model_site_end) |
1131 | | #define __itt_model_site_end_ptr ITTNOTIFY_NAME(model_site_end) |
1132 | | #define __itt_model_site_end_2 ITTNOTIFY_VOID(model_site_end_2) |
1133 | | #define __itt_model_site_end_2_ptr ITTNOTIFY_NAME(model_site_end_2) |
1134 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1135 | | #define __itt_model_site_begin(site, instance, name) |
1136 | | #define __itt_model_site_begin_ptr 0 |
1137 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1138 | | #define __itt_model_site_beginW(name) |
1139 | | #define __itt_model_site_beginW_ptr 0 |
1140 | | #endif |
1141 | | #define __itt_model_site_beginA(name) |
1142 | | #define __itt_model_site_beginA_ptr 0 |
1143 | | #define __itt_model_site_beginAL(name, siteNameLen) |
1144 | | #define __itt_model_site_beginAL_ptr 0 |
1145 | | #define __itt_model_site_end(site, instance) |
1146 | | #define __itt_model_site_end_ptr 0 |
1147 | | #define __itt_model_site_end_2() |
1148 | | #define __itt_model_site_end_2_ptr 0 |
1149 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1150 | | #else /* INTEL_NO_MACRO_BODY */ |
1151 | | #define __itt_model_site_begin_ptr 0 |
1152 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1153 | | #define __itt_model_site_beginW_ptr 0 |
1154 | | #endif |
1155 | | #define __itt_model_site_beginA_ptr 0 |
1156 | | #define __itt_model_site_beginAL_ptr 0 |
1157 | | #define __itt_model_site_end_ptr 0 |
1158 | | #define __itt_model_site_end_2_ptr 0 |
1159 | | #endif /* INTEL_NO_MACRO_BODY */ |
1160 | | /** @endcond */ |
1161 | | |
1162 | | /** |
1163 | | * @brief ANNOTATE_TASK_BEGIN/ANNOTATE_TASK_END support |
1164 | | * |
1165 | | * task_begin/end model a potential task, which is contained within the most |
1166 | | * closely enclosing dynamic site. task_end exits the most recently started |
1167 | | * but unended task. The handle passed to end may be used to validate |
1168 | | * structure. It is unspecified if bad dynamic nesting is detected. If it |
1169 | | * is, it should be encoded in the resulting data collection. The collector |
1170 | | * should not fail due to construct nesting issues, nor attempt to directly |
1171 | | * indicate the problem. |
1172 | | */ |
1173 | | void ITTAPI __itt_model_task_begin(__itt_model_task *task, __itt_model_task_instance *instance, const char *name); |
1174 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1175 | | void ITTAPI __itt_model_task_beginW(const wchar_t *name); |
1176 | | void ITTAPI __itt_model_iteration_taskW(const wchar_t *name); |
1177 | | #endif |
1178 | | void ITTAPI __itt_model_task_beginA(const char *name); |
1179 | | void ITTAPI __itt_model_task_beginAL(const char *name, size_t taskNameLen); |
1180 | | void ITTAPI __itt_model_iteration_taskA(const char *name); |
1181 | | void ITTAPI __itt_model_iteration_taskAL(const char *name, size_t taskNameLen); |
1182 | | void ITTAPI __itt_model_task_end (__itt_model_task *task, __itt_model_task_instance *instance); |
1183 | | void ITTAPI __itt_model_task_end_2(void); |
1184 | | |
1185 | | /** @cond exclude_from_documentation */ |
1186 | | #ifndef INTEL_NO_MACRO_BODY |
1187 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1188 | | ITT_STUBV(ITTAPI, void, model_task_begin, (__itt_model_task *task, __itt_model_task_instance *instance, const char *name)) |
1189 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1190 | | ITT_STUBV(ITTAPI, void, model_task_beginW, (const wchar_t *name)) |
1191 | | ITT_STUBV(ITTAPI, void, model_iteration_taskW, (const wchar_t *name)) |
1192 | | #endif |
1193 | | ITT_STUBV(ITTAPI, void, model_task_beginA, (const char *name)) |
1194 | | ITT_STUBV(ITTAPI, void, model_task_beginAL, (const char *name, size_t taskNameLen)) |
1195 | | ITT_STUBV(ITTAPI, void, model_iteration_taskA, (const char *name)) |
1196 | | ITT_STUBV(ITTAPI, void, model_iteration_taskAL, (const char *name, size_t taskNameLen)) |
1197 | | ITT_STUBV(ITTAPI, void, model_task_end, (__itt_model_task *task, __itt_model_task_instance *instance)) |
1198 | | ITT_STUBV(ITTAPI, void, model_task_end_2, (void)) |
1199 | | #define __itt_model_task_begin ITTNOTIFY_VOID(model_task_begin) |
1200 | | #define __itt_model_task_begin_ptr ITTNOTIFY_NAME(model_task_begin) |
1201 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1202 | | #define __itt_model_task_beginW ITTNOTIFY_VOID(model_task_beginW) |
1203 | | #define __itt_model_task_beginW_ptr ITTNOTIFY_NAME(model_task_beginW) |
1204 | | #define __itt_model_iteration_taskW ITTNOTIFY_VOID(model_iteration_taskW) |
1205 | | #define __itt_model_iteration_taskW_ptr ITTNOTIFY_NAME(model_iteration_taskW) |
1206 | | #endif |
1207 | | #define __itt_model_task_beginA ITTNOTIFY_VOID(model_task_beginA) |
1208 | | #define __itt_model_task_beginA_ptr ITTNOTIFY_NAME(model_task_beginA) |
1209 | | #define __itt_model_task_beginAL ITTNOTIFY_VOID(model_task_beginAL) |
1210 | | #define __itt_model_task_beginAL_ptr ITTNOTIFY_NAME(model_task_beginAL) |
1211 | | #define __itt_model_iteration_taskA ITTNOTIFY_VOID(model_iteration_taskA) |
1212 | | #define __itt_model_iteration_taskA_ptr ITTNOTIFY_NAME(model_iteration_taskA) |
1213 | | #define __itt_model_iteration_taskAL ITTNOTIFY_VOID(model_iteration_taskAL) |
1214 | | #define __itt_model_iteration_taskAL_ptr ITTNOTIFY_NAME(model_iteration_taskAL) |
1215 | | #define __itt_model_task_end ITTNOTIFY_VOID(model_task_end) |
1216 | | #define __itt_model_task_end_ptr ITTNOTIFY_NAME(model_task_end) |
1217 | | #define __itt_model_task_end_2 ITTNOTIFY_VOID(model_task_end_2) |
1218 | | #define __itt_model_task_end_2_ptr ITTNOTIFY_NAME(model_task_end_2) |
1219 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1220 | | #define __itt_model_task_begin(task, instance, name) |
1221 | | #define __itt_model_task_begin_ptr 0 |
1222 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1223 | | #define __itt_model_task_beginW(name) |
1224 | | #define __itt_model_task_beginW_ptr 0 |
1225 | | #endif |
1226 | | #define __itt_model_task_beginA(name) |
1227 | | #define __itt_model_task_beginA_ptr 0 |
1228 | | #define __itt_model_task_beginAL(name, siteNameLen) |
1229 | | #define __itt_model_task_beginAL_ptr 0 |
1230 | | #define __itt_model_iteration_taskA(name) |
1231 | | #define __itt_model_iteration_taskA_ptr 0 |
1232 | | #define __itt_model_iteration_taskAL(name, siteNameLen) |
1233 | | #define __itt_model_iteration_taskAL_ptr 0 |
1234 | | #define __itt_model_task_end(task, instance) |
1235 | | #define __itt_model_task_end_ptr 0 |
1236 | | #define __itt_model_task_end_2() |
1237 | | #define __itt_model_task_end_2_ptr 0 |
1238 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1239 | | #else /* INTEL_NO_MACRO_BODY */ |
1240 | | #define __itt_model_task_begin_ptr 0 |
1241 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1242 | | #define __itt_model_task_beginW_ptr 0 |
1243 | | #endif |
1244 | | #define __itt_model_task_beginA_ptr 0 |
1245 | | #define __itt_model_task_beginAL_ptr 0 |
1246 | | #define __itt_model_iteration_taskA_ptr 0 |
1247 | | #define __itt_model_iteration_taskAL_ptr 0 |
1248 | | #define __itt_model_task_end_ptr 0 |
1249 | | #define __itt_model_task_end_2_ptr 0 |
1250 | | #endif /* INTEL_NO_MACRO_BODY */ |
1251 | | /** @endcond */ |
1252 | | |
1253 | | /** |
1254 | | * @brief ANNOTATE_LOCK_ACQUIRE/ANNOTATE_LOCK_RELEASE support |
1255 | | * |
1256 | | * lock_acquire/release model a potential lock for both lockset and |
1257 | | * performance modeling. Each unique address is modeled as a separate |
1258 | | * lock, with invalid addresses being valid lock IDs. Specifically: |
1259 | | * no storage is accessed by the API at the specified address - it is only |
1260 | | * used for lock identification. Lock acquires may be self-nested and are |
1261 | | * unlocked by a corresponding number of releases. |
1262 | | * (These closely correspond to __itt_sync_acquired/__itt_sync_releasing, |
1263 | | * but may not have identical semantics.) |
1264 | | */ |
1265 | | void ITTAPI __itt_model_lock_acquire(void *lock); |
1266 | | void ITTAPI __itt_model_lock_acquire_2(void *lock); |
1267 | | void ITTAPI __itt_model_lock_release(void *lock); |
1268 | | void ITTAPI __itt_model_lock_release_2(void *lock); |
1269 | | |
1270 | | /** @cond exclude_from_documentation */ |
1271 | | #ifndef INTEL_NO_MACRO_BODY |
1272 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1273 | | ITT_STUBV(ITTAPI, void, model_lock_acquire, (void *lock)) |
1274 | | ITT_STUBV(ITTAPI, void, model_lock_acquire_2, (void *lock)) |
1275 | | ITT_STUBV(ITTAPI, void, model_lock_release, (void *lock)) |
1276 | | ITT_STUBV(ITTAPI, void, model_lock_release_2, (void *lock)) |
1277 | | #define __itt_model_lock_acquire ITTNOTIFY_VOID(model_lock_acquire) |
1278 | | #define __itt_model_lock_acquire_ptr ITTNOTIFY_NAME(model_lock_acquire) |
1279 | | #define __itt_model_lock_acquire_2 ITTNOTIFY_VOID(model_lock_acquire_2) |
1280 | | #define __itt_model_lock_acquire_2_ptr ITTNOTIFY_NAME(model_lock_acquire_2) |
1281 | | #define __itt_model_lock_release ITTNOTIFY_VOID(model_lock_release) |
1282 | | #define __itt_model_lock_release_ptr ITTNOTIFY_NAME(model_lock_release) |
1283 | | #define __itt_model_lock_release_2 ITTNOTIFY_VOID(model_lock_release_2) |
1284 | | #define __itt_model_lock_release_2_ptr ITTNOTIFY_NAME(model_lock_release_2) |
1285 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1286 | | #define __itt_model_lock_acquire(lock) |
1287 | | #define __itt_model_lock_acquire_ptr 0 |
1288 | | #define __itt_model_lock_acquire_2(lock) |
1289 | | #define __itt_model_lock_acquire_2_ptr 0 |
1290 | | #define __itt_model_lock_release(lock) |
1291 | | #define __itt_model_lock_release_ptr 0 |
1292 | | #define __itt_model_lock_release_2(lock) |
1293 | | #define __itt_model_lock_release_2_ptr 0 |
1294 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1295 | | #else /* INTEL_NO_MACRO_BODY */ |
1296 | | #define __itt_model_lock_acquire_ptr 0 |
1297 | | #define __itt_model_lock_acquire_2_ptr 0 |
1298 | | #define __itt_model_lock_release_ptr 0 |
1299 | | #define __itt_model_lock_release_2_ptr 0 |
1300 | | #endif /* INTEL_NO_MACRO_BODY */ |
1301 | | /** @endcond */ |
1302 | | |
1303 | | /** |
1304 | | * @brief ANNOTATE_RECORD_ALLOCATION/ANNOTATE_RECORD_DEALLOCATION support |
1305 | | * |
1306 | | * record_allocation/deallocation describe user-defined memory allocator |
1307 | | * behavior, which may be required for correctness modeling to understand |
1308 | | * when storage is not expected to be actually reused across threads. |
1309 | | */ |
1310 | | void ITTAPI __itt_model_record_allocation (void *addr, size_t size); |
1311 | | void ITTAPI __itt_model_record_deallocation(void *addr); |
1312 | | |
1313 | | /** @cond exclude_from_documentation */ |
1314 | | #ifndef INTEL_NO_MACRO_BODY |
1315 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1316 | | ITT_STUBV(ITTAPI, void, model_record_allocation, (void *addr, size_t size)) |
1317 | | ITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr)) |
1318 | | #define __itt_model_record_allocation ITTNOTIFY_VOID(model_record_allocation) |
1319 | | #define __itt_model_record_allocation_ptr ITTNOTIFY_NAME(model_record_allocation) |
1320 | | #define __itt_model_record_deallocation ITTNOTIFY_VOID(model_record_deallocation) |
1321 | | #define __itt_model_record_deallocation_ptr ITTNOTIFY_NAME(model_record_deallocation) |
1322 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1323 | | #define __itt_model_record_allocation(addr, size) |
1324 | | #define __itt_model_record_allocation_ptr 0 |
1325 | | #define __itt_model_record_deallocation(addr) |
1326 | | #define __itt_model_record_deallocation_ptr 0 |
1327 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1328 | | #else /* INTEL_NO_MACRO_BODY */ |
1329 | | #define __itt_model_record_allocation_ptr 0 |
1330 | | #define __itt_model_record_deallocation_ptr 0 |
1331 | | #endif /* INTEL_NO_MACRO_BODY */ |
1332 | | /** @endcond */ |
1333 | | |
1334 | | /** |
1335 | | * @brief ANNOTATE_INDUCTION_USES support |
1336 | | * |
1337 | | * Note particular storage is inductive through the end of the current site |
1338 | | */ |
1339 | | void ITTAPI __itt_model_induction_uses(void* addr, size_t size); |
1340 | | |
1341 | | /** @cond exclude_from_documentation */ |
1342 | | #ifndef INTEL_NO_MACRO_BODY |
1343 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1344 | | ITT_STUBV(ITTAPI, void, model_induction_uses, (void *addr, size_t size)) |
1345 | | #define __itt_model_induction_uses ITTNOTIFY_VOID(model_induction_uses) |
1346 | | #define __itt_model_induction_uses_ptr ITTNOTIFY_NAME(model_induction_uses) |
1347 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1348 | | #define __itt_model_induction_uses(addr, size) |
1349 | | #define __itt_model_induction_uses_ptr 0 |
1350 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1351 | | #else /* INTEL_NO_MACRO_BODY */ |
1352 | | #define __itt_model_induction_uses_ptr 0 |
1353 | | #endif /* INTEL_NO_MACRO_BODY */ |
1354 | | /** @endcond */ |
1355 | | |
1356 | | /** |
1357 | | * @brief ANNOTATE_REDUCTION_USES support |
1358 | | * |
1359 | | * Note particular storage is used for reduction through the end |
1360 | | * of the current site |
1361 | | */ |
1362 | | void ITTAPI __itt_model_reduction_uses(void* addr, size_t size); |
1363 | | |
1364 | | /** @cond exclude_from_documentation */ |
1365 | | #ifndef INTEL_NO_MACRO_BODY |
1366 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1367 | | ITT_STUBV(ITTAPI, void, model_reduction_uses, (void *addr, size_t size)) |
1368 | | #define __itt_model_reduction_uses ITTNOTIFY_VOID(model_reduction_uses) |
1369 | | #define __itt_model_reduction_uses_ptr ITTNOTIFY_NAME(model_reduction_uses) |
1370 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1371 | | #define __itt_model_reduction_uses(addr, size) |
1372 | | #define __itt_model_reduction_uses_ptr 0 |
1373 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1374 | | #else /* INTEL_NO_MACRO_BODY */ |
1375 | | #define __itt_model_reduction_uses_ptr 0 |
1376 | | #endif /* INTEL_NO_MACRO_BODY */ |
1377 | | /** @endcond */ |
1378 | | |
1379 | | /** |
1380 | | * @brief ANNOTATE_OBSERVE_USES support |
1381 | | * |
1382 | | * Have correctness modeling record observations about uses of storage |
1383 | | * through the end of the current site |
1384 | | */ |
1385 | | void ITTAPI __itt_model_observe_uses(void* addr, size_t size); |
1386 | | |
1387 | | /** @cond exclude_from_documentation */ |
1388 | | #ifndef INTEL_NO_MACRO_BODY |
1389 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1390 | | ITT_STUBV(ITTAPI, void, model_observe_uses, (void *addr, size_t size)) |
1391 | | #define __itt_model_observe_uses ITTNOTIFY_VOID(model_observe_uses) |
1392 | | #define __itt_model_observe_uses_ptr ITTNOTIFY_NAME(model_observe_uses) |
1393 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1394 | | #define __itt_model_observe_uses(addr, size) |
1395 | | #define __itt_model_observe_uses_ptr 0 |
1396 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1397 | | #else /* INTEL_NO_MACRO_BODY */ |
1398 | | #define __itt_model_observe_uses_ptr 0 |
1399 | | #endif /* INTEL_NO_MACRO_BODY */ |
1400 | | /** @endcond */ |
1401 | | |
1402 | | /** |
1403 | | * @brief ANNOTATE_CLEAR_USES support |
1404 | | * |
1405 | | * Clear the special handling of a piece of storage related to induction, |
1406 | | * reduction or observe_uses |
1407 | | */ |
1408 | | void ITTAPI __itt_model_clear_uses(void* addr); |
1409 | | |
1410 | | /** @cond exclude_from_documentation */ |
1411 | | #ifndef INTEL_NO_MACRO_BODY |
1412 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1413 | | ITT_STUBV(ITTAPI, void, model_clear_uses, (void *addr)) |
1414 | | #define __itt_model_clear_uses ITTNOTIFY_VOID(model_clear_uses) |
1415 | | #define __itt_model_clear_uses_ptr ITTNOTIFY_NAME(model_clear_uses) |
1416 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1417 | | #define __itt_model_clear_uses(addr) |
1418 | | #define __itt_model_clear_uses_ptr 0 |
1419 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1420 | | #else /* INTEL_NO_MACRO_BODY */ |
1421 | | #define __itt_model_clear_uses_ptr 0 |
1422 | | #endif /* INTEL_NO_MACRO_BODY */ |
1423 | | /** @endcond */ |
1424 | | |
1425 | | /** |
1426 | | * @brief ANNOTATE_DISABLE_*_PUSH/ANNOTATE_DISABLE_*_POP support |
1427 | | * |
1428 | | * disable_push/disable_pop push and pop disabling based on a parameter. |
1429 | | * Disabling observations stops processing of memory references during |
1430 | | * correctness modeling, and all annotations that occur in the disabled |
1431 | | * region. This allows description of code that is expected to be handled |
1432 | | * specially during conversion to parallelism or that is not recognized |
1433 | | * by tools (e.g. some kinds of synchronization operations.) |
1434 | | * This mechanism causes all annotations in the disabled region, other |
1435 | | * than disable_push and disable_pop, to be ignored. (For example, this |
1436 | | * might validly be used to disable an entire parallel site and the contained |
1437 | | * tasks and locking in it for data collection purposes.) |
1438 | | * The disable for collection is a more expensive operation, but reduces |
1439 | | * collector overhead significantly. This applies to BOTH correctness data |
1440 | | * collection and performance data collection. For example, a site |
1441 | | * containing a task might only enable data collection for the first 10 |
1442 | | * iterations. Both performance and correctness data should reflect this, |
1443 | | * and the program should run as close to full speed as possible when |
1444 | | * collection is disabled. |
1445 | | */ |
1446 | | void ITTAPI __itt_model_disable_push(__itt_model_disable x); |
1447 | | void ITTAPI __itt_model_disable_pop(void); |
1448 | | void ITTAPI __itt_model_aggregate_task(size_t x); |
1449 | | |
1450 | | /** @cond exclude_from_documentation */ |
1451 | | #ifndef INTEL_NO_MACRO_BODY |
1452 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1453 | | ITT_STUBV(ITTAPI, void, model_disable_push, (__itt_model_disable x)) |
1454 | | ITT_STUBV(ITTAPI, void, model_disable_pop, (void)) |
1455 | | ITT_STUBV(ITTAPI, void, model_aggregate_task, (size_t x)) |
1456 | | #define __itt_model_disable_push ITTNOTIFY_VOID(model_disable_push) |
1457 | | #define __itt_model_disable_push_ptr ITTNOTIFY_NAME(model_disable_push) |
1458 | | #define __itt_model_disable_pop ITTNOTIFY_VOID(model_disable_pop) |
1459 | | #define __itt_model_disable_pop_ptr ITTNOTIFY_NAME(model_disable_pop) |
1460 | | #define __itt_model_aggregate_task ITTNOTIFY_VOID(model_aggregate_task) |
1461 | | #define __itt_model_aggregate_task_ptr ITTNOTIFY_NAME(model_aggregate_task) |
1462 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1463 | | #define __itt_model_disable_push(x) |
1464 | | #define __itt_model_disable_push_ptr 0 |
1465 | | #define __itt_model_disable_pop() |
1466 | | #define __itt_model_disable_pop_ptr 0 |
1467 | | #define __itt_model_aggregate_task(x) |
1468 | | #define __itt_model_aggregate_task_ptr 0 |
1469 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1470 | | #else /* INTEL_NO_MACRO_BODY */ |
1471 | | #define __itt_model_disable_push_ptr 0 |
1472 | | #define __itt_model_disable_pop_ptr 0 |
1473 | | #define __itt_model_aggregate_task_ptr 0 |
1474 | | #endif /* INTEL_NO_MACRO_BODY */ |
1475 | | /** @endcond */ |
1476 | | /** @} model group */ |
1477 | | |
1478 | | /** |
1479 | | * @defgroup heap Heap |
1480 | | * @ingroup public |
1481 | | * Heap group |
1482 | | * @{ |
1483 | | */ |
1484 | | |
1485 | | typedef void* __itt_heap_function; |
1486 | | |
1487 | | /** |
1488 | | * @brief Create an identification for heap function |
1489 | | * @return non-zero identifier or NULL |
1490 | | */ |
1491 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1492 | | __itt_heap_function ITTAPI __itt_heap_function_createA(const char* name, const char* domain); |
1493 | | __itt_heap_function ITTAPI __itt_heap_function_createW(const wchar_t* name, const wchar_t* domain); |
1494 | | #if defined(UNICODE) || defined(_UNICODE) |
1495 | | # define __itt_heap_function_create __itt_heap_function_createW |
1496 | | # define __itt_heap_function_create_ptr __itt_heap_function_createW_ptr |
1497 | | #else |
1498 | | # define __itt_heap_function_create __itt_heap_function_createA |
1499 | | # define __itt_heap_function_create_ptr __itt_heap_function_createA_ptr |
1500 | | #endif /* UNICODE */ |
1501 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1502 | | __itt_heap_function ITTAPI __itt_heap_function_create(const char* name, const char* domain); |
1503 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1504 | | |
1505 | | /** @cond exclude_from_documentation */ |
1506 | | #ifndef INTEL_NO_MACRO_BODY |
1507 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1508 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1509 | | ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char* name, const char* domain)) |
1510 | | ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t* name, const wchar_t* domain)) |
1511 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1512 | | ITT_STUB(ITTAPI, __itt_heap_function, heap_function_create, (const char* name, const char* domain)) |
1513 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1514 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1515 | | #define __itt_heap_function_createA ITTNOTIFY_DATA(heap_function_createA) |
1516 | | #define __itt_heap_function_createA_ptr ITTNOTIFY_NAME(heap_function_createA) |
1517 | | #define __itt_heap_function_createW ITTNOTIFY_DATA(heap_function_createW) |
1518 | | #define __itt_heap_function_createW_ptr ITTNOTIFY_NAME(heap_function_createW) |
1519 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1520 | | #define __itt_heap_function_create ITTNOTIFY_DATA(heap_function_create) |
1521 | | #define __itt_heap_function_create_ptr ITTNOTIFY_NAME(heap_function_create) |
1522 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1523 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1524 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1525 | | #define __itt_heap_function_createA(name, domain) (__itt_heap_function)0 |
1526 | | #define __itt_heap_function_createA_ptr 0 |
1527 | | #define __itt_heap_function_createW(name, domain) (__itt_heap_function)0 |
1528 | | #define __itt_heap_function_createW_ptr 0 |
1529 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1530 | | #define __itt_heap_function_create(name, domain) (__itt_heap_function)0 |
1531 | | #define __itt_heap_function_create_ptr 0 |
1532 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1533 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1534 | | #else /* INTEL_NO_MACRO_BODY */ |
1535 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1536 | | #define __itt_heap_function_createA_ptr 0 |
1537 | | #define __itt_heap_function_createW_ptr 0 |
1538 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1539 | | #define __itt_heap_function_create_ptr 0 |
1540 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1541 | | #endif /* INTEL_NO_MACRO_BODY */ |
1542 | | /** @endcond */ |
1543 | | |
1544 | | /** |
1545 | | * @brief Record an allocation begin occurrence. |
1546 | | */ |
1547 | | void ITTAPI __itt_heap_allocate_begin(__itt_heap_function h, size_t size, int initialized); |
1548 | | |
1549 | | /** @cond exclude_from_documentation */ |
1550 | | #ifndef INTEL_NO_MACRO_BODY |
1551 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1552 | | ITT_STUBV(ITTAPI, void, heap_allocate_begin, (__itt_heap_function h, size_t size, int initialized)) |
1553 | | #define __itt_heap_allocate_begin ITTNOTIFY_VOID(heap_allocate_begin) |
1554 | | #define __itt_heap_allocate_begin_ptr ITTNOTIFY_NAME(heap_allocate_begin) |
1555 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1556 | | #define __itt_heap_allocate_begin(h, size, initialized) |
1557 | | #define __itt_heap_allocate_begin_ptr 0 |
1558 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1559 | | #else /* INTEL_NO_MACRO_BODY */ |
1560 | | #define __itt_heap_allocate_begin_ptr 0 |
1561 | | #endif /* INTEL_NO_MACRO_BODY */ |
1562 | | /** @endcond */ |
1563 | | |
1564 | | /** |
1565 | | * @brief Record an allocation end occurrence. |
1566 | | */ |
1567 | | void ITTAPI __itt_heap_allocate_end(__itt_heap_function h, void** addr, size_t size, int initialized); |
1568 | | |
1569 | | /** @cond exclude_from_documentation */ |
1570 | | #ifndef INTEL_NO_MACRO_BODY |
1571 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1572 | | ITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, size_t size, int initialized)) |
1573 | | #define __itt_heap_allocate_end ITTNOTIFY_VOID(heap_allocate_end) |
1574 | | #define __itt_heap_allocate_end_ptr ITTNOTIFY_NAME(heap_allocate_end) |
1575 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1576 | | #define __itt_heap_allocate_end(h, addr, size, initialized) |
1577 | | #define __itt_heap_allocate_end_ptr 0 |
1578 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1579 | | #else /* INTEL_NO_MACRO_BODY */ |
1580 | | #define __itt_heap_allocate_end_ptr 0 |
1581 | | #endif /* INTEL_NO_MACRO_BODY */ |
1582 | | /** @endcond */ |
1583 | | |
1584 | | /** |
1585 | | * @brief Record a free begin occurrence. |
1586 | | */ |
1587 | | void ITTAPI __itt_heap_free_begin(__itt_heap_function h, void* addr); |
1588 | | |
1589 | | /** @cond exclude_from_documentation */ |
1590 | | #ifndef INTEL_NO_MACRO_BODY |
1591 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1592 | | ITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr)) |
1593 | | #define __itt_heap_free_begin ITTNOTIFY_VOID(heap_free_begin) |
1594 | | #define __itt_heap_free_begin_ptr ITTNOTIFY_NAME(heap_free_begin) |
1595 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1596 | | #define __itt_heap_free_begin(h, addr) |
1597 | | #define __itt_heap_free_begin_ptr 0 |
1598 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1599 | | #else /* INTEL_NO_MACRO_BODY */ |
1600 | | #define __itt_heap_free_begin_ptr 0 |
1601 | | #endif /* INTEL_NO_MACRO_BODY */ |
1602 | | /** @endcond */ |
1603 | | |
1604 | | /** |
1605 | | * @brief Record a free end occurrence. |
1606 | | */ |
1607 | | void ITTAPI __itt_heap_free_end(__itt_heap_function h, void* addr); |
1608 | | |
1609 | | /** @cond exclude_from_documentation */ |
1610 | | #ifndef INTEL_NO_MACRO_BODY |
1611 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1612 | | ITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr)) |
1613 | | #define __itt_heap_free_end ITTNOTIFY_VOID(heap_free_end) |
1614 | | #define __itt_heap_free_end_ptr ITTNOTIFY_NAME(heap_free_end) |
1615 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1616 | | #define __itt_heap_free_end(h, addr) |
1617 | | #define __itt_heap_free_end_ptr 0 |
1618 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1619 | | #else /* INTEL_NO_MACRO_BODY */ |
1620 | | #define __itt_heap_free_end_ptr 0 |
1621 | | #endif /* INTEL_NO_MACRO_BODY */ |
1622 | | /** @endcond */ |
1623 | | |
1624 | | /** |
1625 | | * @brief Record a reallocation begin occurrence. |
1626 | | */ |
1627 | | void ITTAPI __itt_heap_reallocate_begin(__itt_heap_function h, void* addr, size_t new_size, int initialized); |
1628 | | |
1629 | | /** @cond exclude_from_documentation */ |
1630 | | #ifndef INTEL_NO_MACRO_BODY |
1631 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1632 | | ITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* addr, size_t new_size, int initialized)) |
1633 | | #define __itt_heap_reallocate_begin ITTNOTIFY_VOID(heap_reallocate_begin) |
1634 | | #define __itt_heap_reallocate_begin_ptr ITTNOTIFY_NAME(heap_reallocate_begin) |
1635 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1636 | | #define __itt_heap_reallocate_begin(h, addr, new_size, initialized) |
1637 | | #define __itt_heap_reallocate_begin_ptr 0 |
1638 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1639 | | #else /* INTEL_NO_MACRO_BODY */ |
1640 | | #define __itt_heap_reallocate_begin_ptr 0 |
1641 | | #endif /* INTEL_NO_MACRO_BODY */ |
1642 | | /** @endcond */ |
1643 | | |
1644 | | /** |
1645 | | * @brief Record a reallocation end occurrence. |
1646 | | */ |
1647 | | void ITTAPI __itt_heap_reallocate_end(__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized); |
1648 | | |
1649 | | /** @cond exclude_from_documentation */ |
1650 | | #ifndef INTEL_NO_MACRO_BODY |
1651 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1652 | | ITT_STUBV(ITTAPI, void, heap_reallocate_end, (__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized)) |
1653 | | #define __itt_heap_reallocate_end ITTNOTIFY_VOID(heap_reallocate_end) |
1654 | | #define __itt_heap_reallocate_end_ptr ITTNOTIFY_NAME(heap_reallocate_end) |
1655 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1656 | | #define __itt_heap_reallocate_end(h, addr, new_addr, new_size, initialized) |
1657 | | #define __itt_heap_reallocate_end_ptr 0 |
1658 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1659 | | #else /* INTEL_NO_MACRO_BODY */ |
1660 | | #define __itt_heap_reallocate_end_ptr 0 |
1661 | | #endif /* INTEL_NO_MACRO_BODY */ |
1662 | | /** @endcond */ |
1663 | | |
1664 | | /** @brief internal access begin */ |
1665 | | void ITTAPI __itt_heap_internal_access_begin(void); |
1666 | | |
1667 | | /** @cond exclude_from_documentation */ |
1668 | | #ifndef INTEL_NO_MACRO_BODY |
1669 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1670 | | ITT_STUBV(ITTAPI, void, heap_internal_access_begin, (void)) |
1671 | | #define __itt_heap_internal_access_begin ITTNOTIFY_VOID(heap_internal_access_begin) |
1672 | | #define __itt_heap_internal_access_begin_ptr ITTNOTIFY_NAME(heap_internal_access_begin) |
1673 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1674 | | #define __itt_heap_internal_access_begin() |
1675 | | #define __itt_heap_internal_access_begin_ptr 0 |
1676 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1677 | | #else /* INTEL_NO_MACRO_BODY */ |
1678 | | #define __itt_heap_internal_access_begin_ptr 0 |
1679 | | #endif /* INTEL_NO_MACRO_BODY */ |
1680 | | /** @endcond */ |
1681 | | |
1682 | | /** @brief internal access end */ |
1683 | | void ITTAPI __itt_heap_internal_access_end(void); |
1684 | | |
1685 | | /** @cond exclude_from_documentation */ |
1686 | | #ifndef INTEL_NO_MACRO_BODY |
1687 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1688 | | ITT_STUBV(ITTAPI, void, heap_internal_access_end, (void)) |
1689 | | #define __itt_heap_internal_access_end ITTNOTIFY_VOID(heap_internal_access_end) |
1690 | | #define __itt_heap_internal_access_end_ptr ITTNOTIFY_NAME(heap_internal_access_end) |
1691 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1692 | | #define __itt_heap_internal_access_end() |
1693 | | #define __itt_heap_internal_access_end_ptr 0 |
1694 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1695 | | #else /* INTEL_NO_MACRO_BODY */ |
1696 | | #define __itt_heap_internal_access_end_ptr 0 |
1697 | | #endif /* INTEL_NO_MACRO_BODY */ |
1698 | | /** @endcond */ |
1699 | | |
1700 | | /** @brief record memory growth begin */ |
1701 | | void ITTAPI __itt_heap_record_memory_growth_begin(void); |
1702 | | |
1703 | | /** @cond exclude_from_documentation */ |
1704 | | #ifndef INTEL_NO_MACRO_BODY |
1705 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1706 | | ITT_STUBV(ITTAPI, void, heap_record_memory_growth_begin, (void)) |
1707 | | #define __itt_heap_record_memory_growth_begin ITTNOTIFY_VOID(heap_record_memory_growth_begin) |
1708 | | #define __itt_heap_record_memory_growth_begin_ptr ITTNOTIFY_NAME(heap_record_memory_growth_begin) |
1709 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1710 | | #define __itt_heap_record_memory_growth_begin() |
1711 | | #define __itt_heap_record_memory_growth_begin_ptr 0 |
1712 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1713 | | #else /* INTEL_NO_MACRO_BODY */ |
1714 | | #define __itt_heap_record_memory_growth_begin_ptr 0 |
1715 | | #endif /* INTEL_NO_MACRO_BODY */ |
1716 | | /** @endcond */ |
1717 | | |
1718 | | /** @brief record memory growth end */ |
1719 | | void ITTAPI __itt_heap_record_memory_growth_end(void); |
1720 | | |
1721 | | /** @cond exclude_from_documentation */ |
1722 | | #ifndef INTEL_NO_MACRO_BODY |
1723 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1724 | | ITT_STUBV(ITTAPI, void, heap_record_memory_growth_end, (void)) |
1725 | | #define __itt_heap_record_memory_growth_end ITTNOTIFY_VOID(heap_record_memory_growth_end) |
1726 | | #define __itt_heap_record_memory_growth_end_ptr ITTNOTIFY_NAME(heap_record_memory_growth_end) |
1727 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1728 | | #define __itt_heap_record_memory_growth_end() |
1729 | | #define __itt_heap_record_memory_growth_end_ptr 0 |
1730 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1731 | | #else /* INTEL_NO_MACRO_BODY */ |
1732 | | #define __itt_heap_record_memory_growth_end_ptr 0 |
1733 | | #endif /* INTEL_NO_MACRO_BODY */ |
1734 | | /** @endcond */ |
1735 | | |
1736 | | /** |
1737 | | * @brief Specify the type of heap detection/reporting to modify. |
1738 | | */ |
1739 | | /** |
1740 | | * @hideinitializer |
1741 | | * @brief Report on memory leaks. |
1742 | | */ |
1743 | | #define __itt_heap_leaks 0x00000001 |
1744 | | |
1745 | | /** |
1746 | | * @hideinitializer |
1747 | | * @brief Report on memory growth. |
1748 | | */ |
1749 | | #define __itt_heap_growth 0x00000002 |
1750 | | |
1751 | | |
1752 | | /** @brief heap reset detection */ |
1753 | | void ITTAPI __itt_heap_reset_detection(unsigned int reset_mask); |
1754 | | |
1755 | | /** @cond exclude_from_documentation */ |
1756 | | #ifndef INTEL_NO_MACRO_BODY |
1757 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1758 | | ITT_STUBV(ITTAPI, void, heap_reset_detection, (unsigned int reset_mask)) |
1759 | | #define __itt_heap_reset_detection ITTNOTIFY_VOID(heap_reset_detection) |
1760 | | #define __itt_heap_reset_detection_ptr ITTNOTIFY_NAME(heap_reset_detection) |
1761 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1762 | | #define __itt_heap_reset_detection() |
1763 | | #define __itt_heap_reset_detection_ptr 0 |
1764 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1765 | | #else /* INTEL_NO_MACRO_BODY */ |
1766 | | #define __itt_heap_reset_detection_ptr 0 |
1767 | | #endif /* INTEL_NO_MACRO_BODY */ |
1768 | | /** @endcond */ |
1769 | | |
1770 | | /** @brief report */ |
1771 | | void ITTAPI __itt_heap_record(unsigned int record_mask); |
1772 | | |
1773 | | /** @cond exclude_from_documentation */ |
1774 | | #ifndef INTEL_NO_MACRO_BODY |
1775 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1776 | | ITT_STUBV(ITTAPI, void, heap_record, (unsigned int record_mask)) |
1777 | | #define __itt_heap_record ITTNOTIFY_VOID(heap_record) |
1778 | | #define __itt_heap_record_ptr ITTNOTIFY_NAME(heap_record) |
1779 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1780 | | #define __itt_heap_record() |
1781 | | #define __itt_heap_record_ptr 0 |
1782 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1783 | | #else /* INTEL_NO_MACRO_BODY */ |
1784 | | #define __itt_heap_record_ptr 0 |
1785 | | #endif /* INTEL_NO_MACRO_BODY */ |
1786 | | /** @endcond */ |
1787 | | |
1788 | | /** @} heap group */ |
1789 | | /** @endcond */ |
1790 | | /* ========================================================================== */ |
1791 | | |
1792 | | /** |
1793 | | * @defgroup domains Domains |
1794 | | * @ingroup public |
1795 | | * Domains group |
1796 | | * @{ |
1797 | | */ |
1798 | | |
1799 | | /** @cond exclude_from_documentation */ |
1800 | | #pragma pack(push, 8) |
1801 | | |
1802 | | typedef struct ___itt_domain |
1803 | | { |
1804 | | volatile int flags; /*!< Zero if disabled, non-zero if enabled. The meaning of different non-zero values is reserved to the runtime */ |
1805 | | const char* nameA; /*!< Copy of original name in ASCII. */ |
1806 | | #if defined(UNICODE) || defined(_UNICODE) |
1807 | | const wchar_t* nameW; /*!< Copy of original name in UNICODE. */ |
1808 | | #else /* UNICODE || _UNICODE */ |
1809 | | void* nameW; |
1810 | | #endif /* UNICODE || _UNICODE */ |
1811 | | int extra1; /*!< Reserved to the runtime */ |
1812 | | void* extra2; /*!< Reserved to the runtime */ |
1813 | | struct ___itt_domain* next; |
1814 | | } __itt_domain; |
1815 | | |
1816 | | #pragma pack(pop) |
1817 | | /** @endcond */ |
1818 | | |
1819 | | /** |
1820 | | * @ingroup domains |
1821 | | * @brief Create a domain. |
1822 | | * Create domain using some domain name: the URI naming style is recommended. |
1823 | | * Because the set of domains is expected to be static over the application's |
1824 | | * execution time, there is no mechanism to destroy a domain. |
1825 | | * Any domain can be accessed by any thread in the process, regardless of |
1826 | | * which thread created the domain. This call is thread-safe. |
1827 | | * @param[in] name name of domain |
1828 | | */ |
1829 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1830 | | __itt_domain* ITTAPI __itt_domain_createA(const char *name); |
1831 | | __itt_domain* ITTAPI __itt_domain_createW(const wchar_t *name); |
1832 | | #if defined(UNICODE) || defined(_UNICODE) |
1833 | | # define __itt_domain_create __itt_domain_createW |
1834 | | # define __itt_domain_create_ptr __itt_domain_createW_ptr |
1835 | | #else /* UNICODE */ |
1836 | | # define __itt_domain_create __itt_domain_createA |
1837 | | # define __itt_domain_create_ptr __itt_domain_createA_ptr |
1838 | | #endif /* UNICODE */ |
1839 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1840 | | __itt_domain* ITTAPI __itt_domain_create(const char *name); |
1841 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1842 | | |
1843 | | /** @cond exclude_from_documentation */ |
1844 | | #ifndef INTEL_NO_MACRO_BODY |
1845 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1846 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1847 | | ITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char *name)) |
1848 | | ITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name)) |
1849 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1850 | | ITT_STUB(ITTAPI, __itt_domain*, domain_create, (const char *name)) |
1851 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1852 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1853 | | #define __itt_domain_createA ITTNOTIFY_DATA(domain_createA) |
1854 | | #define __itt_domain_createA_ptr ITTNOTIFY_NAME(domain_createA) |
1855 | | #define __itt_domain_createW ITTNOTIFY_DATA(domain_createW) |
1856 | | #define __itt_domain_createW_ptr ITTNOTIFY_NAME(domain_createW) |
1857 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1858 | 2 | #define __itt_domain_create ITTNOTIFY_DATA(domain_create) |
1859 | | #define __itt_domain_create_ptr ITTNOTIFY_NAME(domain_create) |
1860 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1861 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1862 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1863 | | #define __itt_domain_createA(name) (__itt_domain*)0 |
1864 | | #define __itt_domain_createA_ptr 0 |
1865 | | #define __itt_domain_createW(name) (__itt_domain*)0 |
1866 | | #define __itt_domain_createW_ptr 0 |
1867 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1868 | | #define __itt_domain_create(name) (__itt_domain*)0 |
1869 | | #define __itt_domain_create_ptr 0 |
1870 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1871 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1872 | | #else /* INTEL_NO_MACRO_BODY */ |
1873 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
1874 | | #define __itt_domain_createA_ptr 0 |
1875 | | #define __itt_domain_createW_ptr 0 |
1876 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1877 | | #define __itt_domain_create_ptr 0 |
1878 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
1879 | | #endif /* INTEL_NO_MACRO_BODY */ |
1880 | | /** @endcond */ |
1881 | | /** @} domains group */ |
1882 | | |
1883 | | /** |
1884 | | * @defgroup ids IDs |
1885 | | * @ingroup public |
1886 | | * IDs group |
1887 | | * @{ |
1888 | | */ |
1889 | | |
1890 | | /** @cond exclude_from_documentation */ |
1891 | | #pragma pack(push, 8) |
1892 | | |
1893 | | typedef struct ___itt_id |
1894 | | { |
1895 | | unsigned long long d1, d2, d3; |
1896 | | } __itt_id; |
1897 | | |
1898 | | #pragma pack(pop) |
1899 | | /** @endcond */ |
1900 | | |
1901 | | static const __itt_id __itt_null = { 0, 0, 0 }; |
1902 | | |
1903 | | /** |
1904 | | * @ingroup ids |
1905 | | * @brief A convenience function is provided to create an ID without domain control. |
1906 | | * @brief This is a convenience function to initialize an __itt_id structure. This function |
1907 | | * does not affect the collector runtime in any way. After you make the ID with this |
1908 | | * function, you still must create it with the __itt_id_create function before using the ID |
1909 | | * to identify a named entity. |
1910 | | * @param[in] addr The address of object; high QWORD of the ID value. |
1911 | | * @param[in] extra The extra data to unique identify object; low QWORD of the ID value. |
1912 | | */ |
1913 | | |
1914 | | ITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) ITT_INLINE_ATTRIBUTE; |
1915 | | ITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) |
1916 | 0 | { |
1917 | 0 | __itt_id id = __itt_null; |
1918 | 0 | id.d1 = (unsigned long long)((uintptr_t)addr); |
1919 | 0 | id.d2 = (unsigned long long)extra; |
1920 | 0 | id.d3 = (unsigned long long)0; /* Reserved. Must be zero */ |
1921 | 0 | return id; |
1922 | 0 | } Unexecuted instantiation: parallel.cpp:__itt_id_make(void*, unsigned long long) Unexecuted instantiation: parallel_impl.cpp:__itt_id_make(void*, unsigned long long) Unexecuted instantiation: system.cpp:__itt_id_make(void*, unsigned long long) Unexecuted instantiation: trace.cpp:__itt_id_make(void*, unsigned long long) Unexecuted instantiation: ittnotify_static.c:__itt_id_make |
1923 | | |
1924 | | /** |
1925 | | * @ingroup ids |
1926 | | * @brief Create an instance of identifier. |
1927 | | * This establishes the beginning of the lifetime of an instance of |
1928 | | * the given ID in the trace. Once this lifetime starts, the ID |
1929 | | * can be used to tag named entity instances in calls such as |
1930 | | * __itt_task_begin, and to specify relationships among |
1931 | | * identified named entity instances, using the \ref relations APIs. |
1932 | | * Instance IDs are not domain specific! |
1933 | | * @param[in] domain The domain controlling the execution of this call. |
1934 | | * @param[in] id The ID to create. |
1935 | | */ |
1936 | | void ITTAPI __itt_id_create(const __itt_domain *domain, __itt_id id); |
1937 | | |
1938 | | /** @cond exclude_from_documentation */ |
1939 | | #ifndef INTEL_NO_MACRO_BODY |
1940 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1941 | | ITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id)) |
1942 | 0 | #define __itt_id_create(d,x) ITTNOTIFY_VOID_D1(id_create,d,x) |
1943 | | #define __itt_id_create_ptr ITTNOTIFY_NAME(id_create) |
1944 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1945 | | #define __itt_id_create(domain,id) |
1946 | | #define __itt_id_create_ptr 0 |
1947 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1948 | | #else /* INTEL_NO_MACRO_BODY */ |
1949 | | #define __itt_id_create_ptr 0 |
1950 | | #endif /* INTEL_NO_MACRO_BODY */ |
1951 | | /** @endcond */ |
1952 | | |
1953 | | /** |
1954 | | * @ingroup ids |
1955 | | * @brief Destroy an instance of identifier. |
1956 | | * This ends the lifetime of the current instance of the given ID value in the trace. |
1957 | | * Any relationships that are established after this lifetime ends are invalid. |
1958 | | * This call must be performed before the given ID value can be reused for a different |
1959 | | * named entity instance. |
1960 | | * @param[in] domain The domain controlling the execution of this call. |
1961 | | * @param[in] id The ID to destroy. |
1962 | | */ |
1963 | | void ITTAPI __itt_id_destroy(const __itt_domain *domain, __itt_id id); |
1964 | | |
1965 | | /** @cond exclude_from_documentation */ |
1966 | | #ifndef INTEL_NO_MACRO_BODY |
1967 | | #ifndef INTEL_NO_ITTNOTIFY_API |
1968 | | ITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id)) |
1969 | 0 | #define __itt_id_destroy(d,x) ITTNOTIFY_VOID_D1(id_destroy,d,x) |
1970 | | #define __itt_id_destroy_ptr ITTNOTIFY_NAME(id_destroy) |
1971 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
1972 | | #define __itt_id_destroy(domain,id) |
1973 | | #define __itt_id_destroy_ptr 0 |
1974 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
1975 | | #else /* INTEL_NO_MACRO_BODY */ |
1976 | | #define __itt_id_destroy_ptr 0 |
1977 | | #endif /* INTEL_NO_MACRO_BODY */ |
1978 | | /** @endcond */ |
1979 | | /** @} ids group */ |
1980 | | |
1981 | | /** |
1982 | | * @defgroup handless String Handles |
1983 | | * @ingroup public |
1984 | | * String Handles group |
1985 | | * @{ |
1986 | | */ |
1987 | | |
1988 | | /** @cond exclude_from_documentation */ |
1989 | | #pragma pack(push, 8) |
1990 | | |
1991 | | typedef struct ___itt_string_handle |
1992 | | { |
1993 | | const char* strA; /*!< Copy of original string in ASCII. */ |
1994 | | #if defined(UNICODE) || defined(_UNICODE) |
1995 | | const wchar_t* strW; /*!< Copy of original string in UNICODE. */ |
1996 | | #else /* UNICODE || _UNICODE */ |
1997 | | void* strW; |
1998 | | #endif /* UNICODE || _UNICODE */ |
1999 | | int extra1; /*!< Reserved. Must be zero */ |
2000 | | void* extra2; /*!< Reserved. Must be zero */ |
2001 | | struct ___itt_string_handle* next; |
2002 | | } __itt_string_handle; |
2003 | | |
2004 | | #pragma pack(pop) |
2005 | | /** @endcond */ |
2006 | | |
2007 | | /** |
2008 | | * @ingroup handles |
2009 | | * @brief Create a string handle. |
2010 | | * Create and return handle value that can be associated with a string. |
2011 | | * Consecutive calls to __itt_string_handle_create with the same name |
2012 | | * return the same value. Because the set of string handles is expected to remain |
2013 | | * static during the application's execution time, there is no mechanism to destroy a string handle. |
2014 | | * Any string handle can be accessed by any thread in the process, regardless of which thread created |
2015 | | * the string handle. This call is thread-safe. |
2016 | | * @param[in] name The input string |
2017 | | */ |
2018 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2019 | | __itt_string_handle* ITTAPI __itt_string_handle_createA(const char *name); |
2020 | | __itt_string_handle* ITTAPI __itt_string_handle_createW(const wchar_t *name); |
2021 | | #if defined(UNICODE) || defined(_UNICODE) |
2022 | | # define __itt_string_handle_create __itt_string_handle_createW |
2023 | | # define __itt_string_handle_create_ptr __itt_string_handle_createW_ptr |
2024 | | #else /* UNICODE */ |
2025 | | # define __itt_string_handle_create __itt_string_handle_createA |
2026 | | # define __itt_string_handle_create_ptr __itt_string_handle_createA_ptr |
2027 | | #endif /* UNICODE */ |
2028 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2029 | | __itt_string_handle* ITTAPI __itt_string_handle_create(const char *name); |
2030 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2031 | | |
2032 | | /** @cond exclude_from_documentation */ |
2033 | | #ifndef INTEL_NO_MACRO_BODY |
2034 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2035 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2036 | | ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char *name)) |
2037 | | ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name)) |
2038 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2039 | | ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create, (const char *name)) |
2040 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2041 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2042 | | #define __itt_string_handle_createA ITTNOTIFY_DATA(string_handle_createA) |
2043 | | #define __itt_string_handle_createA_ptr ITTNOTIFY_NAME(string_handle_createA) |
2044 | | #define __itt_string_handle_createW ITTNOTIFY_DATA(string_handle_createW) |
2045 | | #define __itt_string_handle_createW_ptr ITTNOTIFY_NAME(string_handle_createW) |
2046 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2047 | 0 | #define __itt_string_handle_create ITTNOTIFY_DATA(string_handle_create) |
2048 | | #define __itt_string_handle_create_ptr ITTNOTIFY_NAME(string_handle_create) |
2049 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2050 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2051 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2052 | | #define __itt_string_handle_createA(name) (__itt_string_handle*)0 |
2053 | | #define __itt_string_handle_createA_ptr 0 |
2054 | | #define __itt_string_handle_createW(name) (__itt_string_handle*)0 |
2055 | | #define __itt_string_handle_createW_ptr 0 |
2056 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2057 | | #define __itt_string_handle_create(name) (__itt_string_handle*)0 |
2058 | | #define __itt_string_handle_create_ptr 0 |
2059 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2060 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2061 | | #else /* INTEL_NO_MACRO_BODY */ |
2062 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2063 | | #define __itt_string_handle_createA_ptr 0 |
2064 | | #define __itt_string_handle_createW_ptr 0 |
2065 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2066 | | #define __itt_string_handle_create_ptr 0 |
2067 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2068 | | #endif /* INTEL_NO_MACRO_BODY */ |
2069 | | /** @endcond */ |
2070 | | /** @} handles group */ |
2071 | | |
2072 | | /** @cond exclude_from_documentation */ |
2073 | | typedef unsigned long long __itt_timestamp; |
2074 | | /** @endcond */ |
2075 | | |
2076 | | #define __itt_timestamp_none ((__itt_timestamp)-1LL) |
2077 | | |
2078 | | /** @cond exclude_from_gpa_documentation */ |
2079 | | |
2080 | | /** |
2081 | | * @ingroup timestamps |
2082 | | * @brief Return timestamp corresponding to the current moment. |
2083 | | * This returns the timestamp in the format that is the most relevant for the current |
2084 | | * host or platform (RDTSC, QPC, and others). You can use the "<" operator to |
2085 | | * compare __itt_timestamp values. |
2086 | | */ |
2087 | | __itt_timestamp ITTAPI __itt_get_timestamp(void); |
2088 | | |
2089 | | /** @cond exclude_from_documentation */ |
2090 | | #ifndef INTEL_NO_MACRO_BODY |
2091 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2092 | | ITT_STUB(ITTAPI, __itt_timestamp, get_timestamp, (void)) |
2093 | | #define __itt_get_timestamp ITTNOTIFY_DATA(get_timestamp) |
2094 | | #define __itt_get_timestamp_ptr ITTNOTIFY_NAME(get_timestamp) |
2095 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2096 | | #define __itt_get_timestamp() |
2097 | | #define __itt_get_timestamp_ptr 0 |
2098 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2099 | | #else /* INTEL_NO_MACRO_BODY */ |
2100 | | #define __itt_get_timestamp_ptr 0 |
2101 | | #endif /* INTEL_NO_MACRO_BODY */ |
2102 | | /** @endcond */ |
2103 | | /** @} timestamps */ |
2104 | | /** @endcond */ |
2105 | | |
2106 | | /** @cond exclude_from_gpa_documentation */ |
2107 | | |
2108 | | /** |
2109 | | * @defgroup regions Regions |
2110 | | * @ingroup public |
2111 | | * Regions group |
2112 | | * @{ |
2113 | | */ |
2114 | | /** |
2115 | | * @ingroup regions |
2116 | | * @brief Begin of region instance. |
2117 | | * Successive calls to __itt_region_begin with the same ID are ignored |
2118 | | * until a call to __itt_region_end with the same ID |
2119 | | * @param[in] domain The domain for this region instance |
2120 | | * @param[in] id The instance ID for this region instance. Must not be __itt_null |
2121 | | * @param[in] parentid The instance ID for the parent of this region instance, or __itt_null |
2122 | | * @param[in] name The name of this region |
2123 | | */ |
2124 | | void ITTAPI __itt_region_begin(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name); |
2125 | | |
2126 | | /** |
2127 | | * @ingroup regions |
2128 | | * @brief End of region instance. |
2129 | | * The first call to __itt_region_end with a given ID ends the |
2130 | | * region. Successive calls with the same ID are ignored, as are |
2131 | | * calls that do not have a matching __itt_region_begin call. |
2132 | | * @param[in] domain The domain for this region instance |
2133 | | * @param[in] id The instance ID for this region instance |
2134 | | */ |
2135 | | void ITTAPI __itt_region_end(const __itt_domain *domain, __itt_id id); |
2136 | | |
2137 | | /** @cond exclude_from_documentation */ |
2138 | | #ifndef INTEL_NO_MACRO_BODY |
2139 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2140 | | ITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) |
2141 | | ITT_STUBV(ITTAPI, void, region_end, (const __itt_domain *domain, __itt_id id)) |
2142 | 0 | #define __itt_region_begin(d,x,y,z) ITTNOTIFY_VOID_D3(region_begin,d,x,y,z) |
2143 | | #define __itt_region_begin_ptr ITTNOTIFY_NAME(region_begin) |
2144 | 0 | #define __itt_region_end(d,x) ITTNOTIFY_VOID_D1(region_end,d,x) |
2145 | | #define __itt_region_end_ptr ITTNOTIFY_NAME(region_end) |
2146 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2147 | | #define __itt_region_begin(d,x,y,z) |
2148 | | #define __itt_region_begin_ptr 0 |
2149 | | #define __itt_region_end(d,x) |
2150 | | #define __itt_region_end_ptr 0 |
2151 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2152 | | #else /* INTEL_NO_MACRO_BODY */ |
2153 | | #define __itt_region_begin_ptr 0 |
2154 | | #define __itt_region_end_ptr 0 |
2155 | | #endif /* INTEL_NO_MACRO_BODY */ |
2156 | | /** @endcond */ |
2157 | | /** @} regions group */ |
2158 | | |
2159 | | /** |
2160 | | * @defgroup frames Frames |
2161 | | * @ingroup public |
2162 | | * Frames are similar to regions, but are intended to be easier to use and to implement. |
2163 | | * In particular: |
2164 | | * - Frames always represent periods of elapsed time |
2165 | | * - By default, frames have no nesting relationships |
2166 | | * @{ |
2167 | | */ |
2168 | | |
2169 | | /** |
2170 | | * @ingroup frames |
2171 | | * @brief Begin a frame instance. |
2172 | | * Successive calls to __itt_frame_begin with the |
2173 | | * same ID are ignored until a call to __itt_frame_end with the same ID. |
2174 | | * @param[in] domain The domain for this frame instance |
2175 | | * @param[in] id The instance ID for this frame instance or NULL |
2176 | | */ |
2177 | | void ITTAPI __itt_frame_begin_v3(const __itt_domain *domain, __itt_id *id); |
2178 | | |
2179 | | /** |
2180 | | * @ingroup frames |
2181 | | * @brief End a frame instance. |
2182 | | * The first call to __itt_frame_end with a given ID |
2183 | | * ends the frame. Successive calls with the same ID are ignored, as are |
2184 | | * calls that do not have a matching __itt_frame_begin call. |
2185 | | * @param[in] domain The domain for this frame instance |
2186 | | * @param[in] id The instance ID for this frame instance or NULL for current |
2187 | | */ |
2188 | | void ITTAPI __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id); |
2189 | | |
2190 | | /** |
2191 | | * @ingroup frames |
2192 | | * @brief Submits a frame instance. |
2193 | | * Successive calls to __itt_frame_begin or __itt_frame_submit with the |
2194 | | * same ID are ignored until a call to __itt_frame_end or __itt_frame_submit |
2195 | | * with the same ID. |
2196 | | * Passing special __itt_timestamp_none value as "end" argument means |
2197 | | * take the current timestamp as the end timestamp. |
2198 | | * @param[in] domain The domain for this frame instance |
2199 | | * @param[in] id The instance ID for this frame instance or NULL |
2200 | | * @param[in] begin Timestamp of the beginning of the frame |
2201 | | * @param[in] end Timestamp of the end of the frame |
2202 | | */ |
2203 | | void ITTAPI __itt_frame_submit_v3(const __itt_domain *domain, __itt_id *id, |
2204 | | __itt_timestamp begin, __itt_timestamp end); |
2205 | | |
2206 | | /** @cond exclude_from_documentation */ |
2207 | | #ifndef INTEL_NO_MACRO_BODY |
2208 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2209 | | ITT_STUBV(ITTAPI, void, frame_begin_v3, (const __itt_domain *domain, __itt_id *id)) |
2210 | | ITT_STUBV(ITTAPI, void, frame_end_v3, (const __itt_domain *domain, __itt_id *id)) |
2211 | | ITT_STUBV(ITTAPI, void, frame_submit_v3, (const __itt_domain *domain, __itt_id *id, __itt_timestamp begin, __itt_timestamp end)) |
2212 | | #define __itt_frame_begin_v3(d,x) ITTNOTIFY_VOID_D1(frame_begin_v3,d,x) |
2213 | | #define __itt_frame_begin_v3_ptr ITTNOTIFY_NAME(frame_begin_v3) |
2214 | | #define __itt_frame_end_v3(d,x) ITTNOTIFY_VOID_D1(frame_end_v3,d,x) |
2215 | | #define __itt_frame_end_v3_ptr ITTNOTIFY_NAME(frame_end_v3) |
2216 | | #define __itt_frame_submit_v3(d,x,b,e) ITTNOTIFY_VOID_D3(frame_submit_v3,d,x,b,e) |
2217 | | #define __itt_frame_submit_v3_ptr ITTNOTIFY_NAME(frame_submit_v3) |
2218 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2219 | | #define __itt_frame_begin_v3(domain,id) |
2220 | | #define __itt_frame_begin_v3_ptr 0 |
2221 | | #define __itt_frame_end_v3(domain,id) |
2222 | | #define __itt_frame_end_v3_ptr 0 |
2223 | | #define __itt_frame_submit_v3(domain,id,begin,end) |
2224 | | #define __itt_frame_submit_v3_ptr 0 |
2225 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2226 | | #else /* INTEL_NO_MACRO_BODY */ |
2227 | | #define __itt_frame_begin_v3_ptr 0 |
2228 | | #define __itt_frame_end_v3_ptr 0 |
2229 | | #define __itt_frame_submit_v3_ptr 0 |
2230 | | #endif /* INTEL_NO_MACRO_BODY */ |
2231 | | /** @endcond */ |
2232 | | /** @} frames group */ |
2233 | | /** @endcond */ |
2234 | | |
2235 | | /** |
2236 | | * @defgroup taskgroup Task Group |
2237 | | * @ingroup public |
2238 | | * Task Group |
2239 | | * @{ |
2240 | | */ |
2241 | | /** |
2242 | | * @ingroup task_groups |
2243 | | * @brief Denotes a task_group instance. |
2244 | | * Successive calls to __itt_task_group with the same ID are ignored. |
2245 | | * @param[in] domain The domain for this task_group instance |
2246 | | * @param[in] id The instance ID for this task_group instance. Must not be __itt_null. |
2247 | | * @param[in] parentid The instance ID for the parent of this task_group instance, or __itt_null. |
2248 | | * @param[in] name The name of this task_group |
2249 | | */ |
2250 | | void ITTAPI __itt_task_group(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name); |
2251 | | |
2252 | | /** @cond exclude_from_documentation */ |
2253 | | #ifndef INTEL_NO_MACRO_BODY |
2254 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2255 | | ITT_STUBV(ITTAPI, void, task_group, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) |
2256 | | #define __itt_task_group(d,x,y,z) ITTNOTIFY_VOID_D3(task_group,d,x,y,z) |
2257 | | #define __itt_task_group_ptr ITTNOTIFY_NAME(task_group) |
2258 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2259 | | #define __itt_task_group(d,x,y,z) |
2260 | | #define __itt_task_group_ptr 0 |
2261 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2262 | | #else /* INTEL_NO_MACRO_BODY */ |
2263 | | #define __itt_task_group_ptr 0 |
2264 | | #endif /* INTEL_NO_MACRO_BODY */ |
2265 | | /** @endcond */ |
2266 | | /** @} taskgroup group */ |
2267 | | |
2268 | | /** |
2269 | | * @defgroup tasks Tasks |
2270 | | * @ingroup public |
2271 | | * A task instance represents a piece of work performed by a particular |
2272 | | * thread for a period of time. A call to __itt_task_begin creates a |
2273 | | * task instance. This becomes the current instance for that task on that |
2274 | | * thread. A following call to __itt_task_end on the same thread ends the |
2275 | | * instance. There may be multiple simultaneous instances of tasks with the |
2276 | | * same name on different threads. If an ID is specified, the task instance |
2277 | | * receives that ID. Nested tasks are allowed. |
2278 | | * |
2279 | | * Note: The task is defined by the bracketing of __itt_task_begin and |
2280 | | * __itt_task_end on the same thread. If some scheduling mechanism causes |
2281 | | * task switching (the thread executes a different user task) or task |
2282 | | * switching (the user task switches to a different thread) then this breaks |
2283 | | * the notion of current instance. Additional API calls are required to |
2284 | | * deal with that possibility. |
2285 | | * @{ |
2286 | | */ |
2287 | | |
2288 | | /** |
2289 | | * @ingroup tasks |
2290 | | * @brief Begin a task instance. |
2291 | | * @param[in] domain The domain for this task |
2292 | | * @param[in] taskid The instance ID for this task instance, or __itt_null |
2293 | | * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null |
2294 | | * @param[in] name The name of this task |
2295 | | */ |
2296 | | void ITTAPI __itt_task_begin(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name); |
2297 | | |
2298 | | /** |
2299 | | * @ingroup tasks |
2300 | | * @brief Begin a task instance. |
2301 | | * @param[in] domain The domain for this task |
2302 | | * @param[in] taskid The identifier for this task instance (may be 0) |
2303 | | * @param[in] parentid The parent of this task (may be 0) |
2304 | | * @param[in] fn The pointer to the function you are tracing |
2305 | | */ |
2306 | | void ITTAPI __itt_task_begin_fn(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, void* fn); |
2307 | | |
2308 | | /** |
2309 | | * @ingroup tasks |
2310 | | * @brief End the current task instance. |
2311 | | * @param[in] domain The domain for this task |
2312 | | */ |
2313 | | void ITTAPI __itt_task_end(const __itt_domain *domain); |
2314 | | |
2315 | | /** |
2316 | | * @ingroup tasks |
2317 | | * @brief Begin an overlapped task instance. |
2318 | | * @param[in] domain The domain for this task. |
2319 | | * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. |
2320 | | * @param[in] parentid The parent of this task, or __itt_null. |
2321 | | * @param[in] name The name of this task. |
2322 | | */ |
2323 | | void ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); |
2324 | | |
2325 | | /** |
2326 | | * @ingroup tasks |
2327 | | * @brief End an overlapped task instance. |
2328 | | * @param[in] domain The domain for this task |
2329 | | * @param[in] taskid Explicit ID of finished task |
2330 | | */ |
2331 | | void ITTAPI __itt_task_end_overlapped(const __itt_domain *domain, __itt_id taskid); |
2332 | | |
2333 | | /** @cond exclude_from_documentation */ |
2334 | | #ifndef INTEL_NO_MACRO_BODY |
2335 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2336 | | ITT_STUBV(ITTAPI, void, task_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) |
2337 | | ITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parentid, void* fn)) |
2338 | | ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain)) |
2339 | | ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name)) |
2340 | | ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id taskid)) |
2341 | 0 | #define __itt_task_begin(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin,d,x,y,z) |
2342 | | #define __itt_task_begin_ptr ITTNOTIFY_NAME(task_begin) |
2343 | | #define __itt_task_begin_fn(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_fn,d,x,y,z) |
2344 | | #define __itt_task_begin_fn_ptr ITTNOTIFY_NAME(task_begin_fn) |
2345 | 0 | #define __itt_task_end(d) ITTNOTIFY_VOID_D0(task_end,d) |
2346 | | #define __itt_task_end_ptr ITTNOTIFY_NAME(task_end) |
2347 | | #define __itt_task_begin_overlapped(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_overlapped,d,x,y,z) |
2348 | | #define __itt_task_begin_overlapped_ptr ITTNOTIFY_NAME(task_begin_overlapped) |
2349 | | #define __itt_task_end_overlapped(d,x) ITTNOTIFY_VOID_D1(task_end_overlapped,d,x) |
2350 | | #define __itt_task_end_overlapped_ptr ITTNOTIFY_NAME(task_end_overlapped) |
2351 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2352 | | #define __itt_task_begin(domain,id,parentid,name) |
2353 | | #define __itt_task_begin_ptr 0 |
2354 | | #define __itt_task_begin_fn(domain,id,parentid,fn) |
2355 | | #define __itt_task_begin_fn_ptr 0 |
2356 | | #define __itt_task_end(domain) |
2357 | | #define __itt_task_end_ptr 0 |
2358 | | #define __itt_task_begin_overlapped(domain,taskid,parentid,name) |
2359 | | #define __itt_task_begin_overlapped_ptr 0 |
2360 | | #define __itt_task_end_overlapped(domain,taskid) |
2361 | | #define __itt_task_end_overlapped_ptr 0 |
2362 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2363 | | #else /* INTEL_NO_MACRO_BODY */ |
2364 | | #define __itt_task_begin_ptr 0 |
2365 | | #define __itt_task_begin_fn_ptr 0 |
2366 | | #define __itt_task_end_ptr 0 |
2367 | | #define __itt_task_begin_overlapped_ptr 0 |
2368 | | #define __itt_task_end_overlapped_ptr 0 |
2369 | | #endif /* INTEL_NO_MACRO_BODY */ |
2370 | | /** @endcond */ |
2371 | | /** @} tasks group */ |
2372 | | |
2373 | | |
2374 | | /** |
2375 | | * @defgroup markers Markers |
2376 | | * Markers represent a single discreet event in time. Markers have a scope, |
2377 | | * described by an enumerated type __itt_scope. Markers are created by |
2378 | | * the API call __itt_marker. A marker instance can be given an ID for use in |
2379 | | * adding metadata. |
2380 | | * @{ |
2381 | | */ |
2382 | | |
2383 | | /** |
2384 | | * @brief Describes the scope of an event object in the trace. |
2385 | | */ |
2386 | | typedef enum |
2387 | | { |
2388 | | __itt_scope_unknown = 0, |
2389 | | __itt_scope_global, |
2390 | | __itt_scope_track_group, |
2391 | | __itt_scope_track, |
2392 | | __itt_scope_task, |
2393 | | __itt_scope_marker |
2394 | | } __itt_scope; |
2395 | | |
2396 | | /** @cond exclude_from_documentation */ |
2397 | | #define __itt_marker_scope_unknown __itt_scope_unknown |
2398 | | #define __itt_marker_scope_global __itt_scope_global |
2399 | | #define __itt_marker_scope_process __itt_scope_track_group |
2400 | | #define __itt_marker_scope_thread __itt_scope_track |
2401 | | #define __itt_marker_scope_task __itt_scope_task |
2402 | | /** @endcond */ |
2403 | | |
2404 | | /** |
2405 | | * @ingroup markers |
2406 | | * @brief Create a marker instance |
2407 | | * @param[in] domain The domain for this marker |
2408 | | * @param[in] id The instance ID for this marker or __itt_null |
2409 | | * @param[in] name The name for this marker |
2410 | | * @param[in] scope The scope for this marker |
2411 | | */ |
2412 | | void ITTAPI __itt_marker(const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope); |
2413 | | |
2414 | | /** @cond exclude_from_documentation */ |
2415 | | #ifndef INTEL_NO_MACRO_BODY |
2416 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2417 | | ITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope)) |
2418 | | #define __itt_marker(d,x,y,z) ITTNOTIFY_VOID_D3(marker,d,x,y,z) |
2419 | | #define __itt_marker_ptr ITTNOTIFY_NAME(marker) |
2420 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2421 | | #define __itt_marker(domain,id,name,scope) |
2422 | | #define __itt_marker_ptr 0 |
2423 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2424 | | #else /* INTEL_NO_MACRO_BODY */ |
2425 | | #define __itt_marker_ptr 0 |
2426 | | #endif /* INTEL_NO_MACRO_BODY */ |
2427 | | /** @endcond */ |
2428 | | /** @} markers group */ |
2429 | | |
2430 | | /** |
2431 | | * @defgroup metadata Metadata |
2432 | | * The metadata API is used to attach extra information to named |
2433 | | * entities. Metadata can be attached to an identified named entity by ID, |
2434 | | * or to the current entity (which is always a task). |
2435 | | * |
2436 | | * Conceptually metadata has a type (what kind of metadata), a key (the |
2437 | | * name of the metadata), and a value (the actual data). The encoding of |
2438 | | * the value depends on the type of the metadata. |
2439 | | * |
2440 | | * The type of metadata is specified by an enumerated type __itt_metdata_type. |
2441 | | * @{ |
2442 | | */ |
2443 | | |
2444 | | /** |
2445 | | * @ingroup parameters |
2446 | | * @brief describes the type of metadata |
2447 | | */ |
2448 | | typedef enum { |
2449 | | __itt_metadata_unknown = 0, |
2450 | | __itt_metadata_u64, /**< Unsigned 64-bit integer */ |
2451 | | __itt_metadata_s64, /**< Signed 64-bit integer */ |
2452 | | __itt_metadata_u32, /**< Unsigned 32-bit integer */ |
2453 | | __itt_metadata_s32, /**< Signed 32-bit integer */ |
2454 | | __itt_metadata_u16, /**< Unsigned 16-bit integer */ |
2455 | | __itt_metadata_s16, /**< Signed 16-bit integer */ |
2456 | | __itt_metadata_float, /**< Signed 32-bit floating-point */ |
2457 | | __itt_metadata_double /**< SIgned 64-bit floating-point */ |
2458 | | } __itt_metadata_type; |
2459 | | |
2460 | | /** |
2461 | | * @ingroup parameters |
2462 | | * @brief Add metadata to an instance of a named entity. |
2463 | | * @param[in] domain The domain controlling the call |
2464 | | * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task |
2465 | | * @param[in] key The name of the metadata |
2466 | | * @param[in] type The type of the metadata |
2467 | | * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added. |
2468 | | * @param[in] data The metadata itself |
2469 | | */ |
2470 | | void ITTAPI __itt_metadata_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data); |
2471 | | |
2472 | | /** @cond exclude_from_documentation */ |
2473 | | #ifndef INTEL_NO_MACRO_BODY |
2474 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2475 | | ITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data)) |
2476 | 0 | #define __itt_metadata_add(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add,d,x,y,z,a,b) |
2477 | | #define __itt_metadata_add_ptr ITTNOTIFY_NAME(metadata_add) |
2478 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2479 | | #define __itt_metadata_add(d,x,y,z,a,b) |
2480 | | #define __itt_metadata_add_ptr 0 |
2481 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2482 | | #else /* INTEL_NO_MACRO_BODY */ |
2483 | | #define __itt_metadata_add_ptr 0 |
2484 | | #endif /* INTEL_NO_MACRO_BODY */ |
2485 | | /** @endcond */ |
2486 | | |
2487 | | /** |
2488 | | * @ingroup parameters |
2489 | | * @brief Add string metadata to an instance of a named entity. |
2490 | | * @param[in] domain The domain controlling the call |
2491 | | * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task |
2492 | | * @param[in] key The name of the metadata |
2493 | | * @param[in] data The metadata itself |
2494 | | * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated |
2495 | | */ |
2496 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2497 | | void ITTAPI __itt_metadata_str_addA(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length); |
2498 | | void ITTAPI __itt_metadata_str_addW(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length); |
2499 | | #if defined(UNICODE) || defined(_UNICODE) |
2500 | | # define __itt_metadata_str_add __itt_metadata_str_addW |
2501 | | # define __itt_metadata_str_add_ptr __itt_metadata_str_addW_ptr |
2502 | | #else /* UNICODE */ |
2503 | | # define __itt_metadata_str_add __itt_metadata_str_addA |
2504 | | # define __itt_metadata_str_add_ptr __itt_metadata_str_addA_ptr |
2505 | | #endif /* UNICODE */ |
2506 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2507 | | void ITTAPI __itt_metadata_str_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length); |
2508 | | #endif |
2509 | | |
2510 | | /** @cond exclude_from_documentation */ |
2511 | | #ifndef INTEL_NO_MACRO_BODY |
2512 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2513 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2514 | | ITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length)) |
2515 | | ITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length)) |
2516 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2517 | | ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length)) |
2518 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2519 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2520 | | #define __itt_metadata_str_addA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addA,d,x,y,z,a) |
2521 | | #define __itt_metadata_str_addA_ptr ITTNOTIFY_NAME(metadata_str_addA) |
2522 | | #define __itt_metadata_str_addW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addW,d,x,y,z,a) |
2523 | | #define __itt_metadata_str_addW_ptr ITTNOTIFY_NAME(metadata_str_addW) |
2524 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2525 | 0 | #define __itt_metadata_str_add(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add,d,x,y,z,a) |
2526 | | #define __itt_metadata_str_add_ptr ITTNOTIFY_NAME(metadata_str_add) |
2527 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2528 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2529 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2530 | | #define __itt_metadata_str_addA(d,x,y,z,a) |
2531 | | #define __itt_metadata_str_addA_ptr 0 |
2532 | | #define __itt_metadata_str_addW(d,x,y,z,a) |
2533 | | #define __itt_metadata_str_addW_ptr 0 |
2534 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2535 | | #define __itt_metadata_str_add(d,x,y,z,a) |
2536 | | #define __itt_metadata_str_add_ptr 0 |
2537 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2538 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2539 | | #else /* INTEL_NO_MACRO_BODY */ |
2540 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2541 | | #define __itt_metadata_str_addA_ptr 0 |
2542 | | #define __itt_metadata_str_addW_ptr 0 |
2543 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2544 | | #define __itt_metadata_str_add_ptr 0 |
2545 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2546 | | #endif /* INTEL_NO_MACRO_BODY */ |
2547 | | /** @endcond */ |
2548 | | |
2549 | | /** |
2550 | | * @ingroup parameters |
2551 | | * @brief Add metadata to an instance of a named entity. |
2552 | | * @param[in] domain The domain controlling the call |
2553 | | * @param[in] scope The scope of the instance to which the metadata is to be added |
2554 | | |
2555 | | * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task |
2556 | | |
2557 | | * @param[in] key The name of the metadata |
2558 | | * @param[in] type The type of the metadata |
2559 | | * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added. |
2560 | | * @param[in] data The metadata itself |
2561 | | */ |
2562 | | void ITTAPI __itt_metadata_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data); |
2563 | | |
2564 | | /** @cond exclude_from_documentation */ |
2565 | | #ifndef INTEL_NO_MACRO_BODY |
2566 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2567 | | ITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data)) |
2568 | | #define __itt_metadata_add_with_scope(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add_with_scope,d,x,y,z,a,b) |
2569 | | #define __itt_metadata_add_with_scope_ptr ITTNOTIFY_NAME(metadata_add_with_scope) |
2570 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2571 | | #define __itt_metadata_add_with_scope(d,x,y,z,a,b) |
2572 | | #define __itt_metadata_add_with_scope_ptr 0 |
2573 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2574 | | #else /* INTEL_NO_MACRO_BODY */ |
2575 | | #define __itt_metadata_add_with_scope_ptr 0 |
2576 | | #endif /* INTEL_NO_MACRO_BODY */ |
2577 | | /** @endcond */ |
2578 | | |
2579 | | /** |
2580 | | * @ingroup parameters |
2581 | | * @brief Add string metadata to an instance of a named entity. |
2582 | | * @param[in] domain The domain controlling the call |
2583 | | * @param[in] scope The scope of the instance to which the metadata is to be added |
2584 | | |
2585 | | * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task |
2586 | | |
2587 | | * @param[in] key The name of the metadata |
2588 | | * @param[in] data The metadata itself |
2589 | | * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated |
2590 | | */ |
2591 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2592 | | void ITTAPI __itt_metadata_str_add_with_scopeA(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length); |
2593 | | void ITTAPI __itt_metadata_str_add_with_scopeW(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length); |
2594 | | #if defined(UNICODE) || defined(_UNICODE) |
2595 | | # define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeW |
2596 | | # define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeW_ptr |
2597 | | #else /* UNICODE */ |
2598 | | # define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeA |
2599 | | # define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeA_ptr |
2600 | | #endif /* UNICODE */ |
2601 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2602 | | void ITTAPI __itt_metadata_str_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length); |
2603 | | #endif |
2604 | | |
2605 | | /** @cond exclude_from_documentation */ |
2606 | | #ifndef INTEL_NO_MACRO_BODY |
2607 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2608 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2609 | | ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length)) |
2610 | | ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length)) |
2611 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2612 | | ITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length)) |
2613 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2614 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2615 | | #define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeA,d,x,y,z,a) |
2616 | | #define __itt_metadata_str_add_with_scopeA_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeA) |
2617 | | #define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeW,d,x,y,z,a) |
2618 | | #define __itt_metadata_str_add_with_scopeW_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeW) |
2619 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2620 | | #define __itt_metadata_str_add_with_scope(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scope,d,x,y,z,a) |
2621 | | #define __itt_metadata_str_add_with_scope_ptr ITTNOTIFY_NAME(metadata_str_add_with_scope) |
2622 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2623 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2624 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2625 | | #define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) |
2626 | | #define __itt_metadata_str_add_with_scopeA_ptr 0 |
2627 | | #define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) |
2628 | | #define __itt_metadata_str_add_with_scopeW_ptr 0 |
2629 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2630 | | #define __itt_metadata_str_add_with_scope(d,x,y,z,a) |
2631 | | #define __itt_metadata_str_add_with_scope_ptr 0 |
2632 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2633 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2634 | | #else /* INTEL_NO_MACRO_BODY */ |
2635 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2636 | | #define __itt_metadata_str_add_with_scopeA_ptr 0 |
2637 | | #define __itt_metadata_str_add_with_scopeW_ptr 0 |
2638 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2639 | | #define __itt_metadata_str_add_with_scope_ptr 0 |
2640 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2641 | | #endif /* INTEL_NO_MACRO_BODY */ |
2642 | | /** @endcond */ |
2643 | | |
2644 | | /** @} metadata group */ |
2645 | | |
2646 | | /** |
2647 | | * @defgroup relations Relations |
2648 | | * Instances of named entities can be explicitly associated with other |
2649 | | * instances using instance IDs and the relationship API calls. |
2650 | | * |
2651 | | * @{ |
2652 | | */ |
2653 | | |
2654 | | /** |
2655 | | * @ingroup relations |
2656 | | * @brief The kind of relation between two instances is specified by the enumerated type __itt_relation. |
2657 | | * Relations between instances can be added with an API call. The relation |
2658 | | * API uses instance IDs. Relations can be added before or after the actual |
2659 | | * instances are created and persist independently of the instances. This |
2660 | | * is the motivation for having different lifetimes for instance IDs and |
2661 | | * the actual instances. |
2662 | | */ |
2663 | | typedef enum |
2664 | | { |
2665 | | __itt_relation_is_unknown = 0, |
2666 | | __itt_relation_is_dependent_on, /**< "A is dependent on B" means that A cannot start until B completes */ |
2667 | | __itt_relation_is_sibling_of, /**< "A is sibling of B" means that A and B were created as a group */ |
2668 | | __itt_relation_is_parent_of, /**< "A is parent of B" means that A created B */ |
2669 | | __itt_relation_is_continuation_of, /**< "A is continuation of B" means that A assumes the dependencies of B */ |
2670 | | __itt_relation_is_child_of, /**< "A is child of B" means that A was created by B (inverse of is_parent_of) */ |
2671 | | __itt_relation_is_continued_by, /**< "A is continued by B" means that B assumes the dependencies of A (inverse of is_continuation_of) */ |
2672 | | __itt_relation_is_predecessor_to /**< "A is predecessor to B" means that B cannot start until A completes (inverse of is_dependent_on) */ |
2673 | | } __itt_relation; |
2674 | | |
2675 | | /** |
2676 | | * @ingroup relations |
2677 | | * @brief Add a relation to the current task instance. |
2678 | | * The current task instance is the head of the relation. |
2679 | | * @param[in] domain The domain controlling this call |
2680 | | * @param[in] relation The kind of relation |
2681 | | * @param[in] tail The ID for the tail of the relation |
2682 | | */ |
2683 | | void ITTAPI __itt_relation_add_to_current(const __itt_domain *domain, __itt_relation relation, __itt_id tail); |
2684 | | |
2685 | | /** |
2686 | | * @ingroup relations |
2687 | | * @brief Add a relation between two instance identifiers. |
2688 | | * @param[in] domain The domain controlling this call |
2689 | | * @param[in] head The ID for the head of the relation |
2690 | | * @param[in] relation The kind of relation |
2691 | | * @param[in] tail The ID for the tail of the relation |
2692 | | */ |
2693 | | void ITTAPI __itt_relation_add(const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail); |
2694 | | |
2695 | | /** @cond exclude_from_documentation */ |
2696 | | #ifndef INTEL_NO_MACRO_BODY |
2697 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2698 | | ITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail)) |
2699 | | ITT_STUBV(ITTAPI, void, relation_add, (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail)) |
2700 | | #define __itt_relation_add_to_current(d,x,y) ITTNOTIFY_VOID_D2(relation_add_to_current,d,x,y) |
2701 | | #define __itt_relation_add_to_current_ptr ITTNOTIFY_NAME(relation_add_to_current) |
2702 | 0 | #define __itt_relation_add(d,x,y,z) ITTNOTIFY_VOID_D3(relation_add,d,x,y,z) |
2703 | | #define __itt_relation_add_ptr ITTNOTIFY_NAME(relation_add) |
2704 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2705 | | #define __itt_relation_add_to_current(d,x,y) |
2706 | | #define __itt_relation_add_to_current_ptr 0 |
2707 | | #define __itt_relation_add(d,x,y,z) |
2708 | | #define __itt_relation_add_ptr 0 |
2709 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2710 | | #else /* INTEL_NO_MACRO_BODY */ |
2711 | | #define __itt_relation_add_to_current_ptr 0 |
2712 | | #define __itt_relation_add_ptr 0 |
2713 | | #endif /* INTEL_NO_MACRO_BODY */ |
2714 | | /** @endcond */ |
2715 | | /** @} relations group */ |
2716 | | |
2717 | | /** @cond exclude_from_documentation */ |
2718 | | #pragma pack(push, 8) |
2719 | | |
2720 | | typedef struct ___itt_clock_info |
2721 | | { |
2722 | | unsigned long long clock_freq; /*!< Clock domain frequency */ |
2723 | | unsigned long long clock_base; /*!< Clock domain base timestamp */ |
2724 | | } __itt_clock_info; |
2725 | | |
2726 | | #pragma pack(pop) |
2727 | | /** @endcond */ |
2728 | | |
2729 | | /** @cond exclude_from_documentation */ |
2730 | | typedef void (ITTAPI *__itt_get_clock_info_fn)(__itt_clock_info* clock_info, void* data); |
2731 | | /** @endcond */ |
2732 | | |
2733 | | /** @cond exclude_from_documentation */ |
2734 | | #pragma pack(push, 8) |
2735 | | |
2736 | | typedef struct ___itt_clock_domain |
2737 | | { |
2738 | | __itt_clock_info info; /*!< Most recent clock domain info */ |
2739 | | __itt_get_clock_info_fn fn; /*!< Callback function pointer */ |
2740 | | void* fn_data; /*!< Input argument for the callback function */ |
2741 | | int extra1; /*!< Reserved. Must be zero */ |
2742 | | void* extra2; /*!< Reserved. Must be zero */ |
2743 | | struct ___itt_clock_domain* next; |
2744 | | } __itt_clock_domain; |
2745 | | |
2746 | | #pragma pack(pop) |
2747 | | /** @endcond */ |
2748 | | |
2749 | | /** |
2750 | | * @ingroup clockdomains |
2751 | | * @brief Create a clock domain. |
2752 | | * Certain applications require the capability to trace their application using |
2753 | | * a clock domain different than the CPU, for instance the instrumentation of events |
2754 | | * that occur on a GPU. |
2755 | | * Because the set of domains is expected to be static over the application's execution time, |
2756 | | * there is no mechanism to destroy a domain. |
2757 | | * Any domain can be accessed by any thread in the process, regardless of which thread created |
2758 | | * the domain. This call is thread-safe. |
2759 | | * @param[in] fn A pointer to a callback function which retrieves alternative CPU timestamps |
2760 | | * @param[in] fn_data Argument for a callback function; may be NULL |
2761 | | */ |
2762 | | __itt_clock_domain* ITTAPI __itt_clock_domain_create(__itt_get_clock_info_fn fn, void* fn_data); |
2763 | | |
2764 | | /** @cond exclude_from_documentation */ |
2765 | | #ifndef INTEL_NO_MACRO_BODY |
2766 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2767 | | ITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data)) |
2768 | | #define __itt_clock_domain_create ITTNOTIFY_DATA(clock_domain_create) |
2769 | | #define __itt_clock_domain_create_ptr ITTNOTIFY_NAME(clock_domain_create) |
2770 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2771 | | #define __itt_clock_domain_create(fn,fn_data) (__itt_clock_domain*)0 |
2772 | | #define __itt_clock_domain_create_ptr 0 |
2773 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2774 | | #else /* INTEL_NO_MACRO_BODY */ |
2775 | | #define __itt_clock_domain_create_ptr 0 |
2776 | | #endif /* INTEL_NO_MACRO_BODY */ |
2777 | | /** @endcond */ |
2778 | | |
2779 | | /** |
2780 | | * @ingroup clockdomains |
2781 | | * @brief Recalculate clock domains frequencies and clock base timestamps. |
2782 | | */ |
2783 | | void ITTAPI __itt_clock_domain_reset(void); |
2784 | | |
2785 | | /** @cond exclude_from_documentation */ |
2786 | | #ifndef INTEL_NO_MACRO_BODY |
2787 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2788 | | ITT_STUBV(ITTAPI, void, clock_domain_reset, (void)) |
2789 | | #define __itt_clock_domain_reset ITTNOTIFY_VOID(clock_domain_reset) |
2790 | | #define __itt_clock_domain_reset_ptr ITTNOTIFY_NAME(clock_domain_reset) |
2791 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2792 | | #define __itt_clock_domain_reset() |
2793 | | #define __itt_clock_domain_reset_ptr 0 |
2794 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2795 | | #else /* INTEL_NO_MACRO_BODY */ |
2796 | | #define __itt_clock_domain_reset_ptr 0 |
2797 | | #endif /* INTEL_NO_MACRO_BODY */ |
2798 | | /** @endcond */ |
2799 | | |
2800 | | /** |
2801 | | * @ingroup clockdomain |
2802 | | * @brief Create an instance of identifier. This establishes the beginning of the lifetime of |
2803 | | * an instance of the given ID in the trace. Once this lifetime starts, the ID can be used to |
2804 | | * tag named entity instances in calls such as __itt_task_begin, and to specify relationships among |
2805 | | * identified named entity instances, using the \ref relations APIs. |
2806 | | * @param[in] domain The domain controlling the execution of this call. |
2807 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
2808 | | * @param[in] timestamp The user defined timestamp. |
2809 | | * @param[in] id The ID to create. |
2810 | | */ |
2811 | | void ITTAPI __itt_id_create_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id); |
2812 | | |
2813 | | /** |
2814 | | * @ingroup clockdomain |
2815 | | * @brief Destroy an instance of identifier. This ends the lifetime of the current instance of the |
2816 | | * given ID value in the trace. Any relationships that are established after this lifetime ends are |
2817 | | * invalid. This call must be performed before the given ID value can be reused for a different |
2818 | | * named entity instance. |
2819 | | * @param[in] domain The domain controlling the execution of this call. |
2820 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
2821 | | * @param[in] timestamp The user defined timestamp. |
2822 | | * @param[in] id The ID to destroy. |
2823 | | */ |
2824 | | void ITTAPI __itt_id_destroy_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id); |
2825 | | |
2826 | | /** @cond exclude_from_documentation */ |
2827 | | #ifndef INTEL_NO_MACRO_BODY |
2828 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2829 | | ITT_STUBV(ITTAPI, void, id_create_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id)) |
2830 | | ITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id)) |
2831 | | #define __itt_id_create_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_create_ex,d,x,y,z) |
2832 | | #define __itt_id_create_ex_ptr ITTNOTIFY_NAME(id_create_ex) |
2833 | | #define __itt_id_destroy_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_destroy_ex,d,x,y,z) |
2834 | | #define __itt_id_destroy_ex_ptr ITTNOTIFY_NAME(id_destroy_ex) |
2835 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2836 | | #define __itt_id_create_ex(domain,clock_domain,timestamp,id) |
2837 | | #define __itt_id_create_ex_ptr 0 |
2838 | | #define __itt_id_destroy_ex(domain,clock_domain,timestamp,id) |
2839 | | #define __itt_id_destroy_ex_ptr 0 |
2840 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2841 | | #else /* INTEL_NO_MACRO_BODY */ |
2842 | | #define __itt_id_create_ex_ptr 0 |
2843 | | #define __itt_id_destroy_ex_ptr 0 |
2844 | | #endif /* INTEL_NO_MACRO_BODY */ |
2845 | | /** @endcond */ |
2846 | | |
2847 | | /** |
2848 | | * @ingroup clockdomain |
2849 | | * @brief Begin a task instance. |
2850 | | * @param[in] domain The domain for this task |
2851 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
2852 | | * @param[in] timestamp The user defined timestamp. |
2853 | | * @param[in] taskid The instance ID for this task instance, or __itt_null |
2854 | | * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null |
2855 | | * @param[in] name The name of this task |
2856 | | */ |
2857 | | void ITTAPI __itt_task_begin_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); |
2858 | | |
2859 | | /** |
2860 | | * @ingroup clockdomain |
2861 | | * @brief Begin a task instance. |
2862 | | * @param[in] domain The domain for this task |
2863 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
2864 | | * @param[in] timestamp The user defined timestamp. |
2865 | | * @param[in] taskid The identifier for this task instance, or __itt_null |
2866 | | * @param[in] parentid The parent of this task, or __itt_null |
2867 | | * @param[in] fn The pointer to the function you are tracing |
2868 | | */ |
2869 | | void ITTAPI __itt_task_begin_fn_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, void* fn); |
2870 | | |
2871 | | /** |
2872 | | * @ingroup clockdomain |
2873 | | * @brief End the current task instance. |
2874 | | * @param[in] domain The domain for this task |
2875 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
2876 | | * @param[in] timestamp The user defined timestamp. |
2877 | | */ |
2878 | | void ITTAPI __itt_task_end_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp); |
2879 | | |
2880 | | /** @cond exclude_from_documentation */ |
2881 | | #ifndef INTEL_NO_MACRO_BODY |
2882 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2883 | | ITT_STUBV(ITTAPI, void, task_begin_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name)) |
2884 | | ITT_STUBV(ITTAPI, void, task_begin_fn_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn)) |
2885 | | ITT_STUBV(ITTAPI, void, task_end_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp)) |
2886 | | #define __itt_task_begin_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_ex,d,x,y,z,a,b) |
2887 | | #define __itt_task_begin_ex_ptr ITTNOTIFY_NAME(task_begin_ex) |
2888 | | #define __itt_task_begin_fn_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_fn_ex,d,x,y,z,a,b) |
2889 | | #define __itt_task_begin_fn_ex_ptr ITTNOTIFY_NAME(task_begin_fn_ex) |
2890 | | #define __itt_task_end_ex(d,x,y) ITTNOTIFY_VOID_D2(task_end_ex,d,x,y) |
2891 | | #define __itt_task_end_ex_ptr ITTNOTIFY_NAME(task_end_ex) |
2892 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2893 | | #define __itt_task_begin_ex(domain,clock_domain,timestamp,id,parentid,name) |
2894 | | #define __itt_task_begin_ex_ptr 0 |
2895 | | #define __itt_task_begin_fn_ex(domain,clock_domain,timestamp,id,parentid,fn) |
2896 | | #define __itt_task_begin_fn_ex_ptr 0 |
2897 | | #define __itt_task_end_ex(domain,clock_domain,timestamp) |
2898 | | #define __itt_task_end_ex_ptr 0 |
2899 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2900 | | #else /* INTEL_NO_MACRO_BODY */ |
2901 | | #define __itt_task_begin_ex_ptr 0 |
2902 | | #define __itt_task_begin_fn_ex_ptr 0 |
2903 | | #define __itt_task_end_ex_ptr 0 |
2904 | | #endif /* INTEL_NO_MACRO_BODY */ |
2905 | | /** @endcond */ |
2906 | | |
2907 | | /** |
2908 | | * @defgroup counters Counters |
2909 | | * @ingroup public |
2910 | | * Counters are user-defined objects with a monotonically increasing |
2911 | | * value. Counter values are 64-bit unsigned integers. |
2912 | | * Counters have names that can be displayed in |
2913 | | * the tools. |
2914 | | * @{ |
2915 | | */ |
2916 | | |
2917 | | /** |
2918 | | * @brief opaque structure for counter identification |
2919 | | */ |
2920 | | /** @cond exclude_from_documentation */ |
2921 | | |
2922 | | typedef struct ___itt_counter* __itt_counter; |
2923 | | |
2924 | | /** |
2925 | | * @brief Create an unsigned 64 bits integer counter with given name/domain |
2926 | | * |
2927 | | * After __itt_counter_create() is called, __itt_counter_inc(id), __itt_counter_inc_delta(id, delta), |
2928 | | * __itt_counter_set_value(id, value_ptr) or __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr) |
2929 | | * can be used to change the value of the counter, where value_ptr is a pointer to an unsigned 64 bits integer |
2930 | | * |
2931 | | * The call is equal to __itt_counter_create_typed(name, domain, __itt_metadata_u64) |
2932 | | */ |
2933 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2934 | | __itt_counter ITTAPI __itt_counter_createA(const char *name, const char *domain); |
2935 | | __itt_counter ITTAPI __itt_counter_createW(const wchar_t *name, const wchar_t *domain); |
2936 | | #if defined(UNICODE) || defined(_UNICODE) |
2937 | | # define __itt_counter_create __itt_counter_createW |
2938 | | # define __itt_counter_create_ptr __itt_counter_createW_ptr |
2939 | | #else /* UNICODE */ |
2940 | | # define __itt_counter_create __itt_counter_createA |
2941 | | # define __itt_counter_create_ptr __itt_counter_createA_ptr |
2942 | | #endif /* UNICODE */ |
2943 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2944 | | __itt_counter ITTAPI __itt_counter_create(const char *name, const char *domain); |
2945 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2946 | | |
2947 | | #ifndef INTEL_NO_MACRO_BODY |
2948 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2949 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2950 | | ITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char *name, const char *domain)) |
2951 | | ITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain)) |
2952 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2953 | | ITT_STUB(ITTAPI, __itt_counter, counter_create, (const char *name, const char *domain)) |
2954 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2955 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2956 | | #define __itt_counter_createA ITTNOTIFY_DATA(counter_createA) |
2957 | | #define __itt_counter_createA_ptr ITTNOTIFY_NAME(counter_createA) |
2958 | | #define __itt_counter_createW ITTNOTIFY_DATA(counter_createW) |
2959 | | #define __itt_counter_createW_ptr ITTNOTIFY_NAME(counter_createW) |
2960 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2961 | | #define __itt_counter_create ITTNOTIFY_DATA(counter_create) |
2962 | | #define __itt_counter_create_ptr ITTNOTIFY_NAME(counter_create) |
2963 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2964 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2965 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2966 | | #define __itt_counter_createA(name, domain) |
2967 | | #define __itt_counter_createA_ptr 0 |
2968 | | #define __itt_counter_createW(name, domain) |
2969 | | #define __itt_counter_createW_ptr 0 |
2970 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2971 | | #define __itt_counter_create(name, domain) |
2972 | | #define __itt_counter_create_ptr 0 |
2973 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2974 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
2975 | | #else /* INTEL_NO_MACRO_BODY */ |
2976 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
2977 | | #define __itt_counter_createA_ptr 0 |
2978 | | #define __itt_counter_createW_ptr 0 |
2979 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2980 | | #define __itt_counter_create_ptr 0 |
2981 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
2982 | | #endif /* INTEL_NO_MACRO_BODY */ |
2983 | | /** @endcond */ |
2984 | | |
2985 | | /** |
2986 | | * @brief Increment the unsigned 64 bits integer counter value |
2987 | | * |
2988 | | * Calling this function to non-unsigned 64 bits integer counters has no effect |
2989 | | */ |
2990 | | void ITTAPI __itt_counter_inc(__itt_counter id); |
2991 | | |
2992 | | #ifndef INTEL_NO_MACRO_BODY |
2993 | | #ifndef INTEL_NO_ITTNOTIFY_API |
2994 | | ITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id)) |
2995 | | #define __itt_counter_inc ITTNOTIFY_VOID(counter_inc) |
2996 | | #define __itt_counter_inc_ptr ITTNOTIFY_NAME(counter_inc) |
2997 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
2998 | | #define __itt_counter_inc(id) |
2999 | | #define __itt_counter_inc_ptr 0 |
3000 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3001 | | #else /* INTEL_NO_MACRO_BODY */ |
3002 | | #define __itt_counter_inc_ptr 0 |
3003 | | #endif /* INTEL_NO_MACRO_BODY */ |
3004 | | /** @endcond */ |
3005 | | /** |
3006 | | * @brief Increment the unsigned 64 bits integer counter value with x |
3007 | | * |
3008 | | * Calling this function to non-unsigned 64 bits integer counters has no effect |
3009 | | */ |
3010 | | void ITTAPI __itt_counter_inc_delta(__itt_counter id, unsigned long long value); |
3011 | | |
3012 | | #ifndef INTEL_NO_MACRO_BODY |
3013 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3014 | | ITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value)) |
3015 | | #define __itt_counter_inc_delta ITTNOTIFY_VOID(counter_inc_delta) |
3016 | | #define __itt_counter_inc_delta_ptr ITTNOTIFY_NAME(counter_inc_delta) |
3017 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3018 | | #define __itt_counter_inc_delta(id, value) |
3019 | | #define __itt_counter_inc_delta_ptr 0 |
3020 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3021 | | #else /* INTEL_NO_MACRO_BODY */ |
3022 | | #define __itt_counter_inc_delta_ptr 0 |
3023 | | #endif /* INTEL_NO_MACRO_BODY */ |
3024 | | /** @endcond */ |
3025 | | |
3026 | | /** |
3027 | | * @brief Decrement the unsigned 64 bits integer counter value |
3028 | | * |
3029 | | * Calling this function to non-unsigned 64 bits integer counters has no effect |
3030 | | */ |
3031 | | void ITTAPI __itt_counter_dec(__itt_counter id); |
3032 | | |
3033 | | #ifndef INTEL_NO_MACRO_BODY |
3034 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3035 | | ITT_STUBV(ITTAPI, void, counter_dec, (__itt_counter id)) |
3036 | | #define __itt_counter_dec ITTNOTIFY_VOID(counter_dec) |
3037 | | #define __itt_counter_dec_ptr ITTNOTIFY_NAME(counter_dec) |
3038 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3039 | | #define __itt_counter_dec(id) |
3040 | | #define __itt_counter_dec_ptr 0 |
3041 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3042 | | #else /* INTEL_NO_MACRO_BODY */ |
3043 | | #define __itt_counter_dec_ptr 0 |
3044 | | #endif /* INTEL_NO_MACRO_BODY */ |
3045 | | /** @endcond */ |
3046 | | /** |
3047 | | * @brief Decrement the unsigned 64 bits integer counter value with x |
3048 | | * |
3049 | | * Calling this function to non-unsigned 64 bits integer counters has no effect |
3050 | | */ |
3051 | | void ITTAPI __itt_counter_dec_delta(__itt_counter id, unsigned long long value); |
3052 | | |
3053 | | #ifndef INTEL_NO_MACRO_BODY |
3054 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3055 | | ITT_STUBV(ITTAPI, void, counter_dec_delta, (__itt_counter id, unsigned long long value)) |
3056 | | #define __itt_counter_dec_delta ITTNOTIFY_VOID(counter_dec_delta) |
3057 | | #define __itt_counter_dec_delta_ptr ITTNOTIFY_NAME(counter_dec_delta) |
3058 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3059 | | #define __itt_counter_dec_delta(id, value) |
3060 | | #define __itt_counter_dec_delta_ptr 0 |
3061 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3062 | | #else /* INTEL_NO_MACRO_BODY */ |
3063 | | #define __itt_counter_dec_delta_ptr 0 |
3064 | | #endif /* INTEL_NO_MACRO_BODY */ |
3065 | | /** @endcond */ |
3066 | | |
3067 | | /** |
3068 | | * @ingroup counters |
3069 | | * @brief Increment a counter by one. |
3070 | | * The first call with a given name creates a counter by that name and sets its |
3071 | | * value to zero. Successive calls increment the counter value. |
3072 | | * @param[in] domain The domain controlling the call. Counter names are not domain specific. |
3073 | | * The domain argument is used only to enable or disable the API calls. |
3074 | | * @param[in] name The name of the counter |
3075 | | */ |
3076 | | void ITTAPI __itt_counter_inc_v3(const __itt_domain *domain, __itt_string_handle *name); |
3077 | | |
3078 | | /** |
3079 | | * @ingroup counters |
3080 | | * @brief Increment a counter by the value specified in delta. |
3081 | | * @param[in] domain The domain controlling the call. Counter names are not domain specific. |
3082 | | * The domain argument is used only to enable or disable the API calls. |
3083 | | * @param[in] name The name of the counter |
3084 | | * @param[in] delta The amount by which to increment the counter |
3085 | | */ |
3086 | | void ITTAPI __itt_counter_inc_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta); |
3087 | | |
3088 | | #ifndef INTEL_NO_MACRO_BODY |
3089 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3090 | | ITT_STUBV(ITTAPI, void, counter_inc_v3, (const __itt_domain *domain, __itt_string_handle *name)) |
3091 | | ITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta)) |
3092 | | #define __itt_counter_inc_v3(d,x) ITTNOTIFY_VOID_D1(counter_inc_v3,d,x) |
3093 | | #define __itt_counter_inc_v3_ptr ITTNOTIFY_NAME(counter_inc_v3) |
3094 | | #define __itt_counter_inc_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_inc_delta_v3,d,x,y) |
3095 | | #define __itt_counter_inc_delta_v3_ptr ITTNOTIFY_NAME(counter_inc_delta_v3) |
3096 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3097 | | #define __itt_counter_inc_v3(domain,name) |
3098 | | #define __itt_counter_inc_v3_ptr 0 |
3099 | | #define __itt_counter_inc_delta_v3(domain,name,delta) |
3100 | | #define __itt_counter_inc_delta_v3_ptr 0 |
3101 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3102 | | #else /* INTEL_NO_MACRO_BODY */ |
3103 | | #define __itt_counter_inc_v3_ptr 0 |
3104 | | #define __itt_counter_inc_delta_v3_ptr 0 |
3105 | | #endif /* INTEL_NO_MACRO_BODY */ |
3106 | | /** @endcond */ |
3107 | | |
3108 | | |
3109 | | /** |
3110 | | * @ingroup counters |
3111 | | * @brief Decrement a counter by one. |
3112 | | * The first call with a given name creates a counter by that name and sets its |
3113 | | * value to zero. Successive calls decrement the counter value. |
3114 | | * @param[in] domain The domain controlling the call. Counter names are not domain specific. |
3115 | | * The domain argument is used only to enable or disable the API calls. |
3116 | | * @param[in] name The name of the counter |
3117 | | */ |
3118 | | void ITTAPI __itt_counter_dec_v3(const __itt_domain *domain, __itt_string_handle *name); |
3119 | | |
3120 | | /** |
3121 | | * @ingroup counters |
3122 | | * @brief Decrement a counter by the value specified in delta. |
3123 | | * @param[in] domain The domain controlling the call. Counter names are not domain specific. |
3124 | | * The domain argument is used only to enable or disable the API calls. |
3125 | | * @param[in] name The name of the counter |
3126 | | * @param[in] delta The amount by which to decrement the counter |
3127 | | */ |
3128 | | void ITTAPI __itt_counter_dec_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta); |
3129 | | |
3130 | | #ifndef INTEL_NO_MACRO_BODY |
3131 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3132 | | ITT_STUBV(ITTAPI, void, counter_dec_v3, (const __itt_domain *domain, __itt_string_handle *name)) |
3133 | | ITT_STUBV(ITTAPI, void, counter_dec_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta)) |
3134 | | #define __itt_counter_dec_v3(d,x) ITTNOTIFY_VOID_D1(counter_dec_v3,d,x) |
3135 | | #define __itt_counter_dec_v3_ptr ITTNOTIFY_NAME(counter_dec_v3) |
3136 | | #define __itt_counter_dec_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_dec_delta_v3,d,x,y) |
3137 | | #define __itt_counter_dec_delta_v3_ptr ITTNOTIFY_NAME(counter_dec_delta_v3) |
3138 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3139 | | #define __itt_counter_dec_v3(domain,name) |
3140 | | #define __itt_counter_dec_v3_ptr 0 |
3141 | | #define __itt_counter_dec_delta_v3(domain,name,delta) |
3142 | | #define __itt_counter_dec_delta_v3_ptr 0 |
3143 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3144 | | #else /* INTEL_NO_MACRO_BODY */ |
3145 | | #define __itt_counter_dec_v3_ptr 0 |
3146 | | #define __itt_counter_dec_delta_v3_ptr 0 |
3147 | | #endif /* INTEL_NO_MACRO_BODY */ |
3148 | | /** @endcond */ |
3149 | | |
3150 | | /** @} counters group */ |
3151 | | |
3152 | | |
3153 | | /** |
3154 | | * @brief Set the counter value |
3155 | | */ |
3156 | | void ITTAPI __itt_counter_set_value(__itt_counter id, void *value_ptr); |
3157 | | |
3158 | | #ifndef INTEL_NO_MACRO_BODY |
3159 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3160 | | ITT_STUBV(ITTAPI, void, counter_set_value, (__itt_counter id, void *value_ptr)) |
3161 | | #define __itt_counter_set_value ITTNOTIFY_VOID(counter_set_value) |
3162 | | #define __itt_counter_set_value_ptr ITTNOTIFY_NAME(counter_set_value) |
3163 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3164 | | #define __itt_counter_set_value(id, value_ptr) |
3165 | | #define __itt_counter_set_value_ptr 0 |
3166 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3167 | | #else /* INTEL_NO_MACRO_BODY */ |
3168 | | #define __itt_counter_set_value_ptr 0 |
3169 | | #endif /* INTEL_NO_MACRO_BODY */ |
3170 | | /** @endcond */ |
3171 | | |
3172 | | /** |
3173 | | * @brief Set the counter value |
3174 | | */ |
3175 | | void ITTAPI __itt_counter_set_value_ex(__itt_counter id, __itt_clock_domain *clock_domain, unsigned long long timestamp, void *value_ptr); |
3176 | | |
3177 | | /** @cond exclude_from_documentation */ |
3178 | | #ifndef INTEL_NO_MACRO_BODY |
3179 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3180 | | ITT_STUBV(ITTAPI, void, counter_set_value_ex, (__itt_counter id, __itt_clock_domain *clock_domain, unsigned long long timestamp, void *value_ptr)) |
3181 | | #define __itt_counter_set_value_ex ITTNOTIFY_VOID(counter_set_value_ex) |
3182 | | #define __itt_counter_set_value_ex_ptr ITTNOTIFY_NAME(counter_set_value_ex) |
3183 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3184 | | #define __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr) |
3185 | | #define __itt_counter_set_value_ex_ptr 0 |
3186 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3187 | | #else /* INTEL_NO_MACRO_BODY */ |
3188 | | #define __itt_counter_set_value_ex_ptr 0 |
3189 | | #endif /* INTEL_NO_MACRO_BODY */ |
3190 | | /** @endcond */ |
3191 | | |
3192 | | /** |
3193 | | * @brief Create a typed counter with given name/domain |
3194 | | * |
3195 | | * After __itt_counter_create_typed() is called, __itt_counter_inc(id), __itt_counter_inc_delta(id, delta), |
3196 | | * __itt_counter_set_value(id, value_ptr) or __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr) |
3197 | | * can be used to change the value of the counter |
3198 | | */ |
3199 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3200 | | __itt_counter ITTAPI __itt_counter_create_typedA(const char *name, const char *domain, __itt_metadata_type type); |
3201 | | __itt_counter ITTAPI __itt_counter_create_typedW(const wchar_t *name, const wchar_t *domain, __itt_metadata_type type); |
3202 | | #if defined(UNICODE) || defined(_UNICODE) |
3203 | | # define __itt_counter_create_typed __itt_counter_create_typedW |
3204 | | # define __itt_counter_create_typed_ptr __itt_counter_create_typedW_ptr |
3205 | | #else /* UNICODE */ |
3206 | | # define __itt_counter_create_typed __itt_counter_create_typedA |
3207 | | # define __itt_counter_create_typed_ptr __itt_counter_create_typedA_ptr |
3208 | | #endif /* UNICODE */ |
3209 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3210 | | __itt_counter ITTAPI __itt_counter_create_typed(const char *name, const char *domain, __itt_metadata_type type); |
3211 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3212 | | |
3213 | | #ifndef INTEL_NO_MACRO_BODY |
3214 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3215 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3216 | | ITT_STUB(ITTAPI, __itt_counter, counter_create_typedA, (const char *name, const char *domain, __itt_metadata_type type)) |
3217 | | ITT_STUB(ITTAPI, __itt_counter, counter_create_typedW, (const wchar_t *name, const wchar_t *domain, __itt_metadata_type type)) |
3218 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3219 | | ITT_STUB(ITTAPI, __itt_counter, counter_create_typed, (const char *name, const char *domain, __itt_metadata_type type)) |
3220 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3221 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3222 | | #define __itt_counter_create_typedA ITTNOTIFY_DATA(counter_create_typedA) |
3223 | | #define __itt_counter_create_typedA_ptr ITTNOTIFY_NAME(counter_create_typedA) |
3224 | | #define __itt_counter_create_typedW ITTNOTIFY_DATA(counter_create_typedW) |
3225 | | #define __itt_counter_create_typedW_ptr ITTNOTIFY_NAME(counter_create_typedW) |
3226 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3227 | | #define __itt_counter_create_typed ITTNOTIFY_DATA(counter_create_typed) |
3228 | | #define __itt_counter_create_typed_ptr ITTNOTIFY_NAME(counter_create_typed) |
3229 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3230 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3231 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3232 | | #define __itt_counter_create_typedA(name, domain, type) |
3233 | | #define __itt_counter_create_typedA_ptr 0 |
3234 | | #define __itt_counter_create_typedW(name, domain, type) |
3235 | | #define __itt_counter_create_typedW_ptr 0 |
3236 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3237 | | #define __itt_counter_create_typed(name, domain, type) |
3238 | | #define __itt_counter_create_typed_ptr 0 |
3239 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3240 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3241 | | #else /* INTEL_NO_MACRO_BODY */ |
3242 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3243 | | #define __itt_counter_create_typedA_ptr 0 |
3244 | | #define __itt_counter_create_typedW_ptr 0 |
3245 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3246 | | #define __itt_counter_create_typed_ptr 0 |
3247 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3248 | | #endif /* INTEL_NO_MACRO_BODY */ |
3249 | | /** @endcond */ |
3250 | | |
3251 | | /** |
3252 | | * @brief Destroy the counter identified by the pointer previously returned by __itt_counter_create() or |
3253 | | * __itt_counter_create_typed() |
3254 | | */ |
3255 | | void ITTAPI __itt_counter_destroy(__itt_counter id); |
3256 | | |
3257 | | #ifndef INTEL_NO_MACRO_BODY |
3258 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3259 | | ITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id)) |
3260 | | #define __itt_counter_destroy ITTNOTIFY_VOID(counter_destroy) |
3261 | | #define __itt_counter_destroy_ptr ITTNOTIFY_NAME(counter_destroy) |
3262 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3263 | | #define __itt_counter_destroy(id) |
3264 | | #define __itt_counter_destroy_ptr 0 |
3265 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3266 | | #else /* INTEL_NO_MACRO_BODY */ |
3267 | | #define __itt_counter_destroy_ptr 0 |
3268 | | #endif /* INTEL_NO_MACRO_BODY */ |
3269 | | /** @endcond */ |
3270 | | /** @} counters group */ |
3271 | | |
3272 | | /** |
3273 | | * @ingroup markers |
3274 | | * @brief Create a marker instance. |
3275 | | * @param[in] domain The domain for this marker |
3276 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
3277 | | * @param[in] timestamp The user defined timestamp. |
3278 | | * @param[in] id The instance ID for this marker, or __itt_null |
3279 | | * @param[in] name The name for this marker |
3280 | | * @param[in] scope The scope for this marker |
3281 | | */ |
3282 | | void ITTAPI __itt_marker_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope); |
3283 | | |
3284 | | /** @cond exclude_from_documentation */ |
3285 | | #ifndef INTEL_NO_MACRO_BODY |
3286 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3287 | | ITT_STUBV(ITTAPI, void, marker_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope)) |
3288 | | #define __itt_marker_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(marker_ex,d,x,y,z,a,b) |
3289 | | #define __itt_marker_ex_ptr ITTNOTIFY_NAME(marker_ex) |
3290 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3291 | | #define __itt_marker_ex(domain,clock_domain,timestamp,id,name,scope) |
3292 | | #define __itt_marker_ex_ptr 0 |
3293 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3294 | | #else /* INTEL_NO_MACRO_BODY */ |
3295 | | #define __itt_marker_ex_ptr 0 |
3296 | | #endif /* INTEL_NO_MACRO_BODY */ |
3297 | | /** @endcond */ |
3298 | | |
3299 | | /** |
3300 | | * @ingroup clockdomain |
3301 | | * @brief Add a relation to the current task instance. |
3302 | | * The current task instance is the head of the relation. |
3303 | | * @param[in] domain The domain controlling this call |
3304 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
3305 | | * @param[in] timestamp The user defined timestamp. |
3306 | | * @param[in] relation The kind of relation |
3307 | | * @param[in] tail The ID for the tail of the relation |
3308 | | */ |
3309 | | void ITTAPI __itt_relation_add_to_current_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail); |
3310 | | |
3311 | | /** |
3312 | | * @ingroup clockdomain |
3313 | | * @brief Add a relation between two instance identifiers. |
3314 | | * @param[in] domain The domain controlling this call |
3315 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
3316 | | * @param[in] timestamp The user defined timestamp. |
3317 | | * @param[in] head The ID for the head of the relation |
3318 | | * @param[in] relation The kind of relation |
3319 | | * @param[in] tail The ID for the tail of the relation |
3320 | | */ |
3321 | | void ITTAPI __itt_relation_add_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail); |
3322 | | |
3323 | | /** @cond exclude_from_documentation */ |
3324 | | #ifndef INTEL_NO_MACRO_BODY |
3325 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3326 | | ITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail)) |
3327 | | ITT_STUBV(ITTAPI, void, relation_add_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail)) |
3328 | | #define __itt_relation_add_to_current_ex(d,x,y,z,a) ITTNOTIFY_VOID_D4(relation_add_to_current_ex,d,x,y,z,a) |
3329 | | #define __itt_relation_add_to_current_ex_ptr ITTNOTIFY_NAME(relation_add_to_current_ex) |
3330 | | #define __itt_relation_add_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(relation_add_ex,d,x,y,z,a,b) |
3331 | | #define __itt_relation_add_ex_ptr ITTNOTIFY_NAME(relation_add_ex) |
3332 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3333 | | #define __itt_relation_add_to_current_ex(domain,clock_domain,timestame,relation,tail) |
3334 | | #define __itt_relation_add_to_current_ex_ptr 0 |
3335 | | #define __itt_relation_add_ex(domain,clock_domain,timestamp,head,relation,tail) |
3336 | | #define __itt_relation_add_ex_ptr 0 |
3337 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3338 | | #else /* INTEL_NO_MACRO_BODY */ |
3339 | | #define __itt_relation_add_to_current_ex_ptr 0 |
3340 | | #define __itt_relation_add_ex_ptr 0 |
3341 | | #endif /* INTEL_NO_MACRO_BODY */ |
3342 | | /** @endcond */ |
3343 | | |
3344 | | /** @cond exclude_from_documentation */ |
3345 | | typedef enum ___itt_track_group_type |
3346 | | { |
3347 | | __itt_track_group_type_normal = 0 |
3348 | | } __itt_track_group_type; |
3349 | | /** @endcond */ |
3350 | | |
3351 | | /** @cond exclude_from_documentation */ |
3352 | | #pragma pack(push, 8) |
3353 | | |
3354 | | typedef struct ___itt_track_group |
3355 | | { |
3356 | | __itt_string_handle* name; /*!< Name of the track group */ |
3357 | | struct ___itt_track* track; /*!< List of child tracks */ |
3358 | | __itt_track_group_type tgtype; /*!< Type of the track group */ |
3359 | | int extra1; /*!< Reserved. Must be zero */ |
3360 | | void* extra2; /*!< Reserved. Must be zero */ |
3361 | | struct ___itt_track_group* next; |
3362 | | } __itt_track_group; |
3363 | | |
3364 | | #pragma pack(pop) |
3365 | | /** @endcond */ |
3366 | | |
3367 | | /** |
3368 | | * @brief Placeholder for custom track types. Currently, "normal" custom track |
3369 | | * is the only available track type. |
3370 | | */ |
3371 | | typedef enum ___itt_track_type |
3372 | | { |
3373 | | __itt_track_type_normal = 0 |
3374 | | #ifdef INTEL_ITTNOTIFY_API_PRIVATE |
3375 | | , __itt_track_type_queue |
3376 | | #endif /* INTEL_ITTNOTIFY_API_PRIVATE */ |
3377 | | } __itt_track_type; |
3378 | | |
3379 | | /** @cond exclude_from_documentation */ |
3380 | | #pragma pack(push, 8) |
3381 | | |
3382 | | typedef struct ___itt_track |
3383 | | { |
3384 | | __itt_string_handle* name; /*!< Name of the track group */ |
3385 | | __itt_track_group* group; /*!< Parent group to a track */ |
3386 | | __itt_track_type ttype; /*!< Type of the track */ |
3387 | | int extra1; /*!< Reserved. Must be zero */ |
3388 | | void* extra2; /*!< Reserved. Must be zero */ |
3389 | | struct ___itt_track* next; |
3390 | | } __itt_track; |
3391 | | |
3392 | | #pragma pack(pop) |
3393 | | /** @endcond */ |
3394 | | |
3395 | | /** |
3396 | | * @brief Create logical track group. |
3397 | | */ |
3398 | | __itt_track_group* ITTAPI __itt_track_group_create(__itt_string_handle* name, __itt_track_group_type track_group_type); |
3399 | | |
3400 | | /** @cond exclude_from_documentation */ |
3401 | | #ifndef INTEL_NO_MACRO_BODY |
3402 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3403 | | ITT_STUB(ITTAPI, __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type)) |
3404 | | #define __itt_track_group_create ITTNOTIFY_DATA(track_group_create) |
3405 | | #define __itt_track_group_create_ptr ITTNOTIFY_NAME(track_group_create) |
3406 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3407 | | #define __itt_track_group_create(name) (__itt_track_group*)0 |
3408 | | #define __itt_track_group_create_ptr 0 |
3409 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3410 | | #else /* INTEL_NO_MACRO_BODY */ |
3411 | | #define __itt_track_group_create_ptr 0 |
3412 | | #endif /* INTEL_NO_MACRO_BODY */ |
3413 | | /** @endcond */ |
3414 | | |
3415 | | /** |
3416 | | * @brief Create logical track. |
3417 | | */ |
3418 | | __itt_track* ITTAPI __itt_track_create(__itt_track_group* track_group, __itt_string_handle* name, __itt_track_type track_type); |
3419 | | |
3420 | | /** @cond exclude_from_documentation */ |
3421 | | #ifndef INTEL_NO_MACRO_BODY |
3422 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3423 | | ITT_STUB(ITTAPI, __itt_track*, track_create, (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type)) |
3424 | | #define __itt_track_create ITTNOTIFY_DATA(track_create) |
3425 | | #define __itt_track_create_ptr ITTNOTIFY_NAME(track_create) |
3426 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3427 | | #define __itt_track_create(track_group,name,track_type) (__itt_track*)0 |
3428 | | #define __itt_track_create_ptr 0 |
3429 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3430 | | #else /* INTEL_NO_MACRO_BODY */ |
3431 | | #define __itt_track_create_ptr 0 |
3432 | | #endif /* INTEL_NO_MACRO_BODY */ |
3433 | | /** @endcond */ |
3434 | | |
3435 | | /** |
3436 | | * @brief Set the logical track. |
3437 | | */ |
3438 | | void ITTAPI __itt_set_track(__itt_track* track); |
3439 | | |
3440 | | /** @cond exclude_from_documentation */ |
3441 | | #ifndef INTEL_NO_MACRO_BODY |
3442 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3443 | | ITT_STUBV(ITTAPI, void, set_track, (__itt_track *track)) |
3444 | | #define __itt_set_track ITTNOTIFY_VOID(set_track) |
3445 | | #define __itt_set_track_ptr ITTNOTIFY_NAME(set_track) |
3446 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3447 | | #define __itt_set_track(track) |
3448 | | #define __itt_set_track_ptr 0 |
3449 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3450 | | #else /* INTEL_NO_MACRO_BODY */ |
3451 | | #define __itt_set_track_ptr 0 |
3452 | | #endif /* INTEL_NO_MACRO_BODY */ |
3453 | | /** @endcond */ |
3454 | | |
3455 | | /* ========================================================================== */ |
3456 | | /** @cond exclude_from_gpa_documentation */ |
3457 | | /** |
3458 | | * @defgroup events Events |
3459 | | * @ingroup public |
3460 | | * Events group |
3461 | | * @{ |
3462 | | */ |
3463 | | /** @brief user event type */ |
3464 | | typedef int __itt_event; |
3465 | | |
3466 | | /** |
3467 | | * @brief Create an event notification |
3468 | | * @note name or namelen being null/name and namelen not matching, user event feature not enabled |
3469 | | * @return non-zero event identifier upon success and __itt_err otherwise |
3470 | | */ |
3471 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3472 | | __itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen); |
3473 | | __itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen); |
3474 | | #if defined(UNICODE) || defined(_UNICODE) |
3475 | | # define __itt_event_create __itt_event_createW |
3476 | | # define __itt_event_create_ptr __itt_event_createW_ptr |
3477 | | #else |
3478 | | # define __itt_event_create __itt_event_createA |
3479 | | # define __itt_event_create_ptr __itt_event_createA_ptr |
3480 | | #endif /* UNICODE */ |
3481 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3482 | | __itt_event LIBITTAPI __itt_event_create(const char *name, int namelen); |
3483 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3484 | | |
3485 | | /** @cond exclude_from_documentation */ |
3486 | | #ifndef INTEL_NO_MACRO_BODY |
3487 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3488 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3489 | | ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen)) |
3490 | | ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen)) |
3491 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3492 | | ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen)) |
3493 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3494 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3495 | | #define __itt_event_createA ITTNOTIFY_DATA(event_createA) |
3496 | | #define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA) |
3497 | | #define __itt_event_createW ITTNOTIFY_DATA(event_createW) |
3498 | | #define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW) |
3499 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3500 | | #define __itt_event_create ITTNOTIFY_DATA(event_create) |
3501 | | #define __itt_event_create_ptr ITTNOTIFY_NAME(event_create) |
3502 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3503 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3504 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3505 | | #define __itt_event_createA(name, namelen) (__itt_event)0 |
3506 | | #define __itt_event_createA_ptr 0 |
3507 | | #define __itt_event_createW(name, namelen) (__itt_event)0 |
3508 | | #define __itt_event_createW_ptr 0 |
3509 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3510 | | #define __itt_event_create(name, namelen) (__itt_event)0 |
3511 | | #define __itt_event_create_ptr 0 |
3512 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3513 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3514 | | #else /* INTEL_NO_MACRO_BODY */ |
3515 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3516 | | #define __itt_event_createA_ptr 0 |
3517 | | #define __itt_event_createW_ptr 0 |
3518 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3519 | | #define __itt_event_create_ptr 0 |
3520 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3521 | | #endif /* INTEL_NO_MACRO_BODY */ |
3522 | | /** @endcond */ |
3523 | | |
3524 | | /** |
3525 | | * @brief Record an event occurrence. |
3526 | | * @return __itt_err upon failure (invalid event id/user event feature not enabled) |
3527 | | */ |
3528 | | int LIBITTAPI __itt_event_start(__itt_event event); |
3529 | | |
3530 | | /** @cond exclude_from_documentation */ |
3531 | | #ifndef INTEL_NO_MACRO_BODY |
3532 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3533 | | ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event)) |
3534 | | #define __itt_event_start ITTNOTIFY_DATA(event_start) |
3535 | | #define __itt_event_start_ptr ITTNOTIFY_NAME(event_start) |
3536 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3537 | | #define __itt_event_start(event) (int)0 |
3538 | | #define __itt_event_start_ptr 0 |
3539 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3540 | | #else /* INTEL_NO_MACRO_BODY */ |
3541 | | #define __itt_event_start_ptr 0 |
3542 | | #endif /* INTEL_NO_MACRO_BODY */ |
3543 | | /** @endcond */ |
3544 | | |
3545 | | /** |
3546 | | * @brief Record an event end occurrence. |
3547 | | * @note It is optional if events do not have durations. |
3548 | | * @return __itt_err upon failure (invalid event id/user event feature not enabled) |
3549 | | */ |
3550 | | int LIBITTAPI __itt_event_end(__itt_event event); |
3551 | | |
3552 | | /** @cond exclude_from_documentation */ |
3553 | | #ifndef INTEL_NO_MACRO_BODY |
3554 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3555 | | ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event)) |
3556 | | #define __itt_event_end ITTNOTIFY_DATA(event_end) |
3557 | | #define __itt_event_end_ptr ITTNOTIFY_NAME(event_end) |
3558 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3559 | | #define __itt_event_end(event) (int)0 |
3560 | | #define __itt_event_end_ptr 0 |
3561 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3562 | | #else /* INTEL_NO_MACRO_BODY */ |
3563 | | #define __itt_event_end_ptr 0 |
3564 | | #endif /* INTEL_NO_MACRO_BODY */ |
3565 | | /** @endcond */ |
3566 | | /** @} events group */ |
3567 | | |
3568 | | |
3569 | | /** |
3570 | | * @defgroup arrays Arrays Visualizer |
3571 | | * @ingroup public |
3572 | | * Visualize arrays |
3573 | | * @{ |
3574 | | */ |
3575 | | |
3576 | | /** |
3577 | | * @enum __itt_av_data_type |
3578 | | * @brief Defines types of arrays data (for C/C++ intrinsic types) |
3579 | | */ |
3580 | | typedef enum |
3581 | | { |
3582 | | __itt_e_first = 0, |
3583 | | __itt_e_char = 0, /* 1-byte integer */ |
3584 | | __itt_e_uchar, /* 1-byte unsigned integer */ |
3585 | | __itt_e_int16, /* 2-byte integer */ |
3586 | | __itt_e_uint16, /* 2-byte unsigned integer */ |
3587 | | __itt_e_int32, /* 4-byte integer */ |
3588 | | __itt_e_uint32, /* 4-byte unsigned integer */ |
3589 | | __itt_e_int64, /* 8-byte integer */ |
3590 | | __itt_e_uint64, /* 8-byte unsigned integer */ |
3591 | | __itt_e_float, /* 4-byte floating */ |
3592 | | __itt_e_double, /* 8-byte floating */ |
3593 | | __itt_e_last = __itt_e_double |
3594 | | } __itt_av_data_type; |
3595 | | |
3596 | | /** |
3597 | | * @brief Save an array data to a file. |
3598 | | * Output format is defined by the file extension. The csv and bmp formats are supported (bmp - for 2-dimensional array only). |
3599 | | * @param[in] data - pointer to the array data |
3600 | | * @param[in] rank - the rank of the array |
3601 | | * @param[in] dimensions - pointer to an array of integers, which specifies the array dimensions. |
3602 | | * The size of dimensions must be equal to the rank |
3603 | | * @param[in] type - the type of the array, specified as one of the __itt_av_data_type values (for intrinsic types) |
3604 | | * @param[in] filePath - the file path; the output format is defined by the file extension |
3605 | | * @param[in] columnOrder - defines how the array is stored in the linear memory. |
3606 | | * It should be 1 for column-major order (e.g. in FORTRAN) or 0 - for row-major order (e.g. in C). |
3607 | | */ |
3608 | | |
3609 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3610 | | int ITTAPI __itt_av_saveA(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder); |
3611 | | int ITTAPI __itt_av_saveW(void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder); |
3612 | | #if defined(UNICODE) || defined(_UNICODE) |
3613 | | # define __itt_av_save __itt_av_saveW |
3614 | | # define __itt_av_save_ptr __itt_av_saveW_ptr |
3615 | | #else /* UNICODE */ |
3616 | | # define __itt_av_save __itt_av_saveA |
3617 | | # define __itt_av_save_ptr __itt_av_saveA_ptr |
3618 | | #endif /* UNICODE */ |
3619 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3620 | | int ITTAPI __itt_av_save(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder); |
3621 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3622 | | |
3623 | | /** @cond exclude_from_documentation */ |
3624 | | #ifndef INTEL_NO_MACRO_BODY |
3625 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3626 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3627 | | ITT_STUB(ITTAPI, int, av_saveA, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder)) |
3628 | | ITT_STUB(ITTAPI, int, av_saveW, (void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder)) |
3629 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3630 | | ITT_STUB(ITTAPI, int, av_save, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder)) |
3631 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3632 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3633 | | #define __itt_av_saveA ITTNOTIFY_DATA(av_saveA) |
3634 | | #define __itt_av_saveA_ptr ITTNOTIFY_NAME(av_saveA) |
3635 | | #define __itt_av_saveW ITTNOTIFY_DATA(av_saveW) |
3636 | | #define __itt_av_saveW_ptr ITTNOTIFY_NAME(av_saveW) |
3637 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3638 | | #define __itt_av_save ITTNOTIFY_DATA(av_save) |
3639 | | #define __itt_av_save_ptr ITTNOTIFY_NAME(av_save) |
3640 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3641 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3642 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3643 | | #define __itt_av_saveA(name) |
3644 | | #define __itt_av_saveA_ptr 0 |
3645 | | #define __itt_av_saveW(name) |
3646 | | #define __itt_av_saveW_ptr 0 |
3647 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3648 | | #define __itt_av_save(name) |
3649 | | #define __itt_av_save_ptr 0 |
3650 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3651 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3652 | | #else /* INTEL_NO_MACRO_BODY */ |
3653 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3654 | | #define __itt_av_saveA_ptr 0 |
3655 | | #define __itt_av_saveW_ptr 0 |
3656 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3657 | | #define __itt_av_save_ptr 0 |
3658 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3659 | | #endif /* INTEL_NO_MACRO_BODY */ |
3660 | | /** @endcond */ |
3661 | | |
3662 | | void ITTAPI __itt_enable_attach(void); |
3663 | | |
3664 | | /** @cond exclude_from_documentation */ |
3665 | | #ifndef INTEL_NO_MACRO_BODY |
3666 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3667 | | ITT_STUBV(ITTAPI, void, enable_attach, (void)) |
3668 | | #define __itt_enable_attach ITTNOTIFY_VOID(enable_attach) |
3669 | | #define __itt_enable_attach_ptr ITTNOTIFY_NAME(enable_attach) |
3670 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3671 | | #define __itt_enable_attach() |
3672 | | #define __itt_enable_attach_ptr 0 |
3673 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3674 | | #else /* INTEL_NO_MACRO_BODY */ |
3675 | | #define __itt_enable_attach_ptr 0 |
3676 | | #endif /* INTEL_NO_MACRO_BODY */ |
3677 | | /** @endcond */ |
3678 | | |
3679 | | /** @cond exclude_from_gpa_documentation */ |
3680 | | |
3681 | | /** @} arrays group */ |
3682 | | |
3683 | | /** @endcond */ |
3684 | | |
3685 | | /** |
3686 | | * @brief Module load notification |
3687 | | * This API is used to report necessary information in case of bypassing default system loader. |
3688 | | * Notification should be done immidiatelly after this module is loaded to process memory. |
3689 | | * @param[in] start_addr - module start address |
3690 | | * @param[in] end_addr - module end address |
3691 | | * @param[in] path - file system full path to the module |
3692 | | */ |
3693 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3694 | | void ITTAPI __itt_module_loadA(void *start_addr, void *end_addr, const char *path); |
3695 | | void ITTAPI __itt_module_loadW(void *start_addr, void *end_addr, const wchar_t *path); |
3696 | | #if defined(UNICODE) || defined(_UNICODE) |
3697 | | # define __itt_module_load __itt_module_loadW |
3698 | | # define __itt_module_load_ptr __itt_module_loadW_ptr |
3699 | | #else /* UNICODE */ |
3700 | | # define __itt_module_load __itt_module_loadA |
3701 | | # define __itt_module_load_ptr __itt_module_loadA_ptr |
3702 | | #endif /* UNICODE */ |
3703 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3704 | | void ITTAPI __itt_module_load(void *start_addr, void *end_addr, const char *path); |
3705 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3706 | | |
3707 | | /** @cond exclude_from_documentation */ |
3708 | | #ifndef INTEL_NO_MACRO_BODY |
3709 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3710 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3711 | | ITT_STUB(ITTAPI, void, module_loadA, (void *start_addr, void *end_addr, const char *path)) |
3712 | | ITT_STUB(ITTAPI, void, module_loadW, (void *start_addr, void *end_addr, const wchar_t *path)) |
3713 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3714 | | ITT_STUB(ITTAPI, void, module_load, (void *start_addr, void *end_addr, const char *path)) |
3715 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3716 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3717 | | #define __itt_module_loadA ITTNOTIFY_VOID(module_loadA) |
3718 | | #define __itt_module_loadA_ptr ITTNOTIFY_NAME(module_loadA) |
3719 | | #define __itt_module_loadW ITTNOTIFY_VOID(module_loadW) |
3720 | | #define __itt_module_loadW_ptr ITTNOTIFY_NAME(module_loadW) |
3721 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3722 | | #define __itt_module_load ITTNOTIFY_VOID(module_load) |
3723 | | #define __itt_module_load_ptr ITTNOTIFY_NAME(module_load) |
3724 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3725 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3726 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3727 | | #define __itt_module_loadA(start_addr, end_addr, path) |
3728 | | #define __itt_module_loadA_ptr 0 |
3729 | | #define __itt_module_loadW(start_addr, end_addr, path) |
3730 | | #define __itt_module_loadW_ptr 0 |
3731 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3732 | | #define __itt_module_load(start_addr, end_addr, path) |
3733 | | #define __itt_module_load_ptr 0 |
3734 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3735 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3736 | | #else /* INTEL_NO_MACRO_BODY */ |
3737 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3738 | | #define __itt_module_loadA_ptr 0 |
3739 | | #define __itt_module_loadW_ptr 0 |
3740 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3741 | | #define __itt_module_load_ptr 0 |
3742 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3743 | | #endif /* INTEL_NO_MACRO_BODY */ |
3744 | | /** @endcond */ |
3745 | | |
3746 | | /** |
3747 | | * @brief Report module unload |
3748 | | * This API is used to report necessary information in case of bypassing default system loader. |
3749 | | * Notification should be done just before the module is unloaded from process memory. |
3750 | | * @param[in] addr - base address of loaded module |
3751 | | */ |
3752 | | void ITTAPI __itt_module_unload(void *addr); |
3753 | | |
3754 | | /** @cond exclude_from_documentation */ |
3755 | | #ifndef INTEL_NO_MACRO_BODY |
3756 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3757 | | ITT_STUBV(ITTAPI, void, module_unload, (void *addr)) |
3758 | | #define __itt_module_unload ITTNOTIFY_VOID(module_unload) |
3759 | | #define __itt_module_unload_ptr ITTNOTIFY_NAME(module_unload) |
3760 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3761 | | #define __itt_module_unload(addr) |
3762 | | #define __itt_module_unload_ptr 0 |
3763 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3764 | | #else /* INTEL_NO_MACRO_BODY */ |
3765 | | #define __itt_module_unload_ptr 0 |
3766 | | #endif /* INTEL_NO_MACRO_BODY */ |
3767 | | /** @endcond */ |
3768 | | |
3769 | | /** @cond exclude_from_documentation */ |
3770 | | typedef enum |
3771 | | { |
3772 | | __itt_module_type_unknown = 0, |
3773 | | __itt_module_type_elf, |
3774 | | __itt_module_type_coff |
3775 | | } __itt_module_type; |
3776 | | /** @endcond */ |
3777 | | |
3778 | | /** @cond exclude_from_documentation */ |
3779 | | typedef enum |
3780 | | { |
3781 | | itt_section_type_unknown, |
3782 | | itt_section_type_bss, /* notifies that the section contains uninitialized data. These are the relevant section types and the modules that contain them: |
3783 | | * ELF module: SHT_NOBITS section type |
3784 | | * COFF module: IMAGE_SCN_CNT_UNINITIALIZED_DATA section type |
3785 | | */ |
3786 | | itt_section_type_data, /* notifies that section contains initialized data. These are the relevant section types and the modules that contain them: |
3787 | | * ELF module: SHT_PROGBITS section type |
3788 | | * COFF module: IMAGE_SCN_CNT_INITIALIZED_DATA section type |
3789 | | */ |
3790 | | itt_section_type_text /* notifies that the section contains executable code. These are the relevant section types and the modules that contain them: |
3791 | | * ELF module: SHT_PROGBITS section type |
3792 | | * COFF module: IMAGE_SCN_CNT_CODE section type |
3793 | | */ |
3794 | | } __itt_section_type; |
3795 | | /** @endcond */ |
3796 | | |
3797 | | /** |
3798 | | * @hideinitializer |
3799 | | * @brief bit-mask, detects a section attribute that indicates whether a section can be executed as code: |
3800 | | * These are the relevant section attributes and the modules that contain them: |
3801 | | * ELF module: PF_X section attribute |
3802 | | * COFF module: IMAGE_SCN_MEM_EXECUTE attribute |
3803 | | */ |
3804 | | #define __itt_section_exec 0x20000000 |
3805 | | |
3806 | | /** |
3807 | | * @hideinitializer |
3808 | | * @brief bit-mask, detects a section attribute that indicates whether a section can be read. |
3809 | | * These are the relevant section attributes and the modules that contain them: |
3810 | | * ELF module: PF_R attribute |
3811 | | * COFF module: IMAGE_SCN_MEM_READ attribute |
3812 | | */ |
3813 | | #define __itt_section_read 0x40000000 |
3814 | | |
3815 | | /** |
3816 | | * @hideinitializer |
3817 | | * @brief bit-mask, detects a section attribute that indicates whether a section can be written to. |
3818 | | * These are the relevant section attributes and the modules that contain them: |
3819 | | * ELF module: PF_W attribute |
3820 | | * COFF module: IMAGE_SCN_MEM_WRITE attribute |
3821 | | */ |
3822 | | #define __itt_section_write 0x80000000 |
3823 | | |
3824 | | /** @cond exclude_from_documentation */ |
3825 | | #pragma pack(push, 8) |
3826 | | |
3827 | | typedef struct ___itt_section_info |
3828 | | { |
3829 | | const char* name; /*!< Section name in UTF8 */ |
3830 | | __itt_section_type type; /*!< Section content and semantics description */ |
3831 | | size_t flags; /*!< Section bit flags that describe attributes using bit mask |
3832 | | * Zero if disabled, non-zero if enabled |
3833 | | */ |
3834 | | void* start_addr; /*!< Section load(relocated) start address */ |
3835 | | size_t size; /*!< Section file offset */ |
3836 | | size_t file_offset; /*!< Section size */ |
3837 | | } __itt_section_info; |
3838 | | |
3839 | | #pragma pack(pop) |
3840 | | /** @endcond */ |
3841 | | |
3842 | | /** @cond exclude_from_documentation */ |
3843 | | #pragma pack(push, 8) |
3844 | | |
3845 | | typedef struct ___itt_module_object |
3846 | | { |
3847 | | unsigned int version; /*!< API version*/ |
3848 | | __itt_id module_id; /*!< Unique identifier. This is unchanged for sections that belong to the same module */ |
3849 | | __itt_module_type module_type; /*!< Binary module format */ |
3850 | | const char* module_name; /*!< Unique module name or path to module in UTF8 |
3851 | | * Contains module name when module_bufer and module_size exist |
3852 | | * Contains module path when module_bufer and module_size absent |
3853 | | * module_name remains the same for the certain module_id |
3854 | | */ |
3855 | | void* module_buffer; /*!< Module buffer content */ |
3856 | | size_t module_size; /*!< Module buffer size */ |
3857 | | /*!< If module_buffer and module_size exist, the binary module is dumped onto the system. |
3858 | | * If module_buffer and module_size do not exist, |
3859 | | * the binary module exists on the system already. |
3860 | | * The module_name parameter contains the path to the module. |
3861 | | */ |
3862 | | __itt_section_info* section_array; /*!< Reference to section information */ |
3863 | | size_t section_number; |
3864 | | } __itt_module_object; |
3865 | | |
3866 | | #pragma pack(pop) |
3867 | | /** @endcond */ |
3868 | | |
3869 | | /** |
3870 | | * @brief Load module content and its loaded(relocated) sections. |
3871 | | * This API is useful to save a module, or specify its location on the system and report information about loaded sections. |
3872 | | * The target module is saved on the system if module buffer content and size are available. |
3873 | | * If module buffer content and size are unavailable, the module name contains the path to the existing binary module. |
3874 | | * @param[in] module_obj - provides module and section information, along with unique module identifiers (name,module ID) |
3875 | | * which bind the binary module to particular sections. |
3876 | | */ |
3877 | | void ITTAPI __itt_module_load_with_sections(__itt_module_object* module_obj); |
3878 | | |
3879 | | /** @cond exclude_from_documentation */ |
3880 | | #ifndef INTEL_NO_MACRO_BODY |
3881 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3882 | | ITT_STUBV(ITTAPI, void, module_load_with_sections, (__itt_module_object* module_obj)) |
3883 | | #define __itt_module_load_with_sections ITTNOTIFY_VOID(module_load_with_sections) |
3884 | | #define __itt_module_load_with_sections_ptr ITTNOTIFY_NAME(module_load_with_sections) |
3885 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3886 | | #define __itt_module_load_with_sections(module_obj) |
3887 | | #define __itt_module_load_with_sections_ptr 0 |
3888 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3889 | | #else /* INTEL_NO_MACRO_BODY */ |
3890 | | #define __itt_module_load_with_sections_ptr 0 |
3891 | | #endif /* INTEL_NO_MACRO_BODY */ |
3892 | | /** @endcond */ |
3893 | | |
3894 | | /** |
3895 | | * @brief Unload a module and its loaded(relocated) sections. |
3896 | | * This API notifies that the module and its sections were unloaded. |
3897 | | * @param[in] module_obj - provides module and sections information, along with unique module identifiers (name,module ID) |
3898 | | * which bind the binary module to particular sections. |
3899 | | */ |
3900 | | void ITTAPI __itt_module_unload_with_sections(__itt_module_object* module_obj); |
3901 | | |
3902 | | /** @cond exclude_from_documentation */ |
3903 | | #ifndef INTEL_NO_MACRO_BODY |
3904 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3905 | | ITT_STUBV(ITTAPI, void, module_unload_with_sections, (__itt_module_object* module_obj)) |
3906 | | #define __itt_module_unload_with_sections ITTNOTIFY_VOID(module_unload_with_sections) |
3907 | | #define __itt_module_unload_with_sections_ptr ITTNOTIFY_NAME(module_unload_with_sections) |
3908 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3909 | | #define __itt_module_unload_with_sections(module_obj) |
3910 | | #define __itt_module_unload_with_sections_ptr 0 |
3911 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3912 | | #else /* INTEL_NO_MACRO_BODY */ |
3913 | | #define __itt_module_unload_with_sections_ptr 0 |
3914 | | #endif /* INTEL_NO_MACRO_BODY */ |
3915 | | /** @endcond */ |
3916 | | |
3917 | | /** @cond exclude_from_documentation */ |
3918 | | #pragma pack(push, 8) |
3919 | | |
3920 | | typedef struct ___itt_histogram |
3921 | | { |
3922 | | const __itt_domain* domain; /*!< Domain of the histogram*/ |
3923 | | const char* nameA; /*!< Name of the histogram */ |
3924 | | #if defined(UNICODE) || defined(_UNICODE) |
3925 | | const wchar_t* nameW; |
3926 | | #else /* UNICODE || _UNICODE */ |
3927 | | void* nameW; |
3928 | | #endif /* UNICODE || _UNICODE */ |
3929 | | __itt_metadata_type x_type; /*!< Type of the histogram X axis */ |
3930 | | __itt_metadata_type y_type; /*!< Type of the histogram Y axis */ |
3931 | | int extra1; /*!< Reserved to the runtime */ |
3932 | | void* extra2; /*!< Reserved to the runtime */ |
3933 | | struct ___itt_histogram* next; |
3934 | | } __itt_histogram; |
3935 | | |
3936 | | #pragma pack(pop) |
3937 | | /** @endcond */ |
3938 | | |
3939 | | /** |
3940 | | * @brief Create a typed histogram instance with given name/domain. |
3941 | | * @param[in] domain The domain controlling the call. |
3942 | | * @param[in] name The name of the histogram. |
3943 | | * @param[in] x_type The type of the X axis in histogram (may be 0 to calculate batch statistics). |
3944 | | * @param[in] y_type The type of the Y axis in histogram. |
3945 | | */ |
3946 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3947 | | __itt_histogram* ITTAPI __itt_histogram_createA(const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type); |
3948 | | __itt_histogram* ITTAPI __itt_histogram_createW(const __itt_domain* domain, const wchar_t* name, __itt_metadata_type x_type, __itt_metadata_type y_type); |
3949 | | #if defined(UNICODE) || defined(_UNICODE) |
3950 | | # define __itt_histogram_create __itt_histogram_createW |
3951 | | # define __itt_histogram_create_ptr __itt_histogram_createW_ptr |
3952 | | #else /* UNICODE */ |
3953 | | # define __itt_histogram_create __itt_histogram_createA |
3954 | | # define __itt_histogram_create_ptr __itt_histogram_createA_ptr |
3955 | | #endif /* UNICODE */ |
3956 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3957 | | __itt_histogram* ITTAPI __itt_histogram_create(const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type); |
3958 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3959 | | |
3960 | | /** @cond exclude_from_documentation */ |
3961 | | #ifndef INTEL_NO_MACRO_BODY |
3962 | | #ifndef INTEL_NO_ITTNOTIFY_API |
3963 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3964 | | ITT_STUB(ITTAPI, __itt_histogram*, histogram_createA, (const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type)) |
3965 | | ITT_STUB(ITTAPI, __itt_histogram*, histogram_createW, (const __itt_domain* domain, const wchar_t* name, __itt_metadata_type x_type, __itt_metadata_type y_type)) |
3966 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3967 | | ITT_STUB(ITTAPI, __itt_histogram*, histogram_create, (const __itt_domain* domain, const char* name, __itt_metadata_type x_type, __itt_metadata_type y_type)) |
3968 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3969 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3970 | | #define __itt_histogram_createA ITTNOTIFY_DATA(histogram_createA) |
3971 | | #define __itt_histogram_createA_ptr ITTNOTIFY_NAME(histogram_createA) |
3972 | | #define __itt_histogram_createW ITTNOTIFY_DATA(histogram_createW) |
3973 | | #define __itt_histogram_createW_ptr ITTNOTIFY_NAME(histogram_createW) |
3974 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3975 | | #define __itt_histogram_create ITTNOTIFY_DATA(histogram_create) |
3976 | | #define __itt_histogram_create_ptr ITTNOTIFY_NAME(histogram_create) |
3977 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3978 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
3979 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3980 | | #define __itt_histogram_createA(domain, name, x_type, y_type) (__itt_histogram*)0 |
3981 | | #define __itt_histogram_createA_ptr 0 |
3982 | | #define __itt_histogram_createW(domain, name, x_type, y_type) (__itt_histogram*)0 |
3983 | | #define __itt_histogram_createW_ptr 0 |
3984 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3985 | | #define __itt_histogram_create(domain, name, x_type, y_type) (__itt_histogram*)0 |
3986 | | #define __itt_histogram_create_ptr 0 |
3987 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3988 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
3989 | | #else /* INTEL_NO_MACRO_BODY */ |
3990 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
3991 | | #define __itt_histogram_createA_ptr 0 |
3992 | | #define __itt_histogram_createW_ptr 0 |
3993 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3994 | | #define __itt_histogram_create_ptr 0 |
3995 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
3996 | | #endif /* INTEL_NO_MACRO_BODY */ |
3997 | | /** @endcond */ |
3998 | | |
3999 | | /** |
4000 | | * @brief Submit statistics for a histogram instance. |
4001 | | * @param[in] hist Pointer to the histogram instance to which the histogram statistic is to be dumped. |
4002 | | * @param[in] length The number of elements in dumped axis data array. |
4003 | | * @param[in] x_data The X axis dumped data itself (may be NULL to calculate batch statistics). |
4004 | | * @param[in] y_data The Y axis dumped data itself. |
4005 | | */ |
4006 | | void ITTAPI __itt_histogram_submit(__itt_histogram* hist, size_t length, void* x_data, void* y_data); |
4007 | | |
4008 | | /** @cond exclude_from_documentation */ |
4009 | | #ifndef INTEL_NO_MACRO_BODY |
4010 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4011 | | ITT_STUBV(ITTAPI, void, histogram_submit, (__itt_histogram* hist, size_t length, void* x_data, void* y_data)) |
4012 | | #define __itt_histogram_submit ITTNOTIFY_VOID(histogram_submit) |
4013 | | #define __itt_histogram_submit_ptr ITTNOTIFY_NAME(histogram_submit) |
4014 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4015 | | #define __itt_histogram_submit(hist, length, x_data, y_data) |
4016 | | #define __itt_histogram_submit_ptr 0 |
4017 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4018 | | #else /* INTEL_NO_MACRO_BODY */ |
4019 | | #define __itt_histogram_submit_ptr 0 |
4020 | | #endif /* INTEL_NO_MACRO_BODY */ |
4021 | | |
4022 | | /** |
4023 | | * @brief function allows to obtain the current collection state at the moment |
4024 | | * @return collection state as a enum __itt_collection_state |
4025 | | */ |
4026 | | __itt_collection_state __itt_get_collection_state(void); |
4027 | | |
4028 | | /** |
4029 | | * @brief function releases resources allocated by ITT API static part |
4030 | | * this API should be called from the library destructor |
4031 | | * @return void |
4032 | | */ |
4033 | | void __itt_release_resources(void); |
4034 | | /** @endcond */ |
4035 | | |
4036 | | /** |
4037 | | * @brief Create a typed counter with given domain pointer, string name and counter type |
4038 | | */ |
4039 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4040 | | __itt_counter ITTAPI __itt_counter_createA_v3(const __itt_domain* domain, const char* name, __itt_metadata_type type); |
4041 | | __itt_counter ITTAPI __itt_counter_createW_v3(const __itt_domain* domain, const wchar_t* name, __itt_metadata_type type); |
4042 | | #if defined(UNICODE) || defined(_UNICODE) |
4043 | | # define __itt_counter_create_v3 __itt_counter_createW_v3 |
4044 | | # define __itt_counter_create_v3_ptr __itt_counter_createW_v3_ptr |
4045 | | #else /* UNICODE */ |
4046 | | # define __itt_counter_create_v3 __itt_counter_createA_v3 |
4047 | | # define __itt_counter_create_v3_ptr __itt_counter_createA_v3_ptr |
4048 | | #endif /* UNICODE */ |
4049 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4050 | | __itt_counter ITTAPI __itt_counter_create_v3(const __itt_domain* domain, const char* name, __itt_metadata_type type); |
4051 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4052 | | |
4053 | | #ifndef INTEL_NO_MACRO_BODY |
4054 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4055 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4056 | | ITT_STUB(ITTAPI, __itt_counter, counter_createA_v3, (const __itt_domain* domain, const char* name, __itt_metadata_type type)) |
4057 | | ITT_STUB(ITTAPI, __itt_counter, counter_createW_v3, (const __itt_domain* domain, const wchar_t* name, __itt_metadata_type type)) |
4058 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4059 | | ITT_STUB(ITTAPI, __itt_counter, counter_create_v3, (const __itt_domain* domain, const char* name, __itt_metadata_type type)) |
4060 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4061 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4062 | | #define __itt_counter_createA_v3 ITTNOTIFY_DATA(counter_createA_v3) |
4063 | | #define __itt_counter_createA_v3_ptr ITTNOTIFY_NAME(counter_createA_v3) |
4064 | | #define __itt_counter_createW_v3 ITTNOTIFY_DATA(counter_createW_v3) |
4065 | | #define __itt_counter_createW_v3_ptr ITTNOTIFY_NAME(counter_createW_v3) |
4066 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4067 | | #define __itt_counter_create_v3 ITTNOTIFY_DATA(counter_create_v3) |
4068 | | #define __itt_counter_create_v3_ptr ITTNOTIFY_NAME(counter_create_v3) |
4069 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4070 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4071 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4072 | | #define __itt_counter_createA_v3(domain, name, type) (__itt_counter)0 |
4073 | | #define __itt_counter_createA_v3_ptr 0 |
4074 | | #define __itt_counter_createW_v3(domain, name, type) (__itt_counter)0 |
4075 | | #define __itt_counter_create_typedW_ptr 0 |
4076 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4077 | | #define __itt_counter_create_v3(domain, name, type) (__itt_counter)0 |
4078 | | #define __itt_counter_create_v3_ptr 0 |
4079 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4080 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4081 | | #else /* INTEL_NO_MACRO_BODY */ |
4082 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4083 | | #define __itt_counter_createA_v3_ptr 0 |
4084 | | #define __itt_counter_createW_v3_ptr 0 |
4085 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4086 | | #define __itt_counter_create_v3_ptr 0 |
4087 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4088 | | #endif /* INTEL_NO_MACRO_BODY */ |
4089 | | /** @endcond */ |
4090 | | |
4091 | | /** |
4092 | | * @brief Set the counter value api |
4093 | | */ |
4094 | | void ITTAPI __itt_counter_set_value_v3(__itt_counter counter, void *value_ptr); |
4095 | | |
4096 | | #ifndef INTEL_NO_MACRO_BODY |
4097 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4098 | | ITT_STUBV(ITTAPI, void, counter_set_value_v3, (__itt_counter counter, void *value_ptr)) |
4099 | | #define __itt_counter_set_value_v3 ITTNOTIFY_VOID(counter_set_value_v3) |
4100 | | #define __itt_counter_set_value_v3_ptr ITTNOTIFY_NAME(counter_set_value_v3) |
4101 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4102 | | #define __itt_counter_set_value_v3(counter, value_ptr) |
4103 | | #define __itt_counter_set_value_v3_ptr 0 |
4104 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4105 | | #else /* INTEL_NO_MACRO_BODY */ |
4106 | | #define __itt_counter_set_value_v3_ptr 0 |
4107 | | #endif /* INTEL_NO_MACRO_BODY */ |
4108 | | /** @endcond */ |
4109 | | |
4110 | | /** |
4111 | | * @brief describes the type of context metadata |
4112 | | */ |
4113 | | typedef enum { |
4114 | | __itt_context_unknown = 0, /*!< Undefined type */ |
4115 | | __itt_context_nameA, /*!< ASCII string char* type */ |
4116 | | __itt_context_nameW, /*!< Unicode string wchar_t* type */ |
4117 | | __itt_context_deviceA, /*!< ASCII string char* type */ |
4118 | | __itt_context_deviceW, /*!< Unicode string wchar_t* type */ |
4119 | | __itt_context_unitsA, /*!< ASCII string char* type */ |
4120 | | __itt_context_unitsW, /*!< Unicode string wchar_t* type */ |
4121 | | __itt_context_pci_addrA, /*!< ASCII string char* type */ |
4122 | | __itt_context_pci_addrW, /*!< Unicode string wchar_t* type */ |
4123 | | __itt_context_tid, /*!< Unsigned 64-bit integer type */ |
4124 | | __itt_context_max_val, /*!< Unsigned 64-bit integer type */ |
4125 | | __itt_context_bandwidth_flag, /*!< Unsigned 64-bit integer type */ |
4126 | | __itt_context_latency_flag, /*!< Unsigned 64-bit integer type */ |
4127 | | __itt_context_occupancy_flag, /*!< Unsigned 64-bit integer type */ |
4128 | | __itt_context_on_thread_flag, /*!< Unsigned 64-bit integer type */ |
4129 | | __itt_context_is_abs_val_flag, /*!< Unsigned 64-bit integer type */ |
4130 | | __itt_context_cpu_instructions_flag, /*!< Unsigned 64-bit integer type */ |
4131 | | __itt_context_cpu_cycles_flag /*!< Unsigned 64-bit integer type */ |
4132 | | } __itt_context_type; |
4133 | | |
4134 | | #if defined(UNICODE) || defined(_UNICODE) |
4135 | | # define __itt_context_name __itt_context_nameW |
4136 | | # define __itt_context_device __itt_context_deviceW |
4137 | | # define __itt_context_units __itt_context_unitsW |
4138 | | # define __itt_context_pci_addr __itt_context_pci_addrW |
4139 | | #else /* UNICODE || _UNICODE */ |
4140 | | # define __itt_context_name __itt_context_nameA |
4141 | | # define __itt_context_device __itt_context_deviceA |
4142 | | # define __itt_context_units __itt_context_unitsA |
4143 | | # define __itt_context_pci_addr __itt_context_pci_addrA |
4144 | | #endif /* UNICODE || _UNICODE */ |
4145 | | |
4146 | | /** @cond exclude_from_documentation */ |
4147 | | #pragma pack(push, 8) |
4148 | | |
4149 | | typedef struct ___itt_context_metadata |
4150 | | { |
4151 | | __itt_context_type type; /*!< Type of the context metadata value */ |
4152 | | void* value; /*!< Pointer to context metadata value itself */ |
4153 | | } __itt_context_metadata; |
4154 | | |
4155 | | #pragma pack(pop) |
4156 | | /** @endcond */ |
4157 | | |
4158 | | /** @cond exclude_from_documentation */ |
4159 | | #pragma pack(push, 8) |
4160 | | |
4161 | | typedef struct ___itt_counter_metadata |
4162 | | { |
4163 | | __itt_counter counter; /*!< Associated context metadata counter */ |
4164 | | __itt_context_type type; /*!< Type of the context metadata value */ |
4165 | | const char* str_valueA; /*!< String context metadata value */ |
4166 | | #if defined(UNICODE) || defined(_UNICODE) |
4167 | | const wchar_t* str_valueW; |
4168 | | #else /* UNICODE || _UNICODE */ |
4169 | | void* str_valueW; |
4170 | | #endif /* UNICODE || _UNICODE */ |
4171 | | unsigned long long value; /*!< Numeric context metadata value */ |
4172 | | int extra1; /*!< Reserved to the runtime */ |
4173 | | void* extra2; /*!< Reserved to the runtime */ |
4174 | | struct ___itt_counter_metadata* next; |
4175 | | } __itt_counter_metadata; |
4176 | | |
4177 | | #pragma pack(pop) |
4178 | | /** @endcond */ |
4179 | | |
4180 | | /** |
4181 | | * @brief Bind context metadata to counter instance |
4182 | | * @param[in] counter Pointer to the counter instance to which the context metadata is to be associated. |
4183 | | * @param[in] length The number of elements in context metadata array. |
4184 | | * @param[in] metadata The context metadata itself. |
4185 | | */ |
4186 | | void ITTAPI __itt_bind_context_metadata_to_counter(__itt_counter counter, size_t length, __itt_context_metadata* metadata); |
4187 | | |
4188 | | /** @cond exclude_from_documentation */ |
4189 | | #ifndef INTEL_NO_MACRO_BODY |
4190 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4191 | | ITT_STUBV(ITTAPI, void, bind_context_metadata_to_counter, (__itt_counter counter, size_t length, __itt_context_metadata* metadata)) |
4192 | | #define __itt_bind_context_metadata_to_counter ITTNOTIFY_VOID(bind_context_metadata_to_counter) |
4193 | | #define __itt_bind_context_metadata_to_counter_ptr ITTNOTIFY_NAME(bind_context_metadata_to_counter) |
4194 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4195 | | #define __itt_bind_context_metadata_to_counter(counter, length, metadata) |
4196 | | #define __itt_bind_context_metadata_to_counter_ptr 0 |
4197 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4198 | | #else /* INTEL_NO_MACRO_BODY */ |
4199 | | #define __itt_bind_context_metadata_to_counter_ptr 0 |
4200 | | #endif /* INTEL_NO_MACRO_BODY */ |
4201 | | /** @endcond */ |
4202 | | |
4203 | | #ifdef __cplusplus |
4204 | | } |
4205 | | #endif /* __cplusplus */ |
4206 | | |
4207 | | #endif /* _ITTNOTIFY_H_ */ |
4208 | | |
4209 | | #ifdef INTEL_ITTNOTIFY_API_PRIVATE |
4210 | | |
4211 | | #ifndef _ITTNOTIFY_PRIVATE_ |
4212 | | #define _ITTNOTIFY_PRIVATE_ |
4213 | | |
4214 | | #ifdef __cplusplus |
4215 | | extern "C" { |
4216 | | #endif /* __cplusplus */ |
4217 | | |
4218 | | /** |
4219 | | * @ingroup clockdomain |
4220 | | * @brief Begin an overlapped task instance. |
4221 | | * @param[in] domain The domain for this task |
4222 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
4223 | | * @param[in] timestamp The user defined timestamp. |
4224 | | * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. |
4225 | | * @param[in] parentid The parent of this task, or __itt_null. |
4226 | | * @param[in] name The name of this task. |
4227 | | */ |
4228 | | void ITTAPI __itt_task_begin_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); |
4229 | | |
4230 | | /** |
4231 | | * @ingroup clockdomain |
4232 | | * @brief End an overlapped task instance. |
4233 | | * @param[in] domain The domain for this task |
4234 | | * @param[in] clock_domain The clock domain controlling the execution of this call. |
4235 | | * @param[in] timestamp The user defined timestamp. |
4236 | | * @param[in] taskid Explicit ID of finished task |
4237 | | */ |
4238 | | void ITTAPI __itt_task_end_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid); |
4239 | | |
4240 | | /** @cond exclude_from_documentation */ |
4241 | | #ifndef INTEL_NO_MACRO_BODY |
4242 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4243 | | ITT_STUBV(ITTAPI, void, task_begin_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name)) |
4244 | | ITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid)) |
4245 | | #define __itt_task_begin_overlapped_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_overlapped_ex,d,x,y,z,a,b) |
4246 | | #define __itt_task_begin_overlapped_ex_ptr ITTNOTIFY_NAME(task_begin_overlapped_ex) |
4247 | | #define __itt_task_end_overlapped_ex(d,x,y,z) ITTNOTIFY_VOID_D3(task_end_overlapped_ex,d,x,y,z) |
4248 | | #define __itt_task_end_overlapped_ex_ptr ITTNOTIFY_NAME(task_end_overlapped_ex) |
4249 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4250 | | #define __itt_task_begin_overlapped_ex(domain,clock_domain,timestamp,taskid,parentid,name) |
4251 | | #define __itt_task_begin_overlapped_ex_ptr 0 |
4252 | | #define __itt_task_end_overlapped_ex(domain,clock_domain,timestamp,taskid) |
4253 | | #define __itt_task_end_overlapped_ex_ptr 0 |
4254 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4255 | | #else /* INTEL_NO_MACRO_BODY */ |
4256 | | #define __itt_task_begin_overlapped_ex_ptr 0 |
4257 | | #define __itt_task_end_overlapped_ptr 0 |
4258 | | #define __itt_task_end_overlapped_ex_ptr 0 |
4259 | | #endif /* INTEL_NO_MACRO_BODY */ |
4260 | | /** @endcond */ |
4261 | | |
4262 | | /** |
4263 | | * @defgroup makrs_internal Marks |
4264 | | * @ingroup internal |
4265 | | * Marks group |
4266 | | * @warning Internal API: |
4267 | | * - It is not shipped to outside of Intel |
4268 | | * - It is delivered to internal Intel teams using e-mail or SVN access only |
4269 | | * @{ |
4270 | | */ |
4271 | | /** @brief user mark type */ |
4272 | | typedef int __itt_mark_type; |
4273 | | |
4274 | | /** |
4275 | | * @brief Creates a user mark type with the specified name using char or Unicode string. |
4276 | | * @param[in] name - name of mark to create |
4277 | | * @return Returns a handle to the mark type |
4278 | | */ |
4279 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4280 | | __itt_mark_type ITTAPI __itt_mark_createA(const char *name); |
4281 | | __itt_mark_type ITTAPI __itt_mark_createW(const wchar_t *name); |
4282 | | #if defined(UNICODE) || defined(_UNICODE) |
4283 | | # define __itt_mark_create __itt_mark_createW |
4284 | | # define __itt_mark_create_ptr __itt_mark_createW_ptr |
4285 | | #else /* UNICODE */ |
4286 | | # define __itt_mark_create __itt_mark_createA |
4287 | | # define __itt_mark_create_ptr __itt_mark_createA_ptr |
4288 | | #endif /* UNICODE */ |
4289 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4290 | | __itt_mark_type ITTAPI __itt_mark_create(const char *name); |
4291 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4292 | | |
4293 | | /** @cond exclude_from_documentation */ |
4294 | | #ifndef INTEL_NO_MACRO_BODY |
4295 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4296 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4297 | | ITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char *name)) |
4298 | | ITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name)) |
4299 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4300 | | ITT_STUB(ITTAPI, __itt_mark_type, mark_create, (const char *name)) |
4301 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4302 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4303 | | #define __itt_mark_createA ITTNOTIFY_DATA(mark_createA) |
4304 | | #define __itt_mark_createA_ptr ITTNOTIFY_NAME(mark_createA) |
4305 | | #define __itt_mark_createW ITTNOTIFY_DATA(mark_createW) |
4306 | | #define __itt_mark_createW_ptr ITTNOTIFY_NAME(mark_createW) |
4307 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4308 | | #define __itt_mark_create ITTNOTIFY_DATA(mark_create) |
4309 | | #define __itt_mark_create_ptr ITTNOTIFY_NAME(mark_create) |
4310 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4311 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4312 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4313 | | #define __itt_mark_createA(name) (__itt_mark_type)0 |
4314 | | #define __itt_mark_createA_ptr 0 |
4315 | | #define __itt_mark_createW(name) (__itt_mark_type)0 |
4316 | | #define __itt_mark_createW_ptr 0 |
4317 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4318 | | #define __itt_mark_create(name) (__itt_mark_type)0 |
4319 | | #define __itt_mark_create_ptr 0 |
4320 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4321 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4322 | | #else /* INTEL_NO_MACRO_BODY */ |
4323 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4324 | | #define __itt_mark_createA_ptr 0 |
4325 | | #define __itt_mark_createW_ptr 0 |
4326 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4327 | | #define __itt_mark_create_ptr 0 |
4328 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4329 | | #endif /* INTEL_NO_MACRO_BODY */ |
4330 | | /** @endcond */ |
4331 | | |
4332 | | /** |
4333 | | * @brief Creates a "discrete" user mark type of the specified type and an optional parameter using char or Unicode string. |
4334 | | * |
4335 | | * - The mark of "discrete" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign. |
4336 | | * - The call is "synchronous" - function returns after mark is actually added to results. |
4337 | | * - This function is useful, for example, to mark different phases of application |
4338 | | * (beginning of the next mark automatically meand end of current region). |
4339 | | * - Can be used together with "continuous" marks (see below) at the same collection session |
4340 | | * @param[in] mt - mark, created by __itt_mark_create(const char* name) function |
4341 | | * @param[in] parameter - string parameter of mark |
4342 | | * @return Returns zero value in case of success, non-zero value otherwise. |
4343 | | */ |
4344 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4345 | | int ITTAPI __itt_markA(__itt_mark_type mt, const char *parameter); |
4346 | | int ITTAPI __itt_markW(__itt_mark_type mt, const wchar_t *parameter); |
4347 | | #if defined(UNICODE) || defined(_UNICODE) |
4348 | | # define __itt_mark __itt_markW |
4349 | | # define __itt_mark_ptr __itt_markW_ptr |
4350 | | #else /* UNICODE */ |
4351 | | # define __itt_mark __itt_markA |
4352 | | # define __itt_mark_ptr __itt_markA_ptr |
4353 | | #endif /* UNICODE */ |
4354 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4355 | | int ITTAPI __itt_mark(__itt_mark_type mt, const char *parameter); |
4356 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4357 | | |
4358 | | /** @cond exclude_from_documentation */ |
4359 | | #ifndef INTEL_NO_MACRO_BODY |
4360 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4361 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4362 | | ITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char *parameter)) |
4363 | | ITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter)) |
4364 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4365 | | ITT_STUB(ITTAPI, int, mark, (__itt_mark_type mt, const char *parameter)) |
4366 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4367 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4368 | | #define __itt_markA ITTNOTIFY_DATA(markA) |
4369 | | #define __itt_markA_ptr ITTNOTIFY_NAME(markA) |
4370 | | #define __itt_markW ITTNOTIFY_DATA(markW) |
4371 | | #define __itt_markW_ptr ITTNOTIFY_NAME(markW) |
4372 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4373 | | #define __itt_mark ITTNOTIFY_DATA(mark) |
4374 | | #define __itt_mark_ptr ITTNOTIFY_NAME(mark) |
4375 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4376 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4377 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4378 | | #define __itt_markA(mt, parameter) (int)0 |
4379 | | #define __itt_markA_ptr 0 |
4380 | | #define __itt_markW(mt, parameter) (int)0 |
4381 | | #define __itt_markW_ptr 0 |
4382 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4383 | | #define __itt_mark(mt, parameter) (int)0 |
4384 | | #define __itt_mark_ptr 0 |
4385 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4386 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4387 | | #else /* INTEL_NO_MACRO_BODY */ |
4388 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4389 | | #define __itt_markA_ptr 0 |
4390 | | #define __itt_markW_ptr 0 |
4391 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4392 | | #define __itt_mark_ptr 0 |
4393 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4394 | | #endif /* INTEL_NO_MACRO_BODY */ |
4395 | | /** @endcond */ |
4396 | | |
4397 | | /** |
4398 | | * @brief Use this if necessary to create a "discrete" user event type (mark) for process |
4399 | | * rather then for one thread |
4400 | | * @see int __itt_mark(__itt_mark_type mt, const char* parameter); |
4401 | | */ |
4402 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4403 | | int ITTAPI __itt_mark_globalA(__itt_mark_type mt, const char *parameter); |
4404 | | int ITTAPI __itt_mark_globalW(__itt_mark_type mt, const wchar_t *parameter); |
4405 | | #if defined(UNICODE) || defined(_UNICODE) |
4406 | | # define __itt_mark_global __itt_mark_globalW |
4407 | | # define __itt_mark_global_ptr __itt_mark_globalW_ptr |
4408 | | #else /* UNICODE */ |
4409 | | # define __itt_mark_global __itt_mark_globalA |
4410 | | # define __itt_mark_global_ptr __itt_mark_globalA_ptr |
4411 | | #endif /* UNICODE */ |
4412 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4413 | | int ITTAPI __itt_mark_global(__itt_mark_type mt, const char *parameter); |
4414 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4415 | | |
4416 | | /** @cond exclude_from_documentation */ |
4417 | | #ifndef INTEL_NO_MACRO_BODY |
4418 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4419 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4420 | | ITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char *parameter)) |
4421 | | ITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter)) |
4422 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4423 | | ITT_STUB(ITTAPI, int, mark_global, (__itt_mark_type mt, const char *parameter)) |
4424 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4425 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4426 | | #define __itt_mark_globalA ITTNOTIFY_DATA(mark_globalA) |
4427 | | #define __itt_mark_globalA_ptr ITTNOTIFY_NAME(mark_globalA) |
4428 | | #define __itt_mark_globalW ITTNOTIFY_DATA(mark_globalW) |
4429 | | #define __itt_mark_globalW_ptr ITTNOTIFY_NAME(mark_globalW) |
4430 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4431 | | #define __itt_mark_global ITTNOTIFY_DATA(mark_global) |
4432 | | #define __itt_mark_global_ptr ITTNOTIFY_NAME(mark_global) |
4433 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4434 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4435 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4436 | | #define __itt_mark_globalA(mt, parameter) (int)0 |
4437 | | #define __itt_mark_globalA_ptr 0 |
4438 | | #define __itt_mark_globalW(mt, parameter) (int)0 |
4439 | | #define __itt_mark_globalW_ptr 0 |
4440 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4441 | | #define __itt_mark_global(mt, parameter) (int)0 |
4442 | | #define __itt_mark_global_ptr 0 |
4443 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4444 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4445 | | #else /* INTEL_NO_MACRO_BODY */ |
4446 | | #if ITT_PLATFORM==ITT_PLATFORM_WIN |
4447 | | #define __itt_mark_globalA_ptr 0 |
4448 | | #define __itt_mark_globalW_ptr 0 |
4449 | | #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4450 | | #define __itt_mark_global_ptr 0 |
4451 | | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
4452 | | #endif /* INTEL_NO_MACRO_BODY */ |
4453 | | /** @endcond */ |
4454 | | |
4455 | | /** |
4456 | | * @brief Creates an "end" point for "continuous" mark with specified name. |
4457 | | * |
4458 | | * - Returns zero value in case of success, non-zero value otherwise. |
4459 | | * Also returns non-zero value when preceding "begin" point for the |
4460 | | * mark with the same name failed to be created or not created. |
4461 | | * - The mark of "continuous" type is placed to collection results in |
4462 | | * case of success. It appears in overtime view(s) as a special tick |
4463 | | * sign (different from "discrete" mark) together with line from |
4464 | | * corresponding "begin" mark to "end" mark. |
4465 | | * @note Continuous marks can overlap and be nested inside each other. |
4466 | | * Discrete mark can be nested inside marked region |
4467 | | * @param[in] mt - mark, created by __itt_mark_create(const char* name) function |
4468 | | * @return Returns zero value in case of success, non-zero value otherwise. |
4469 | | */ |
4470 | | int ITTAPI __itt_mark_off(__itt_mark_type mt); |
4471 | | |
4472 | | /** @cond exclude_from_documentation */ |
4473 | | #ifndef INTEL_NO_MACRO_BODY |
4474 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4475 | | ITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt)) |
4476 | | #define __itt_mark_off ITTNOTIFY_DATA(mark_off) |
4477 | | #define __itt_mark_off_ptr ITTNOTIFY_NAME(mark_off) |
4478 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4479 | | #define __itt_mark_off(mt) (int)0 |
4480 | | #define __itt_mark_off_ptr 0 |
4481 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4482 | | #else /* INTEL_NO_MACRO_BODY */ |
4483 | | #define __itt_mark_off_ptr 0 |
4484 | | #endif /* INTEL_NO_MACRO_BODY */ |
4485 | | /** @endcond */ |
4486 | | |
4487 | | /** |
4488 | | * @brief Use this if necessary to create an "end" point for mark of process |
4489 | | * @see int __itt_mark_off(__itt_mark_type mt); |
4490 | | */ |
4491 | | int ITTAPI __itt_mark_global_off(__itt_mark_type mt); |
4492 | | |
4493 | | /** @cond exclude_from_documentation */ |
4494 | | #ifndef INTEL_NO_MACRO_BODY |
4495 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4496 | | ITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt)) |
4497 | | #define __itt_mark_global_off ITTNOTIFY_DATA(mark_global_off) |
4498 | | #define __itt_mark_global_off_ptr ITTNOTIFY_NAME(mark_global_off) |
4499 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4500 | | #define __itt_mark_global_off(mt) (int)0 |
4501 | | #define __itt_mark_global_off_ptr 0 |
4502 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4503 | | #else /* INTEL_NO_MACRO_BODY */ |
4504 | | #define __itt_mark_global_off_ptr 0 |
4505 | | #endif /* INTEL_NO_MACRO_BODY */ |
4506 | | /** @endcond */ |
4507 | | /** @} marks group */ |
4508 | | |
4509 | | /** |
4510 | | * @defgroup counters_internal Counters |
4511 | | * @ingroup internal |
4512 | | * Counters group |
4513 | | * @{ |
4514 | | */ |
4515 | | |
4516 | | |
4517 | | /** |
4518 | | * @defgroup stitch Stack Stitching |
4519 | | * @ingroup internal |
4520 | | * Stack Stitching group |
4521 | | * @{ |
4522 | | */ |
4523 | | /** |
4524 | | * @brief opaque structure for counter identification |
4525 | | */ |
4526 | | typedef struct ___itt_caller *__itt_caller; |
4527 | | |
4528 | | /** |
4529 | | * @brief Create the stitch point e.g. a point in call stack where other stacks should be stitched to. |
4530 | | * The function returns a unique identifier which is used to match the cut points with corresponding stitch points. |
4531 | | */ |
4532 | | __itt_caller ITTAPI __itt_stack_caller_create(void); |
4533 | | |
4534 | | /** @cond exclude_from_documentation */ |
4535 | | #ifndef INTEL_NO_MACRO_BODY |
4536 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4537 | | ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void)) |
4538 | | #define __itt_stack_caller_create ITTNOTIFY_DATA(stack_caller_create) |
4539 | | #define __itt_stack_caller_create_ptr ITTNOTIFY_NAME(stack_caller_create) |
4540 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4541 | | #define __itt_stack_caller_create() (__itt_caller)0 |
4542 | | #define __itt_stack_caller_create_ptr 0 |
4543 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4544 | | #else /* INTEL_NO_MACRO_BODY */ |
4545 | | #define __itt_stack_caller_create_ptr 0 |
4546 | | #endif /* INTEL_NO_MACRO_BODY */ |
4547 | | /** @endcond */ |
4548 | | |
4549 | | /** |
4550 | | * @brief Destroy the information about stitch point identified by the pointer previously returned by __itt_stack_caller_create() |
4551 | | */ |
4552 | | void ITTAPI __itt_stack_caller_destroy(__itt_caller id); |
4553 | | |
4554 | | /** @cond exclude_from_documentation */ |
4555 | | #ifndef INTEL_NO_MACRO_BODY |
4556 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4557 | | ITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id)) |
4558 | | #define __itt_stack_caller_destroy ITTNOTIFY_VOID(stack_caller_destroy) |
4559 | | #define __itt_stack_caller_destroy_ptr ITTNOTIFY_NAME(stack_caller_destroy) |
4560 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4561 | | #define __itt_stack_caller_destroy(id) |
4562 | | #define __itt_stack_caller_destroy_ptr 0 |
4563 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4564 | | #else /* INTEL_NO_MACRO_BODY */ |
4565 | | #define __itt_stack_caller_destroy_ptr 0 |
4566 | | #endif /* INTEL_NO_MACRO_BODY */ |
4567 | | /** @endcond */ |
4568 | | |
4569 | | /** |
4570 | | * @brief Sets the cut point. Stack from each event which occurs after this call will be cut |
4571 | | * at the same stack level the function was called and stitched to the corresponding stitch point. |
4572 | | */ |
4573 | | void ITTAPI __itt_stack_callee_enter(__itt_caller id); |
4574 | | |
4575 | | /** @cond exclude_from_documentation */ |
4576 | | #ifndef INTEL_NO_MACRO_BODY |
4577 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4578 | | ITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id)) |
4579 | | #define __itt_stack_callee_enter ITTNOTIFY_VOID(stack_callee_enter) |
4580 | | #define __itt_stack_callee_enter_ptr ITTNOTIFY_NAME(stack_callee_enter) |
4581 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4582 | | #define __itt_stack_callee_enter(id) |
4583 | | #define __itt_stack_callee_enter_ptr 0 |
4584 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4585 | | #else /* INTEL_NO_MACRO_BODY */ |
4586 | | #define __itt_stack_callee_enter_ptr 0 |
4587 | | #endif /* INTEL_NO_MACRO_BODY */ |
4588 | | /** @endcond */ |
4589 | | |
4590 | | /** |
4591 | | * @brief This function eliminates the cut point which was set by latest __itt_stack_callee_enter(). |
4592 | | */ |
4593 | | void ITTAPI __itt_stack_callee_leave(__itt_caller id); |
4594 | | |
4595 | | /** @cond exclude_from_documentation */ |
4596 | | #ifndef INTEL_NO_MACRO_BODY |
4597 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4598 | | ITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id)) |
4599 | | #define __itt_stack_callee_leave ITTNOTIFY_VOID(stack_callee_leave) |
4600 | | #define __itt_stack_callee_leave_ptr ITTNOTIFY_NAME(stack_callee_leave) |
4601 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4602 | | #define __itt_stack_callee_leave(id) |
4603 | | #define __itt_stack_callee_leave_ptr 0 |
4604 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4605 | | #else /* INTEL_NO_MACRO_BODY */ |
4606 | | #define __itt_stack_callee_leave_ptr 0 |
4607 | | #endif /* INTEL_NO_MACRO_BODY */ |
4608 | | /** @endcond */ |
4609 | | |
4610 | | /** @} stitch group */ |
4611 | | |
4612 | | /* ***************************************************************************************************************************** */ |
4613 | | |
4614 | | #include <stdarg.h> |
4615 | | |
4616 | | /** @cond exclude_from_documentation */ |
4617 | | typedef enum __itt_error_code |
4618 | | { |
4619 | | __itt_error_success = 0, /*!< no error */ |
4620 | | __itt_error_no_module = 1, /*!< module can't be loaded */ |
4621 | | /* %1$s -- library name; win: %2$d -- system error code; unx: %2$s -- system error message. */ |
4622 | | __itt_error_no_symbol = 2, /*!< symbol not found */ |
4623 | | /* %1$s -- library name, %2$s -- symbol name. */ |
4624 | | __itt_error_unknown_group = 3, /*!< unknown group specified */ |
4625 | | /* %1$s -- env var name, %2$s -- group name. */ |
4626 | | __itt_error_cant_read_env = 4, /*!< GetEnvironmentVariable() failed */ |
4627 | | /* %1$s -- env var name, %2$d -- system error. */ |
4628 | | __itt_error_env_too_long = 5, /*!< variable value too long */ |
4629 | | /* %1$s -- env var name, %2$d -- actual length of the var, %3$d -- max allowed length. */ |
4630 | | __itt_error_system = 6 /*!< pthread_mutexattr_init or pthread_mutex_init failed */ |
4631 | | /* %1$s -- function name, %2$d -- errno. */ |
4632 | | } __itt_error_code; |
4633 | | |
4634 | | typedef void (__itt_error_handler_t)(__itt_error_code code, va_list); |
4635 | | __itt_error_handler_t* __itt_set_error_handler(__itt_error_handler_t*); |
4636 | | |
4637 | | const char* ITTAPI __itt_api_version(void); |
4638 | | /** @endcond */ |
4639 | | |
4640 | | /** @cond exclude_from_documentation */ |
4641 | | #ifndef INTEL_NO_MACRO_BODY |
4642 | | #ifndef INTEL_NO_ITTNOTIFY_API |
4643 | | #define __itt_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler) |
4644 | | void __itt_error_handler(__itt_error_code code, va_list args); |
4645 | | extern const int ITTNOTIFY_NAME(err); |
4646 | | #define __itt_err ITTNOTIFY_NAME(err) |
4647 | | ITT_STUB(ITTAPI, const char*, api_version, (void)) |
4648 | 2 | #define __itt_api_version ITTNOTIFY_DATA(api_version) |
4649 | | #define __itt_api_version_ptr ITTNOTIFY_NAME(api_version) |
4650 | | #else /* INTEL_NO_ITTNOTIFY_API */ |
4651 | | #define __itt_api_version() (const char*)0 |
4652 | | #define __itt_api_version_ptr 0 |
4653 | | #endif /* INTEL_NO_ITTNOTIFY_API */ |
4654 | | #else /* INTEL_NO_MACRO_BODY */ |
4655 | | #define __itt_api_version_ptr 0 |
4656 | | #endif /* INTEL_NO_MACRO_BODY */ |
4657 | | /** @endcond */ |
4658 | | |
4659 | | #ifdef __cplusplus |
4660 | | } |
4661 | | #endif /* __cplusplus */ |
4662 | | |
4663 | | #endif /* _ITTNOTIFY_PRIVATE_ */ |
4664 | | |
4665 | | #endif /* INTEL_ITTNOTIFY_API_PRIVATE */ |