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