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