2 //===----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef _LEGACY_ITTNOTIFY_H_
11 #define _LEGACY_ITTNOTIFY_H_
15 * @brief Legacy User API functions and types
18 /** @cond exclude_from_documentation */
21 #endif /* ITT_OS_WIN */
24 #define ITT_OS_LINUX 2
25 #endif /* ITT_OS_LINUX */
29 #endif /* ITT_OS_MAC */
31 #ifndef ITT_OS_FREEBSD
32 #define ITT_OS_FREEBSD 4
33 #endif /* ITT_OS_FREEBSD */
36 #if defined WIN32 || defined _WIN32
37 #define ITT_OS ITT_OS_WIN
38 #elif defined(__APPLE__) && defined(__MACH__)
39 #define ITT_OS ITT_OS_MAC
40 #elif defined(__FreeBSD__)
41 #define ITT_OS ITT_OS_FREEBSD
43 #define ITT_OS ITT_OS_LINUX
47 #ifndef ITT_PLATFORM_WIN
48 #define ITT_PLATFORM_WIN 1
49 #endif /* ITT_PLATFORM_WIN */
51 #ifndef ITT_PLATFORM_POSIX
52 #define ITT_PLATFORM_POSIX 2
53 #endif /* ITT_PLATFORM_POSIX */
55 #ifndef ITT_PLATFORM_MAC
56 #define ITT_PLATFORM_MAC 3
57 #endif /* ITT_PLATFORM_MAC */
59 #ifndef ITT_PLATFORM_FREEBSD
60 #define ITT_PLATFORM_FREEBSD 4
61 #endif /* ITT_PLATFORM_FREEBSD */
64 #if ITT_OS == ITT_OS_WIN
65 #define ITT_PLATFORM ITT_PLATFORM_WIN
66 #elif ITT_OS == ITT_OS_MAC
67 #define ITT_PLATFORM ITT_PLATFORM_MAC
68 #elif ITT_OS == ITT_OS_FREEBSD
69 #define ITT_PLATFORM ITT_PLATFORM_FREEBSD
71 #define ITT_PLATFORM ITT_PLATFORM_POSIX
73 #endif /* ITT_PLATFORM */
75 #if defined(_UNICODE) && !defined(UNICODE)
80 #if ITT_PLATFORM == ITT_PLATFORM_WIN
82 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
84 #if defined(UNICODE) || defined(_UNICODE)
86 #endif /* UNICODE || _UNICODE */
87 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
90 #if ITT_PLATFORM == ITT_PLATFORM_WIN
91 #define ITTAPI_CDECL __cdecl
92 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
93 #if defined _M_IX86 || defined __i386__
94 #define ITTAPI_CDECL __attribute__((cdecl))
95 #else /* _M_IX86 || __i386__ */
96 #define ITTAPI_CDECL /* actual only on x86 platform */
97 #endif /* _M_IX86 || __i386__ */
98 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
99 #endif /* ITTAPI_CDECL */
102 #if ITT_PLATFORM == ITT_PLATFORM_WIN
103 #define STDCALL __stdcall
104 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
105 #if defined _M_IX86 || defined __i386__
106 #define STDCALL __attribute__((stdcall))
107 #else /* _M_IX86 || __i386__ */
108 #define STDCALL /* supported only on x86 platform */
109 #endif /* _M_IX86 || __i386__ */
110 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
113 #define ITTAPI ITTAPI_CDECL
114 #define LIBITTAPI ITTAPI_CDECL
116 /* TODO: Temporary for compatibility! */
117 #define ITTAPI_CALL ITTAPI_CDECL
118 #define LIBITTAPI_CALL ITTAPI_CDECL
120 #if ITT_PLATFORM == ITT_PLATFORM_WIN
121 /* use __forceinline (VC++ specific) */
122 #if defined(__MINGW32__) && !defined(__cplusplus)
124 static __inline__ __attribute__((__always_inline__, __gnu_inline__))
126 #define ITT_INLINE static __forceinline
127 #endif /* __MINGW32__ */
129 #define ITT_INLINE_ATTRIBUTE /* nothing */
130 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
132 * Generally, functions are not inlined unless optimization is specified.
133 * For functions declared inline, this attribute inlines the function even
134 * if no optimization level was specified.
136 #ifdef __STRICT_ANSI__
137 #define ITT_INLINE static
138 #define ITT_INLINE_ATTRIBUTE __attribute__((unused))
139 #else /* __STRICT_ANSI__ */
140 #define ITT_INLINE static inline
141 #define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))
142 #endif /* __STRICT_ANSI__ */
143 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
146 /** @cond exclude_from_documentation */
147 /* Helper macro for joining tokens */
148 #define ITT_JOIN_AUX(p, n) p##n
149 #define ITT_JOIN(p, n) ITT_JOIN_AUX(p, n)
160 /* Standard versioning of a token with major and minor version numbers */
161 #define ITT_VERSIONIZE(x) \
162 ITT_JOIN(x, ITT_JOIN(_, ITT_JOIN(ITT_MAJOR, ITT_JOIN(_, ITT_MINOR))))
164 #ifndef INTEL_ITTNOTIFY_PREFIX
165 #define INTEL_ITTNOTIFY_PREFIX __itt_
166 #endif /* INTEL_ITTNOTIFY_PREFIX */
167 #ifndef INTEL_ITTNOTIFY_POSTFIX
168 #define INTEL_ITTNOTIFY_POSTFIX _ptr_
169 #endif /* INTEL_ITTNOTIFY_POSTFIX */
171 #define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, n)
172 #define ITTNOTIFY_NAME(n) \
173 ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n, INTEL_ITTNOTIFY_POSTFIX)))
175 #define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)
176 #define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)
178 #define ITTNOTIFY_VOID_D0(n, d) \
179 (!(d)->flags) ? (void)0 \
180 : (!ITTNOTIFY_NAME(n)) ? (void)0 \
181 : ITTNOTIFY_NAME(n)(d)
182 #define ITTNOTIFY_VOID_D1(n, d, x) \
183 (!(d)->flags) ? (void)0 \
184 : (!ITTNOTIFY_NAME(n)) ? (void)0 \
185 : ITTNOTIFY_NAME(n)(d, x)
186 #define ITTNOTIFY_VOID_D2(n, d, x, y) \
187 (!(d)->flags) ? (void)0 \
188 : (!ITTNOTIFY_NAME(n)) ? (void)0 \
189 : ITTNOTIFY_NAME(n)(d, x, y)
190 #define ITTNOTIFY_VOID_D3(n, d, x, y, z) \
191 (!(d)->flags) ? (void)0 \
192 : (!ITTNOTIFY_NAME(n)) ? (void)0 \
193 : ITTNOTIFY_NAME(n)(d, x, y, z)
194 #define ITTNOTIFY_VOID_D4(n, d, x, y, z, a) \
195 (!(d)->flags) ? (void)0 \
196 : (!ITTNOTIFY_NAME(n)) ? (void)0 \
197 : ITTNOTIFY_NAME(n)(d, x, y, z, a)
198 #define ITTNOTIFY_VOID_D5(n, d, x, y, z, a, b) \
199 (!(d)->flags) ? (void)0 \
200 : (!ITTNOTIFY_NAME(n)) ? (void)0 \
201 : ITTNOTIFY_NAME(n)(d, x, y, z, a, b)
202 #define ITTNOTIFY_VOID_D6(n, d, x, y, z, a, b, c) \
203 (!(d)->flags) ? (void)0 \
204 : (!ITTNOTIFY_NAME(n)) ? (void)0 \
205 : ITTNOTIFY_NAME(n)(d, x, y, z, a, b, c)
206 #define ITTNOTIFY_DATA_D0(n, d) \
207 (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d)
208 #define ITTNOTIFY_DATA_D1(n, d, x) \
209 (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d, x)
210 #define ITTNOTIFY_DATA_D2(n, d, x, y) \
211 (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d, x, y)
212 #define ITTNOTIFY_DATA_D3(n, d, x, y, z) \
213 (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d, x, y, z)
214 #define ITTNOTIFY_DATA_D4(n, d, x, y, z, a) \
216 : (!ITTNOTIFY_NAME(n)) ? 0 \
217 : ITTNOTIFY_NAME(n)(d, x, y, z, a)
218 #define ITTNOTIFY_DATA_D5(n, d, x, y, z, a, b) \
220 : (!ITTNOTIFY_NAME(n)) ? 0 \
221 : ITTNOTIFY_NAME(n)(d, x, y, z, a, b)
222 #define ITTNOTIFY_DATA_D6(n, d, x, y, z, a, b, c) \
224 : (!ITTNOTIFY_NAME(n)) ? 0 \
225 : ITTNOTIFY_NAME(n)(d, x, y, z, a, b, c)
233 #define ITT_STUBV(api, type, name, args) \
234 typedef type(api *ITT_JOIN(ITTNOTIFY_NAME(name), _t)) args; \
235 extern ITT_JOIN(ITTNOTIFY_NAME(name), _t) ITTNOTIFY_NAME(name);
236 #define ITT_STUB ITT_STUBV
241 #endif /* __cplusplus */
244 * @defgroup legacy Legacy API
250 * @defgroup legacy_control Collection Control
252 * General behavior: application continues to run, but no profiling information
255 * Pausing occurs not only for the current thread but for all process as well as
257 * - Intel(R) Parallel Inspector and Intel(R) Inspector XE:
258 * - Does not analyze or report errors that involve memory access.
259 * - Other errors are reported as usual. Pausing data collection in
260 * Intel(R) Parallel Inspector and Intel(R) Inspector XE
261 * only pauses tracing and analyzing memory access.
262 * It does not pause tracing or analyzing threading APIs.
264 * - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE:
265 * - Does continue to record when new threads are started.
268 * - Possible reduction of runtime overhead.
272 #ifndef _ITTNOTIFY_H_
273 /** @brief Pause collection */
274 void ITTAPI
__itt_pause(void);
275 /** @brief Resume collection */
276 void ITTAPI
__itt_resume(void);
277 /** @brief Detach collection */
278 void ITTAPI
__itt_detach(void);
280 /** @cond exclude_from_documentation */
281 #ifndef INTEL_NO_MACRO_BODY
282 #ifndef INTEL_NO_ITTNOTIFY_API
283 ITT_STUBV(ITTAPI
, void, pause
, (void))
284 ITT_STUBV(ITTAPI
, void, resume
, (void))
285 ITT_STUBV(ITTAPI
, void, detach
, (void))
286 #define __itt_pause ITTNOTIFY_VOID(pause)
287 #define __itt_pause_ptr ITTNOTIFY_NAME(pause)
288 #define __itt_resume ITTNOTIFY_VOID(resume)
289 #define __itt_resume_ptr ITTNOTIFY_NAME(resume)
290 #define __itt_detach ITTNOTIFY_VOID(detach)
291 #define __itt_detach_ptr ITTNOTIFY_NAME(detach)
292 #else /* INTEL_NO_ITTNOTIFY_API */
293 #define __itt_pause()
294 #define __itt_pause_ptr 0
295 #define __itt_resume()
296 #define __itt_resume_ptr 0
297 #define __itt_detach()
298 #define __itt_detach_ptr 0
299 #endif /* INTEL_NO_ITTNOTIFY_API */
300 #else /* INTEL_NO_MACRO_BODY */
301 #define __itt_pause_ptr 0
302 #define __itt_resume_ptr 0
303 #define __itt_detach_ptr 0
304 #endif /* INTEL_NO_MACRO_BODY */
306 #endif /* _ITTNOTIFY_H_ */
307 /** @} legacy_control group */
310 * @defgroup legacy_threads Threads
313 * @warning Legacy API
317 * @deprecated Legacy API
318 * @brief Set name to be associated with thread in analysis GUI.
319 * @return __itt_err upon failure (name or namelen being null,name and namelen
322 #if ITT_PLATFORM == ITT_PLATFORM_WIN
323 int LIBITTAPI
__itt_thr_name_setA(const char *name
, int namelen
);
324 int LIBITTAPI
__itt_thr_name_setW(const wchar_t *name
, int namelen
);
325 #if defined(UNICODE) || defined(_UNICODE)
326 #define __itt_thr_name_set __itt_thr_name_setW
327 #define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr
329 #define __itt_thr_name_set __itt_thr_name_setA
330 #define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr
332 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
333 int LIBITTAPI
__itt_thr_name_set(const char *name
, int namelen
);
334 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
336 /** @cond exclude_from_documentation */
337 #ifndef INTEL_NO_MACRO_BODY
338 #ifndef INTEL_NO_ITTNOTIFY_API
339 #if ITT_PLATFORM == ITT_PLATFORM_WIN
340 ITT_STUB(LIBITTAPI
, int, thr_name_setA
, (const char *name
, int namelen
))
341 ITT_STUB(LIBITTAPI
, int, thr_name_setW
, (const wchar_t *name
, int namelen
))
342 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
343 ITT_STUB(LIBITTAPI
, int, thr_name_set
, (const char *name
, int namelen
))
344 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
345 #if ITT_PLATFORM == ITT_PLATFORM_WIN
346 #define __itt_thr_name_setA ITTNOTIFY_DATA(thr_name_setA)
347 #define __itt_thr_name_setA_ptr ITTNOTIFY_NAME(thr_name_setA)
348 #define __itt_thr_name_setW ITTNOTIFY_DATA(thr_name_setW)
349 #define __itt_thr_name_setW_ptr ITTNOTIFY_NAME(thr_name_setW)
350 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
351 #define __itt_thr_name_set ITTNOTIFY_DATA(thr_name_set)
352 #define __itt_thr_name_set_ptr ITTNOTIFY_NAME(thr_name_set)
353 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
354 #else /* INTEL_NO_ITTNOTIFY_API */
355 #if ITT_PLATFORM == ITT_PLATFORM_WIN
356 #define __itt_thr_name_setA(name, namelen)
357 #define __itt_thr_name_setA_ptr 0
358 #define __itt_thr_name_setW(name, namelen)
359 #define __itt_thr_name_setW_ptr 0
360 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
361 #define __itt_thr_name_set(name, namelen)
362 #define __itt_thr_name_set_ptr 0
363 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
364 #endif /* INTEL_NO_ITTNOTIFY_API */
365 #else /* INTEL_NO_MACRO_BODY */
366 #if ITT_PLATFORM == ITT_PLATFORM_WIN
367 #define __itt_thr_name_setA_ptr 0
368 #define __itt_thr_name_setW_ptr 0
369 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
370 #define __itt_thr_name_set_ptr 0
371 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
372 #endif /* INTEL_NO_MACRO_BODY */
376 * @deprecated Legacy API
377 * @brief Mark current thread as ignored from this point on, for the duration of
380 void LIBITTAPI
__itt_thr_ignore(void);
382 /** @cond exclude_from_documentation */
383 #ifndef INTEL_NO_MACRO_BODY
384 #ifndef INTEL_NO_ITTNOTIFY_API
385 ITT_STUBV(LIBITTAPI
, void, thr_ignore
, (void))
386 #define __itt_thr_ignore ITTNOTIFY_VOID(thr_ignore)
387 #define __itt_thr_ignore_ptr ITTNOTIFY_NAME(thr_ignore)
388 #else /* INTEL_NO_ITTNOTIFY_API */
389 #define __itt_thr_ignore()
390 #define __itt_thr_ignore_ptr 0
391 #endif /* INTEL_NO_ITTNOTIFY_API */
392 #else /* INTEL_NO_MACRO_BODY */
393 #define __itt_thr_ignore_ptr 0
394 #endif /* INTEL_NO_MACRO_BODY */
396 /** @} legacy_threads group */
399 * @defgroup legacy_sync Synchronization
401 * Synchronization group
402 * @warning Legacy API
407 * @brief possible value of attribute argument for sync object type
409 #define __itt_attr_barrier 1
413 * @brief possible value of attribute argument for sync object type
415 #define __itt_attr_mutex 2
418 * @deprecated Legacy API
419 * @brief Assign a name to a sync object using char or Unicode string
420 * @param[in] addr - pointer to the sync object. You should use a real
421 * pointer to your object to make sure that the values don't clash with other
423 * @param[in] objtype - null-terminated object type string. If NULL is passed,
424 * the object will be assumed to be of generic "User Synchronization" type
425 * @param[in] objname - null-terminated object name string. If NULL, no name
426 * will be assigned to the object -- you can use the __itt_sync_rename call
427 * later to assign the name
428 * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values
429 * which defines the exact semantics of how prepare/acquired/releasing calls
432 #if ITT_PLATFORM == ITT_PLATFORM_WIN
433 void ITTAPI
__itt_sync_set_nameA(void *addr
, const char *objtype
,
434 const char *objname
, int attribute
);
435 void ITTAPI
__itt_sync_set_nameW(void *addr
, const wchar_t *objtype
,
436 const wchar_t *objname
, int attribute
);
437 #if defined(UNICODE) || defined(_UNICODE)
438 #define __itt_sync_set_name __itt_sync_set_nameW
439 #define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr
441 #define __itt_sync_set_name __itt_sync_set_nameA
442 #define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr
444 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
445 void ITTAPI
__itt_sync_set_name(void *addr
, const char *objtype
,
446 const char *objname
, int attribute
);
447 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
449 /** @cond exclude_from_documentation */
450 #ifndef INTEL_NO_MACRO_BODY
451 #ifndef INTEL_NO_ITTNOTIFY_API
452 #if ITT_PLATFORM == ITT_PLATFORM_WIN
453 ITT_STUBV(ITTAPI
, void, sync_set_nameA
,
454 (void *addr
, const char *objtype
, const char *objname
, int attribute
))
455 ITT_STUBV(ITTAPI
, void, sync_set_nameW
,
456 (void *addr
, const wchar_t *objtype
, const wchar_t *objname
,
458 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
459 ITT_STUBV(ITTAPI
, void, sync_set_name
,
460 (void *addr
, const char *objtype
, const char *objname
, int attribute
))
461 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
462 #if ITT_PLATFORM == ITT_PLATFORM_WIN
463 #define __itt_sync_set_nameA ITTNOTIFY_VOID(sync_set_nameA)
464 #define __itt_sync_set_nameA_ptr ITTNOTIFY_NAME(sync_set_nameA)
465 #define __itt_sync_set_nameW ITTNOTIFY_VOID(sync_set_nameW)
466 #define __itt_sync_set_nameW_ptr ITTNOTIFY_NAME(sync_set_nameW)
467 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
468 #define __itt_sync_set_name ITTNOTIFY_VOID(sync_set_name)
469 #define __itt_sync_set_name_ptr ITTNOTIFY_NAME(sync_set_name)
470 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
471 #else /* INTEL_NO_ITTNOTIFY_API */
472 #if ITT_PLATFORM == ITT_PLATFORM_WIN
473 #define __itt_sync_set_nameA(addr, objtype, objname, attribute)
474 #define __itt_sync_set_nameA_ptr 0
475 #define __itt_sync_set_nameW(addr, objtype, objname, attribute)
476 #define __itt_sync_set_nameW_ptr 0
477 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
478 #define __itt_sync_set_name(addr, objtype, objname, attribute)
479 #define __itt_sync_set_name_ptr 0
480 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
481 #endif /* INTEL_NO_ITTNOTIFY_API */
482 #else /* INTEL_NO_MACRO_BODY */
483 #if ITT_PLATFORM == ITT_PLATFORM_WIN
484 #define __itt_sync_set_nameA_ptr 0
485 #define __itt_sync_set_nameW_ptr 0
486 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
487 #define __itt_sync_set_name_ptr 0
488 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
489 #endif /* INTEL_NO_MACRO_BODY */
493 * @deprecated Legacy API
494 * @brief Assign a name and type to a sync object using char or Unicode string
495 * @param[in] addr - pointer to the sync object. You should use a real
496 * pointer to your object to make sure that the values don't clash with other
498 * @param[in] objtype - null-terminated object type string. If NULL is passed,
499 * the object will be assumed to be of generic "User Synchronization" type
500 * @param[in] objname - null-terminated object name string. If NULL, no name
501 * will be assigned to the object -- you can use the __itt_sync_rename call
502 * later to assign the name
503 * @param[in] typelen, namelen - a length of string for appropriate objtype
504 * and objname parameter
505 * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values
506 * which defines the exact semantics of how prepare/acquired/releasing calls
508 * @return __itt_err upon failure (name or namelen being null,name and namelen
511 #if ITT_PLATFORM == ITT_PLATFORM_WIN
512 int LIBITTAPI
__itt_notify_sync_nameA(void *addr
, const char *objtype
,
513 int typelen
, const char *objname
,
514 int namelen
, int attribute
);
515 int LIBITTAPI
__itt_notify_sync_nameW(void *addr
, const wchar_t *objtype
,
516 int typelen
, const wchar_t *objname
,
517 int namelen
, int attribute
);
518 #if defined(UNICODE) || defined(_UNICODE)
519 #define __itt_notify_sync_name __itt_notify_sync_nameW
521 #define __itt_notify_sync_name __itt_notify_sync_nameA
523 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
524 int LIBITTAPI
__itt_notify_sync_name(void *addr
, const char *objtype
,
525 int typelen
, const char *objname
,
526 int namelen
, int attribute
);
527 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
529 /** @cond exclude_from_documentation */
530 #ifndef INTEL_NO_MACRO_BODY
531 #ifndef INTEL_NO_ITTNOTIFY_API
532 #if ITT_PLATFORM == ITT_PLATFORM_WIN
533 ITT_STUB(LIBITTAPI
, int, notify_sync_nameA
,
534 (void *addr
, const char *objtype
, int typelen
, const char *objname
,
535 int namelen
, int attribute
))
536 ITT_STUB(LIBITTAPI
, int, notify_sync_nameW
,
537 (void *addr
, const wchar_t *objtype
, int typelen
,
538 const wchar_t *objname
, int namelen
, int attribute
))
539 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
540 ITT_STUB(LIBITTAPI
, int, notify_sync_name
,
541 (void *addr
, const char *objtype
, int typelen
, const char *objname
,
542 int namelen
, int attribute
))
543 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
544 #if ITT_PLATFORM == ITT_PLATFORM_WIN
545 #define __itt_notify_sync_nameA ITTNOTIFY_DATA(notify_sync_nameA)
546 #define __itt_notify_sync_nameA_ptr ITTNOTIFY_NAME(notify_sync_nameA)
547 #define __itt_notify_sync_nameW ITTNOTIFY_DATA(notify_sync_nameW)
548 #define __itt_notify_sync_nameW_ptr ITTNOTIFY_NAME(notify_sync_nameW)
549 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
550 #define __itt_notify_sync_name ITTNOTIFY_DATA(notify_sync_name)
551 #define __itt_notify_sync_name_ptr ITTNOTIFY_NAME(notify_sync_name)
552 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
553 #else /* INTEL_NO_ITTNOTIFY_API */
554 #if ITT_PLATFORM == ITT_PLATFORM_WIN
555 #define __itt_notify_sync_nameA(addr, objtype, typelen, objname, namelen, \
557 #define __itt_notify_sync_nameA_ptr 0
558 #define __itt_notify_sync_nameW(addr, objtype, typelen, objname, namelen, \
560 #define __itt_notify_sync_nameW_ptr 0
561 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
562 #define __itt_notify_sync_name(addr, objtype, typelen, objname, namelen, \
564 #define __itt_notify_sync_name_ptr 0
565 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
566 #endif /* INTEL_NO_ITTNOTIFY_API */
567 #else /* INTEL_NO_MACRO_BODY */
568 #if ITT_PLATFORM == ITT_PLATFORM_WIN
569 #define __itt_notify_sync_nameA_ptr 0
570 #define __itt_notify_sync_nameW_ptr 0
571 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
572 #define __itt_notify_sync_name_ptr 0
573 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
574 #endif /* INTEL_NO_MACRO_BODY */
578 * @deprecated Legacy API
579 * @brief Enter spin loop on user-defined sync object
581 void LIBITTAPI
__itt_notify_sync_prepare(void *addr
);
583 /** @cond exclude_from_documentation */
584 #ifndef INTEL_NO_MACRO_BODY
585 #ifndef INTEL_NO_ITTNOTIFY_API
586 ITT_STUBV(LIBITTAPI
, void, notify_sync_prepare
, (void *addr
))
587 #define __itt_notify_sync_prepare ITTNOTIFY_VOID(notify_sync_prepare)
588 #define __itt_notify_sync_prepare_ptr ITTNOTIFY_NAME(notify_sync_prepare)
589 #else /* INTEL_NO_ITTNOTIFY_API */
590 #define __itt_notify_sync_prepare(addr)
591 #define __itt_notify_sync_prepare_ptr 0
592 #endif /* INTEL_NO_ITTNOTIFY_API */
593 #else /* INTEL_NO_MACRO_BODY */
594 #define __itt_notify_sync_prepare_ptr 0
595 #endif /* INTEL_NO_MACRO_BODY */
599 * @deprecated Legacy API
600 * @brief Quit spin loop without acquiring spin object
602 void LIBITTAPI
__itt_notify_sync_cancel(void *addr
);
604 /** @cond exclude_from_documentation */
605 #ifndef INTEL_NO_MACRO_BODY
606 #ifndef INTEL_NO_ITTNOTIFY_API
607 ITT_STUBV(LIBITTAPI
, void, notify_sync_cancel
, (void *addr
))
608 #define __itt_notify_sync_cancel ITTNOTIFY_VOID(notify_sync_cancel)
609 #define __itt_notify_sync_cancel_ptr ITTNOTIFY_NAME(notify_sync_cancel)
610 #else /* INTEL_NO_ITTNOTIFY_API */
611 #define __itt_notify_sync_cancel(addr)
612 #define __itt_notify_sync_cancel_ptr 0
613 #endif /* INTEL_NO_ITTNOTIFY_API */
614 #else /* INTEL_NO_MACRO_BODY */
615 #define __itt_notify_sync_cancel_ptr 0
616 #endif /* INTEL_NO_MACRO_BODY */
620 * @deprecated Legacy API
621 * @brief Successful spin loop completion (sync object acquired)
623 void LIBITTAPI
__itt_notify_sync_acquired(void *addr
);
625 /** @cond exclude_from_documentation */
626 #ifndef INTEL_NO_MACRO_BODY
627 #ifndef INTEL_NO_ITTNOTIFY_API
628 ITT_STUBV(LIBITTAPI
, void, notify_sync_acquired
, (void *addr
))
629 #define __itt_notify_sync_acquired ITTNOTIFY_VOID(notify_sync_acquired)
630 #define __itt_notify_sync_acquired_ptr ITTNOTIFY_NAME(notify_sync_acquired)
631 #else /* INTEL_NO_ITTNOTIFY_API */
632 #define __itt_notify_sync_acquired(addr)
633 #define __itt_notify_sync_acquired_ptr 0
634 #endif /* INTEL_NO_ITTNOTIFY_API */
635 #else /* INTEL_NO_MACRO_BODY */
636 #define __itt_notify_sync_acquired_ptr 0
637 #endif /* INTEL_NO_MACRO_BODY */
641 * @deprecated Legacy API
642 * @brief Start sync object releasing code. Is called before the lock release
645 void LIBITTAPI
__itt_notify_sync_releasing(void *addr
);
647 /** @cond exclude_from_documentation */
648 #ifndef INTEL_NO_MACRO_BODY
649 #ifndef INTEL_NO_ITTNOTIFY_API
650 ITT_STUBV(LIBITTAPI
, void, notify_sync_releasing
, (void *addr
))
651 #define __itt_notify_sync_releasing ITTNOTIFY_VOID(notify_sync_releasing)
652 #define __itt_notify_sync_releasing_ptr ITTNOTIFY_NAME(notify_sync_releasing)
653 #else /* INTEL_NO_ITTNOTIFY_API */
654 #define __itt_notify_sync_releasing(addr)
655 #define __itt_notify_sync_releasing_ptr 0
656 #endif /* INTEL_NO_ITTNOTIFY_API */
657 #else /* INTEL_NO_MACRO_BODY */
658 #define __itt_notify_sync_releasing_ptr 0
659 #endif /* INTEL_NO_MACRO_BODY */
661 /** @} legacy_sync group */
663 #ifndef _ITTNOTIFY_H_
665 * @defgroup legacy_events Events
671 /** @brief user event type */
672 typedef int __itt_event
;
675 * @brief Create an event notification
676 * @note name or namelen being null/name and namelen not matching, user event
677 * feature not enabled
678 * @return non-zero event identifier upon success and __itt_err otherwise
680 #if ITT_PLATFORM == ITT_PLATFORM_WIN
681 __itt_event LIBITTAPI
__itt_event_createA(const char *name
, int namelen
);
682 __itt_event LIBITTAPI
__itt_event_createW(const wchar_t *name
, int namelen
);
683 #if defined(UNICODE) || defined(_UNICODE)
684 #define __itt_event_create __itt_event_createW
685 #define __itt_event_create_ptr __itt_event_createW_ptr
687 #define __itt_event_create __itt_event_createA
688 #define __itt_event_create_ptr __itt_event_createA_ptr
690 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
691 __itt_event LIBITTAPI
__itt_event_create(const char *name
, int namelen
);
692 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
694 /** @cond exclude_from_documentation */
695 #ifndef INTEL_NO_MACRO_BODY
696 #ifndef INTEL_NO_ITTNOTIFY_API
697 #if ITT_PLATFORM == ITT_PLATFORM_WIN
698 ITT_STUB(LIBITTAPI
, __itt_event
, event_createA
, (const char *name
, int namelen
))
699 ITT_STUB(LIBITTAPI
, __itt_event
, event_createW
,
700 (const wchar_t *name
, int namelen
))
701 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
702 ITT_STUB(LIBITTAPI
, __itt_event
, event_create
, (const char *name
, int namelen
))
703 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
704 #if ITT_PLATFORM == ITT_PLATFORM_WIN
705 #define __itt_event_createA ITTNOTIFY_DATA(event_createA)
706 #define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA)
707 #define __itt_event_createW ITTNOTIFY_DATA(event_createW)
708 #define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW)
709 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
710 #define __itt_event_create ITTNOTIFY_DATA(event_create)
711 #define __itt_event_create_ptr ITTNOTIFY_NAME(event_create)
712 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
713 #else /* INTEL_NO_ITTNOTIFY_API */
714 #if ITT_PLATFORM == ITT_PLATFORM_WIN
715 #define __itt_event_createA(name, namelen) (__itt_event)0
716 #define __itt_event_createA_ptr 0
717 #define __itt_event_createW(name, namelen) (__itt_event)0
718 #define __itt_event_createW_ptr 0
719 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
720 #define __itt_event_create(name, namelen) (__itt_event)0
721 #define __itt_event_create_ptr 0
722 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
723 #endif /* INTEL_NO_ITTNOTIFY_API */
724 #else /* INTEL_NO_MACRO_BODY */
725 #if ITT_PLATFORM == ITT_PLATFORM_WIN
726 #define __itt_event_createA_ptr 0
727 #define __itt_event_createW_ptr 0
728 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
729 #define __itt_event_create_ptr 0
730 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
731 #endif /* INTEL_NO_MACRO_BODY */
735 * @brief Record an event occurrence.
736 * @return __itt_err upon failure (invalid event id/user event feature not
739 int LIBITTAPI
__itt_event_start(__itt_event event
);
741 /** @cond exclude_from_documentation */
742 #ifndef INTEL_NO_MACRO_BODY
743 #ifndef INTEL_NO_ITTNOTIFY_API
744 ITT_STUB(LIBITTAPI
, int, event_start
, (__itt_event event
))
745 #define __itt_event_start ITTNOTIFY_DATA(event_start)
746 #define __itt_event_start_ptr ITTNOTIFY_NAME(event_start)
747 #else /* INTEL_NO_ITTNOTIFY_API */
748 #define __itt_event_start(event) (int)0
749 #define __itt_event_start_ptr 0
750 #endif /* INTEL_NO_ITTNOTIFY_API */
751 #else /* INTEL_NO_MACRO_BODY */
752 #define __itt_event_start_ptr 0
753 #endif /* INTEL_NO_MACRO_BODY */
757 * @brief Record an event end occurrence.
758 * @note It is optional if events do not have durations.
759 * @return __itt_err upon failure (invalid event id/user event feature not
762 int LIBITTAPI
__itt_event_end(__itt_event event
);
764 /** @cond exclude_from_documentation */
765 #ifndef INTEL_NO_MACRO_BODY
766 #ifndef INTEL_NO_ITTNOTIFY_API
767 ITT_STUB(LIBITTAPI
, int, event_end
, (__itt_event event
))
768 #define __itt_event_end ITTNOTIFY_DATA(event_end)
769 #define __itt_event_end_ptr ITTNOTIFY_NAME(event_end)
770 #else /* INTEL_NO_ITTNOTIFY_API */
771 #define __itt_event_end(event) (int)0
772 #define __itt_event_end_ptr 0
773 #endif /* INTEL_NO_ITTNOTIFY_API */
774 #else /* INTEL_NO_MACRO_BODY */
775 #define __itt_event_end_ptr 0
776 #endif /* INTEL_NO_MACRO_BODY */
778 /** @} legacy_events group */
779 #endif /* _ITTNOTIFY_H_ */
782 * @defgroup legacy_memory Memory Accesses
787 * @deprecated Legacy API
788 * @brief Inform the tool of memory accesses on reading
790 void LIBITTAPI
__itt_memory_read(void *addr
, size_t size
);
792 /** @cond exclude_from_documentation */
793 #ifndef INTEL_NO_MACRO_BODY
794 #ifndef INTEL_NO_ITTNOTIFY_API
795 ITT_STUBV(LIBITTAPI
, void, memory_read
, (void *addr
, size_t size
))
796 #define __itt_memory_read ITTNOTIFY_VOID(memory_read)
797 #define __itt_memory_read_ptr ITTNOTIFY_NAME(memory_read)
798 #else /* INTEL_NO_ITTNOTIFY_API */
799 #define __itt_memory_read(addr, size)
800 #define __itt_memory_read_ptr 0
801 #endif /* INTEL_NO_ITTNOTIFY_API */
802 #else /* INTEL_NO_MACRO_BODY */
803 #define __itt_memory_read_ptr 0
804 #endif /* INTEL_NO_MACRO_BODY */
808 * @deprecated Legacy API
809 * @brief Inform the tool of memory accesses on writing
811 void LIBITTAPI
__itt_memory_write(void *addr
, size_t size
);
813 /** @cond exclude_from_documentation */
814 #ifndef INTEL_NO_MACRO_BODY
815 #ifndef INTEL_NO_ITTNOTIFY_API
816 ITT_STUBV(LIBITTAPI
, void, memory_write
, (void *addr
, size_t size
))
817 #define __itt_memory_write ITTNOTIFY_VOID(memory_write)
818 #define __itt_memory_write_ptr ITTNOTIFY_NAME(memory_write)
819 #else /* INTEL_NO_ITTNOTIFY_API */
820 #define __itt_memory_write(addr, size)
821 #define __itt_memory_write_ptr 0
822 #endif /* INTEL_NO_ITTNOTIFY_API */
823 #else /* INTEL_NO_MACRO_BODY */
824 #define __itt_memory_write_ptr 0
825 #endif /* INTEL_NO_MACRO_BODY */
829 * @deprecated Legacy API
830 * @brief Inform the tool of memory accesses on updating
832 void LIBITTAPI
__itt_memory_update(void *address
, size_t size
);
834 /** @cond exclude_from_documentation */
835 #ifndef INTEL_NO_MACRO_BODY
836 #ifndef INTEL_NO_ITTNOTIFY_API
837 ITT_STUBV(LIBITTAPI
, void, memory_update
, (void *addr
, size_t size
))
838 #define __itt_memory_update ITTNOTIFY_VOID(memory_update)
839 #define __itt_memory_update_ptr ITTNOTIFY_NAME(memory_update)
840 #else /* INTEL_NO_ITTNOTIFY_API */
841 #define __itt_memory_update(addr, size)
842 #define __itt_memory_update_ptr 0
843 #endif /* INTEL_NO_ITTNOTIFY_API */
844 #else /* INTEL_NO_MACRO_BODY */
845 #define __itt_memory_update_ptr 0
846 #endif /* INTEL_NO_MACRO_BODY */
848 /** @} legacy_memory group */
851 * @defgroup legacy_state Thread and Object States
855 /** @brief state type */
856 typedef int __itt_state_t
;
858 /** @cond exclude_from_documentation */
859 typedef enum __itt_obj_state
{
860 __itt_obj_state_err
= 0,
861 __itt_obj_state_clr
= 1,
862 __itt_obj_state_set
= 2,
863 __itt_obj_state_use
= 3
866 typedef enum __itt_thr_state
{
867 __itt_thr_state_err
= 0,
868 __itt_thr_state_clr
= 1,
869 __itt_thr_state_set
= 2
872 typedef enum __itt_obj_prop
{
873 __itt_obj_prop_watch
= 1,
874 __itt_obj_prop_ignore
= 2,
875 __itt_obj_prop_sharable
= 3
878 typedef enum __itt_thr_prop
{ __itt_thr_prop_quiet
= 1 } __itt_thr_prop_t
;
882 * @deprecated Legacy API
883 * @brief managing thread and object states
885 __itt_state_t LIBITTAPI
__itt_state_get(void);
887 /** @cond exclude_from_documentation */
888 #ifndef INTEL_NO_MACRO_BODY
889 #ifndef INTEL_NO_ITTNOTIFY_API
890 ITT_STUB(ITTAPI
, __itt_state_t
, state_get
, (void))
891 #define __itt_state_get ITTNOTIFY_DATA(state_get)
892 #define __itt_state_get_ptr ITTNOTIFY_NAME(state_get)
893 #else /* INTEL_NO_ITTNOTIFY_API */
894 #define __itt_state_get(void) (__itt_state_t)0
895 #define __itt_state_get_ptr 0
896 #endif /* INTEL_NO_ITTNOTIFY_API */
897 #else /* INTEL_NO_MACRO_BODY */
898 #define __itt_state_get_ptr 0
899 #endif /* INTEL_NO_MACRO_BODY */
903 * @deprecated Legacy API
904 * @brief managing thread and object states
906 __itt_state_t LIBITTAPI
__itt_state_set(__itt_state_t s
);
908 /** @cond exclude_from_documentation */
909 #ifndef INTEL_NO_MACRO_BODY
910 #ifndef INTEL_NO_ITTNOTIFY_API
911 ITT_STUB(ITTAPI
, __itt_state_t
, state_set
, (__itt_state_t s
))
912 #define __itt_state_set ITTNOTIFY_DATA(state_set)
913 #define __itt_state_set_ptr ITTNOTIFY_NAME(state_set)
914 #else /* INTEL_NO_ITTNOTIFY_API */
915 #define __itt_state_set(s) (__itt_state_t)0
916 #define __itt_state_set_ptr 0
917 #endif /* INTEL_NO_ITTNOTIFY_API */
918 #else /* INTEL_NO_MACRO_BODY */
919 #define __itt_state_set_ptr 0
920 #endif /* INTEL_NO_MACRO_BODY */
924 * @deprecated Legacy API
925 * @brief managing thread and object modes
927 __itt_thr_state_t LIBITTAPI
__itt_thr_mode_set(__itt_thr_prop_t p
,
928 __itt_thr_state_t s
);
930 /** @cond exclude_from_documentation */
931 #ifndef INTEL_NO_MACRO_BODY
932 #ifndef INTEL_NO_ITTNOTIFY_API
933 ITT_STUB(ITTAPI
, __itt_thr_state_t
, thr_mode_set
,
934 (__itt_thr_prop_t p
, __itt_thr_state_t s
))
935 #define __itt_thr_mode_set ITTNOTIFY_DATA(thr_mode_set)
936 #define __itt_thr_mode_set_ptr ITTNOTIFY_NAME(thr_mode_set)
937 #else /* INTEL_NO_ITTNOTIFY_API */
938 #define __itt_thr_mode_set(p, s) (__itt_thr_state_t)0
939 #define __itt_thr_mode_set_ptr 0
940 #endif /* INTEL_NO_ITTNOTIFY_API */
941 #else /* INTEL_NO_MACRO_BODY */
942 #define __itt_thr_mode_set_ptr 0
943 #endif /* INTEL_NO_MACRO_BODY */
947 * @deprecated Legacy API
948 * @brief managing thread and object modes
950 __itt_obj_state_t LIBITTAPI
__itt_obj_mode_set(__itt_obj_prop_t p
,
951 __itt_obj_state_t s
);
953 /** @cond exclude_from_documentation */
954 #ifndef INTEL_NO_MACRO_BODY
955 #ifndef INTEL_NO_ITTNOTIFY_API
956 ITT_STUB(ITTAPI
, __itt_obj_state_t
, obj_mode_set
,
957 (__itt_obj_prop_t p
, __itt_obj_state_t s
))
958 #define __itt_obj_mode_set ITTNOTIFY_DATA(obj_mode_set)
959 #define __itt_obj_mode_set_ptr ITTNOTIFY_NAME(obj_mode_set)
960 #else /* INTEL_NO_ITTNOTIFY_API */
961 #define __itt_obj_mode_set(p, s) (__itt_obj_state_t)0
962 #define __itt_obj_mode_set_ptr 0
963 #endif /* INTEL_NO_ITTNOTIFY_API */
964 #else /* INTEL_NO_MACRO_BODY */
965 #define __itt_obj_mode_set_ptr 0
966 #endif /* INTEL_NO_MACRO_BODY */
968 /** @} legacy_state group */
971 * @defgroup frames Frames
977 * @brief opaque structure for frame identification
979 typedef struct __itt_frame_t
*__itt_frame
;
982 * @brief Create a global frame with given domain
984 #if ITT_PLATFORM == ITT_PLATFORM_WIN
985 __itt_frame ITTAPI
__itt_frame_createA(const char *domain
);
986 __itt_frame ITTAPI
__itt_frame_createW(const wchar_t *domain
);
987 #if defined(UNICODE) || defined(_UNICODE)
988 #define __itt_frame_create __itt_frame_createW
989 #define __itt_frame_create_ptr __itt_frame_createW_ptr
991 #define __itt_frame_create __itt_frame_createA
992 #define __itt_frame_create_ptr __itt_frame_createA_ptr
994 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
995 __itt_frame ITTAPI
__itt_frame_create(const char *domain
);
996 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
998 /** @cond exclude_from_documentation */
999 #ifndef INTEL_NO_MACRO_BODY
1000 #ifndef INTEL_NO_ITTNOTIFY_API
1001 #if ITT_PLATFORM == ITT_PLATFORM_WIN
1002 ITT_STUB(ITTAPI
, __itt_frame
, frame_createA
, (const char *domain
))
1003 ITT_STUB(ITTAPI
, __itt_frame
, frame_createW
, (const wchar_t *domain
))
1004 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1005 ITT_STUB(ITTAPI
, __itt_frame
, frame_create
, (const char *domain
))
1006 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1007 #if ITT_PLATFORM == ITT_PLATFORM_WIN
1008 #define __itt_frame_createA ITTNOTIFY_DATA(frame_createA)
1009 #define __itt_frame_createA_ptr ITTNOTIFY_NAME(frame_createA)
1010 #define __itt_frame_createW ITTNOTIFY_DATA(frame_createW)
1011 #define __itt_frame_createW_ptr ITTNOTIFY_NAME(frame_createW)
1012 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1013 #define __itt_frame_create ITTNOTIFY_DATA(frame_create)
1014 #define __itt_frame_create_ptr ITTNOTIFY_NAME(frame_create)
1015 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1016 #else /* INTEL_NO_ITTNOTIFY_API */
1017 #if ITT_PLATFORM == ITT_PLATFORM_WIN
1018 #define __itt_frame_createA(domain)
1019 #define __itt_frame_createA_ptr 0
1020 #define __itt_frame_createW(domain)
1021 #define __itt_frame_createW_ptr 0
1022 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1023 #define __itt_frame_create(domain)
1024 #define __itt_frame_create_ptr 0
1025 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1026 #endif /* INTEL_NO_ITTNOTIFY_API */
1027 #else /* INTEL_NO_MACRO_BODY */
1028 #if ITT_PLATFORM == ITT_PLATFORM_WIN
1029 #define __itt_frame_createA_ptr 0
1030 #define __itt_frame_createW_ptr 0
1031 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1032 #define __itt_frame_create_ptr 0
1033 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1034 #endif /* INTEL_NO_MACRO_BODY */
1037 /** @brief Record a frame begin occurrence. */
1038 void ITTAPI
__itt_frame_begin(__itt_frame frame
);
1039 /** @brief Record a frame end occurrence. */
1040 void ITTAPI
__itt_frame_end(__itt_frame frame
);
1042 /** @cond exclude_from_documentation */
1043 #ifndef INTEL_NO_MACRO_BODY
1044 #ifndef INTEL_NO_ITTNOTIFY_API
1045 ITT_STUBV(ITTAPI
, void, frame_begin
, (__itt_frame frame
))
1046 ITT_STUBV(ITTAPI
, void, frame_end
, (__itt_frame frame
))
1047 #define __itt_frame_begin ITTNOTIFY_VOID(frame_begin)
1048 #define __itt_frame_begin_ptr ITTNOTIFY_NAME(frame_begin)
1049 #define __itt_frame_end ITTNOTIFY_VOID(frame_end)
1050 #define __itt_frame_end_ptr ITTNOTIFY_NAME(frame_end)
1051 #else /* INTEL_NO_ITTNOTIFY_API */
1052 #define __itt_frame_begin(frame)
1053 #define __itt_frame_begin_ptr 0
1054 #define __itt_frame_end(frame)
1055 #define __itt_frame_end_ptr 0
1056 #endif /* INTEL_NO_ITTNOTIFY_API */
1057 #else /* INTEL_NO_MACRO_BODY */
1058 #define __itt_frame_begin_ptr 0
1059 #define __itt_frame_end_ptr 0
1060 #endif /* INTEL_NO_MACRO_BODY */
1062 /** @} frames group */
1066 #endif /* __cplusplus */
1068 #endif /* _LEGACY_ITTNOTIFY_H_ */