1069 lines · c
1 2//===----------------------------------------------------------------------===//3//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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LEGACY_ITTNOTIFY_H_11#define _LEGACY_ITTNOTIFY_H_12 13/**14 * @file15 * @brief Legacy User API functions and types16 */17 18/** @cond exclude_from_documentation */19#ifndef ITT_OS_WIN20#define ITT_OS_WIN 121#endif /* ITT_OS_WIN */22 23#ifndef ITT_OS_LINUX24#define ITT_OS_LINUX 225#endif /* ITT_OS_LINUX */26 27#ifndef ITT_OS_MAC28#define ITT_OS_MAC 329#endif /* ITT_OS_MAC */30 31#ifndef ITT_OS_FREEBSD32#define ITT_OS_FREEBSD 433#endif /* ITT_OS_FREEBSD */34 35#ifndef ITT_OS36#if defined WIN32 || defined _WIN3237#define ITT_OS ITT_OS_WIN38#elif defined(__APPLE__) && defined(__MACH__)39#define ITT_OS ITT_OS_MAC40#elif defined(__FreeBSD__)41#define ITT_OS ITT_OS_FREEBSD42#else43#define ITT_OS ITT_OS_LINUX44#endif45#endif /* ITT_OS */46 47#ifndef ITT_PLATFORM_WIN48#define ITT_PLATFORM_WIN 149#endif /* ITT_PLATFORM_WIN */50 51#ifndef ITT_PLATFORM_POSIX52#define ITT_PLATFORM_POSIX 253#endif /* ITT_PLATFORM_POSIX */54 55#ifndef ITT_PLATFORM_MAC56#define ITT_PLATFORM_MAC 357#endif /* ITT_PLATFORM_MAC */58 59#ifndef ITT_PLATFORM_FREEBSD60#define ITT_PLATFORM_FREEBSD 461#endif /* ITT_PLATFORM_FREEBSD */62 63#ifndef ITT_PLATFORM64#if ITT_OS == ITT_OS_WIN65#define ITT_PLATFORM ITT_PLATFORM_WIN66#elif ITT_OS == ITT_OS_MAC67#define ITT_PLATFORM ITT_PLATFORM_MAC68#elif ITT_OS == ITT_OS_FREEBSD69#define ITT_PLATFORM ITT_PLATFORM_FREEBSD70#else71#define ITT_PLATFORM ITT_PLATFORM_POSIX72#endif73#endif /* ITT_PLATFORM */74 75#if defined(_UNICODE) && !defined(UNICODE)76#define UNICODE77#endif78 79#include <stddef.h>80#if ITT_PLATFORM == ITT_PLATFORM_WIN81#include <tchar.h>82#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */83#include <stdint.h>84#if defined(UNICODE) || defined(_UNICODE)85#include <wchar.h>86#endif /* UNICODE || _UNICODE */87#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */88 89#ifndef ITTAPI_CDECL90#if ITT_PLATFORM == ITT_PLATFORM_WIN91#define ITTAPI_CDECL __cdecl92#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 */100 101#ifndef STDCALL102#if ITT_PLATFORM == ITT_PLATFORM_WIN103#define STDCALL __stdcall104#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 */111#endif /* STDCALL */112 113#define ITTAPI ITTAPI_CDECL114#define LIBITTAPI ITTAPI_CDECL115 116/* TODO: Temporary for compatibility! */117#define ITTAPI_CALL ITTAPI_CDECL118#define LIBITTAPI_CALL ITTAPI_CDECL119 120#if ITT_PLATFORM == ITT_PLATFORM_WIN121/* use __forceinline (VC++ specific) */122#if defined(__MINGW32__) && !defined(__cplusplus)123#define ITT_INLINE \124 static __inline__ __attribute__((__always_inline__, __gnu_inline__))125#else126#define ITT_INLINE static __forceinline127#endif /* __MINGW32__ */128 129#define ITT_INLINE_ATTRIBUTE /* nothing */130#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */131/*132 * Generally, functions are not inlined unless optimization is specified.133 * For functions declared inline, this attribute inlines the function even134 * if no optimization level was specified.135 */136#ifdef __STRICT_ANSI__137#define ITT_INLINE static138#define ITT_INLINE_ATTRIBUTE __attribute__((unused))139#else /* __STRICT_ANSI__ */140#define ITT_INLINE static inline141#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))142#endif /* __STRICT_ANSI__ */143#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */144/** @endcond */145 146/** @cond exclude_from_documentation */147/* Helper macro for joining tokens */148#define ITT_JOIN_AUX(p, n) p##n149#define ITT_JOIN(p, n) ITT_JOIN_AUX(p, n)150 151#ifdef ITT_MAJOR152#undef ITT_MAJOR153#endif154#ifdef ITT_MINOR155#undef ITT_MINOR156#endif157#define ITT_MAJOR 3158#define ITT_MINOR 0159 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))))163 164#ifndef INTEL_ITTNOTIFY_PREFIX165#define INTEL_ITTNOTIFY_PREFIX __itt_166#endif /* INTEL_ITTNOTIFY_PREFIX */167#ifndef INTEL_ITTNOTIFY_POSTFIX168#define INTEL_ITTNOTIFY_POSTFIX _ptr_169#endif /* INTEL_ITTNOTIFY_POSTFIX */170 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)))174 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)177 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) \215 (!(d)->flags) ? 0 \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) \219 (!(d)->flags) ? 0 \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) \223 (!(d)->flags) ? 0 \224 : (!ITTNOTIFY_NAME(n)) ? 0 \225 : ITTNOTIFY_NAME(n)(d, x, y, z, a, b, c)226 227#ifdef ITT_STUB228#undef ITT_STUB229#endif230#ifdef ITT_STUBV231#undef ITT_STUBV232#endif233#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_STUBV237/** @endcond */238 239#ifdef __cplusplus240extern "C" {241#endif /* __cplusplus */242 243/**244 * @defgroup legacy Legacy API245 * @{246 * @}247 */248 249/**250 * @defgroup legacy_control Collection Control251 * @ingroup legacy252 * General behavior: application continues to run, but no profiling information253 * is being collected254 *255 * Pausing occurs not only for the current thread but for all process as well as256 * spawned processes257 * - 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 in260 * Intel(R) Parallel Inspector and Intel(R) Inspector XE261 * only pauses tracing and analyzing memory access.262 * It does not pause tracing or analyzing threading APIs.263 * .264 * - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE:265 * - Does continue to record when new threads are started.266 * .267 * - Other effects:268 * - Possible reduction of runtime overhead.269 * .270 * @{271 */272#ifndef _ITTNOTIFY_H_273/** @brief Pause collection */274void ITTAPI __itt_pause(void);275/** @brief Resume collection */276void ITTAPI __itt_resume(void);277/** @brief Detach collection */278void ITTAPI __itt_detach(void);279 280/** @cond exclude_from_documentation */281#ifndef INTEL_NO_MACRO_BODY282#ifndef INTEL_NO_ITTNOTIFY_API283ITT_STUBV(ITTAPI, void, pause, (void))284ITT_STUBV(ITTAPI, void, resume, (void))285ITT_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 0295#define __itt_resume()296#define __itt_resume_ptr 0297#define __itt_detach()298#define __itt_detach_ptr 0299#endif /* INTEL_NO_ITTNOTIFY_API */300#else /* INTEL_NO_MACRO_BODY */301#define __itt_pause_ptr 0302#define __itt_resume_ptr 0303#define __itt_detach_ptr 0304#endif /* INTEL_NO_MACRO_BODY */305/** @endcond */306#endif /* _ITTNOTIFY_H_ */307/** @} legacy_control group */308 309/**310 * @defgroup legacy_threads Threads311 * @ingroup legacy312 * Threads group313 * @warning Legacy API314 * @{315 */316/**317 * @deprecated Legacy API318 * @brief Set name to be associated with thread in analysis GUI.319 * @return __itt_err upon failure (name or namelen being null,name and namelen320 * mismatched)321 */322#if ITT_PLATFORM == ITT_PLATFORM_WIN323int LIBITTAPI __itt_thr_name_setA(const char *name, int namelen);324int 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_setW327#define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr328#else329#define __itt_thr_name_set __itt_thr_name_setA330#define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr331#endif /* UNICODE */332#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */333int LIBITTAPI __itt_thr_name_set(const char *name, int namelen);334#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */335 336/** @cond exclude_from_documentation */337#ifndef INTEL_NO_MACRO_BODY338#ifndef INTEL_NO_ITTNOTIFY_API339#if ITT_PLATFORM == ITT_PLATFORM_WIN340ITT_STUB(LIBITTAPI, int, thr_name_setA, (const char *name, int namelen))341ITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen))342#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */343ITT_STUB(LIBITTAPI, int, thr_name_set, (const char *name, int namelen))344#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */345#if ITT_PLATFORM == ITT_PLATFORM_WIN346#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_WIN356#define __itt_thr_name_setA(name, namelen)357#define __itt_thr_name_setA_ptr 0358#define __itt_thr_name_setW(name, namelen)359#define __itt_thr_name_setW_ptr 0360#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */361#define __itt_thr_name_set(name, namelen)362#define __itt_thr_name_set_ptr 0363#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */364#endif /* INTEL_NO_ITTNOTIFY_API */365#else /* INTEL_NO_MACRO_BODY */366#if ITT_PLATFORM == ITT_PLATFORM_WIN367#define __itt_thr_name_setA_ptr 0368#define __itt_thr_name_setW_ptr 0369#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */370#define __itt_thr_name_set_ptr 0371#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */372#endif /* INTEL_NO_MACRO_BODY */373/** @endcond */374 375/**376 * @deprecated Legacy API377 * @brief Mark current thread as ignored from this point on, for the duration of378 * its existence.379 */380void LIBITTAPI __itt_thr_ignore(void);381 382/** @cond exclude_from_documentation */383#ifndef INTEL_NO_MACRO_BODY384#ifndef INTEL_NO_ITTNOTIFY_API385ITT_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 0391#endif /* INTEL_NO_ITTNOTIFY_API */392#else /* INTEL_NO_MACRO_BODY */393#define __itt_thr_ignore_ptr 0394#endif /* INTEL_NO_MACRO_BODY */395/** @endcond */396/** @} legacy_threads group */397 398/**399 * @defgroup legacy_sync Synchronization400 * @ingroup legacy401 * Synchronization group402 * @warning Legacy API403 * @{404 */405/**406 * @hideinitializer407 * @brief possible value of attribute argument for sync object type408 */409#define __itt_attr_barrier 1410 411/**412 * @hideinitializer413 * @brief possible value of attribute argument for sync object type414 */415#define __itt_attr_mutex 2416 417/**418 * @deprecated Legacy API419 * @brief Assign a name to a sync object using char or Unicode string420 * @param[in] addr - pointer to the sync object. You should use a real421 * pointer to your object to make sure that the values don't clash with other422 * object addresses423 * @param[in] objtype - null-terminated object type string. If NULL is passed,424 * the object will be assumed to be of generic "User Synchronization" type425 * @param[in] objname - null-terminated object name string. If NULL, no name426 * will be assigned to the object -- you can use the __itt_sync_rename call427 * later to assign the name428 * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values429 * which defines the exact semantics of how prepare/acquired/releasing calls430 * work.431 */432#if ITT_PLATFORM == ITT_PLATFORM_WIN433void ITTAPI __itt_sync_set_nameA(void *addr, const char *objtype,434 const char *objname, int attribute);435void 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_nameW439#define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr440#else /* UNICODE */441#define __itt_sync_set_name __itt_sync_set_nameA442#define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr443#endif /* UNICODE */444#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */445void ITTAPI __itt_sync_set_name(void *addr, const char *objtype,446 const char *objname, int attribute);447#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */448 449/** @cond exclude_from_documentation */450#ifndef INTEL_NO_MACRO_BODY451#ifndef INTEL_NO_ITTNOTIFY_API452#if ITT_PLATFORM == ITT_PLATFORM_WIN453ITT_STUBV(ITTAPI, void, sync_set_nameA,454 (void *addr, const char *objtype, const char *objname, int attribute))455ITT_STUBV(ITTAPI, void, sync_set_nameW,456 (void *addr, const wchar_t *objtype, const wchar_t *objname,457 int attribute))458#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */459ITT_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_WIN463#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_WIN473#define __itt_sync_set_nameA(addr, objtype, objname, attribute)474#define __itt_sync_set_nameA_ptr 0475#define __itt_sync_set_nameW(addr, objtype, objname, attribute)476#define __itt_sync_set_nameW_ptr 0477#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */478#define __itt_sync_set_name(addr, objtype, objname, attribute)479#define __itt_sync_set_name_ptr 0480#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */481#endif /* INTEL_NO_ITTNOTIFY_API */482#else /* INTEL_NO_MACRO_BODY */483#if ITT_PLATFORM == ITT_PLATFORM_WIN484#define __itt_sync_set_nameA_ptr 0485#define __itt_sync_set_nameW_ptr 0486#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */487#define __itt_sync_set_name_ptr 0488#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */489#endif /* INTEL_NO_MACRO_BODY */490/** @endcond */491 492/**493 * @deprecated Legacy API494 * @brief Assign a name and type to a sync object using char or Unicode string495 * @param[in] addr - pointer to the sync object. You should use a real496 * pointer to your object to make sure that the values don't clash with other497 * object addresses498 * @param[in] objtype - null-terminated object type string. If NULL is passed,499 * the object will be assumed to be of generic "User Synchronization" type500 * @param[in] objname - null-terminated object name string. If NULL, no name501 * will be assigned to the object -- you can use the __itt_sync_rename call502 * later to assign the name503 * @param[in] typelen, namelen - a length of string for appropriate objtype504 * and objname parameter505 * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values506 * which defines the exact semantics of how prepare/acquired/releasing calls507 * work.508 * @return __itt_err upon failure (name or namelen being null,name and namelen509 * mismatched)510 */511#if ITT_PLATFORM == ITT_PLATFORM_WIN512int LIBITTAPI __itt_notify_sync_nameA(void *addr, const char *objtype,513 int typelen, const char *objname,514 int namelen, int attribute);515int 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_nameW520#else521#define __itt_notify_sync_name __itt_notify_sync_nameA522#endif523#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */524int 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 */528 529/** @cond exclude_from_documentation */530#ifndef INTEL_NO_MACRO_BODY531#ifndef INTEL_NO_ITTNOTIFY_API532#if ITT_PLATFORM == ITT_PLATFORM_WIN533ITT_STUB(LIBITTAPI, int, notify_sync_nameA,534 (void *addr, const char *objtype, int typelen, const char *objname,535 int namelen, int attribute))536ITT_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 */540ITT_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_WIN545#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_WIN555#define __itt_notify_sync_nameA(addr, objtype, typelen, objname, namelen, \556 attribute)557#define __itt_notify_sync_nameA_ptr 0558#define __itt_notify_sync_nameW(addr, objtype, typelen, objname, namelen, \559 attribute)560#define __itt_notify_sync_nameW_ptr 0561#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */562#define __itt_notify_sync_name(addr, objtype, typelen, objname, namelen, \563 attribute)564#define __itt_notify_sync_name_ptr 0565#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */566#endif /* INTEL_NO_ITTNOTIFY_API */567#else /* INTEL_NO_MACRO_BODY */568#if ITT_PLATFORM == ITT_PLATFORM_WIN569#define __itt_notify_sync_nameA_ptr 0570#define __itt_notify_sync_nameW_ptr 0571#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */572#define __itt_notify_sync_name_ptr 0573#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */574#endif /* INTEL_NO_MACRO_BODY */575/** @endcond */576 577/**578 * @deprecated Legacy API579 * @brief Enter spin loop on user-defined sync object580 */581void LIBITTAPI __itt_notify_sync_prepare(void *addr);582 583/** @cond exclude_from_documentation */584#ifndef INTEL_NO_MACRO_BODY585#ifndef INTEL_NO_ITTNOTIFY_API586ITT_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 0592#endif /* INTEL_NO_ITTNOTIFY_API */593#else /* INTEL_NO_MACRO_BODY */594#define __itt_notify_sync_prepare_ptr 0595#endif /* INTEL_NO_MACRO_BODY */596/** @endcond */597 598/**599 * @deprecated Legacy API600 * @brief Quit spin loop without acquiring spin object601 */602void LIBITTAPI __itt_notify_sync_cancel(void *addr);603 604/** @cond exclude_from_documentation */605#ifndef INTEL_NO_MACRO_BODY606#ifndef INTEL_NO_ITTNOTIFY_API607ITT_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 0613#endif /* INTEL_NO_ITTNOTIFY_API */614#else /* INTEL_NO_MACRO_BODY */615#define __itt_notify_sync_cancel_ptr 0616#endif /* INTEL_NO_MACRO_BODY */617/** @endcond */618 619/**620 * @deprecated Legacy API621 * @brief Successful spin loop completion (sync object acquired)622 */623void LIBITTAPI __itt_notify_sync_acquired(void *addr);624 625/** @cond exclude_from_documentation */626#ifndef INTEL_NO_MACRO_BODY627#ifndef INTEL_NO_ITTNOTIFY_API628ITT_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 0634#endif /* INTEL_NO_ITTNOTIFY_API */635#else /* INTEL_NO_MACRO_BODY */636#define __itt_notify_sync_acquired_ptr 0637#endif /* INTEL_NO_MACRO_BODY */638/** @endcond */639 640/**641 * @deprecated Legacy API642 * @brief Start sync object releasing code. Is called before the lock release643 * call.644 */645void LIBITTAPI __itt_notify_sync_releasing(void *addr);646 647/** @cond exclude_from_documentation */648#ifndef INTEL_NO_MACRO_BODY649#ifndef INTEL_NO_ITTNOTIFY_API650ITT_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 0656#endif /* INTEL_NO_ITTNOTIFY_API */657#else /* INTEL_NO_MACRO_BODY */658#define __itt_notify_sync_releasing_ptr 0659#endif /* INTEL_NO_MACRO_BODY */660/** @endcond */661/** @} legacy_sync group */662 663#ifndef _ITTNOTIFY_H_664/**665 * @defgroup legacy_events Events666 * @ingroup legacy667 * Events group668 * @{669 */670 671/** @brief user event type */672typedef int __itt_event;673 674/**675 * @brief Create an event notification676 * @note name or namelen being null/name and namelen not matching, user event677 * feature not enabled678 * @return non-zero event identifier upon success and __itt_err otherwise679 */680#if ITT_PLATFORM == ITT_PLATFORM_WIN681__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_createW685#define __itt_event_create_ptr __itt_event_createW_ptr686#else687#define __itt_event_create __itt_event_createA688#define __itt_event_create_ptr __itt_event_createA_ptr689#endif /* UNICODE */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 */693 694/** @cond exclude_from_documentation */695#ifndef INTEL_NO_MACRO_BODY696#ifndef INTEL_NO_ITTNOTIFY_API697#if ITT_PLATFORM == ITT_PLATFORM_WIN698ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen))699ITT_STUB(LIBITTAPI, __itt_event, event_createW,700 (const wchar_t *name, int namelen))701#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */702ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen))703#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */704#if ITT_PLATFORM == ITT_PLATFORM_WIN705#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_WIN715#define __itt_event_createA(name, namelen) (__itt_event)0716#define __itt_event_createA_ptr 0717#define __itt_event_createW(name, namelen) (__itt_event)0718#define __itt_event_createW_ptr 0719#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */720#define __itt_event_create(name, namelen) (__itt_event)0721#define __itt_event_create_ptr 0722#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */723#endif /* INTEL_NO_ITTNOTIFY_API */724#else /* INTEL_NO_MACRO_BODY */725#if ITT_PLATFORM == ITT_PLATFORM_WIN726#define __itt_event_createA_ptr 0727#define __itt_event_createW_ptr 0728#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */729#define __itt_event_create_ptr 0730#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */731#endif /* INTEL_NO_MACRO_BODY */732/** @endcond */733 734/**735 * @brief Record an event occurrence.736 * @return __itt_err upon failure (invalid event id/user event feature not737 * enabled)738 */739int LIBITTAPI __itt_event_start(__itt_event event);740 741/** @cond exclude_from_documentation */742#ifndef INTEL_NO_MACRO_BODY743#ifndef INTEL_NO_ITTNOTIFY_API744ITT_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)0749#define __itt_event_start_ptr 0750#endif /* INTEL_NO_ITTNOTIFY_API */751#else /* INTEL_NO_MACRO_BODY */752#define __itt_event_start_ptr 0753#endif /* INTEL_NO_MACRO_BODY */754/** @endcond */755 756/**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 not760 * enabled)761 */762int LIBITTAPI __itt_event_end(__itt_event event);763 764/** @cond exclude_from_documentation */765#ifndef INTEL_NO_MACRO_BODY766#ifndef INTEL_NO_ITTNOTIFY_API767ITT_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)0772#define __itt_event_end_ptr 0773#endif /* INTEL_NO_ITTNOTIFY_API */774#else /* INTEL_NO_MACRO_BODY */775#define __itt_event_end_ptr 0776#endif /* INTEL_NO_MACRO_BODY */777/** @endcond */778/** @} legacy_events group */779#endif /* _ITTNOTIFY_H_ */780 781/**782 * @defgroup legacy_memory Memory Accesses783 * @ingroup legacy784 */785 786/**787 * @deprecated Legacy API788 * @brief Inform the tool of memory accesses on reading789 */790void LIBITTAPI __itt_memory_read(void *addr, size_t size);791 792/** @cond exclude_from_documentation */793#ifndef INTEL_NO_MACRO_BODY794#ifndef INTEL_NO_ITTNOTIFY_API795ITT_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 0801#endif /* INTEL_NO_ITTNOTIFY_API */802#else /* INTEL_NO_MACRO_BODY */803#define __itt_memory_read_ptr 0804#endif /* INTEL_NO_MACRO_BODY */805/** @endcond */806 807/**808 * @deprecated Legacy API809 * @brief Inform the tool of memory accesses on writing810 */811void LIBITTAPI __itt_memory_write(void *addr, size_t size);812 813/** @cond exclude_from_documentation */814#ifndef INTEL_NO_MACRO_BODY815#ifndef INTEL_NO_ITTNOTIFY_API816ITT_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 0822#endif /* INTEL_NO_ITTNOTIFY_API */823#else /* INTEL_NO_MACRO_BODY */824#define __itt_memory_write_ptr 0825#endif /* INTEL_NO_MACRO_BODY */826/** @endcond */827 828/**829 * @deprecated Legacy API830 * @brief Inform the tool of memory accesses on updating831 */832void LIBITTAPI __itt_memory_update(void *address, size_t size);833 834/** @cond exclude_from_documentation */835#ifndef INTEL_NO_MACRO_BODY836#ifndef INTEL_NO_ITTNOTIFY_API837ITT_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 0843#endif /* INTEL_NO_ITTNOTIFY_API */844#else /* INTEL_NO_MACRO_BODY */845#define __itt_memory_update_ptr 0846#endif /* INTEL_NO_MACRO_BODY */847/** @endcond */848/** @} legacy_memory group */849 850/**851 * @defgroup legacy_state Thread and Object States852 * @ingroup legacy853 */854 855/** @brief state type */856typedef int __itt_state_t;857 858/** @cond exclude_from_documentation */859typedef 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 = 3864} __itt_obj_state_t;865 866typedef enum __itt_thr_state {867 __itt_thr_state_err = 0,868 __itt_thr_state_clr = 1,869 __itt_thr_state_set = 2870} __itt_thr_state_t;871 872typedef enum __itt_obj_prop {873 __itt_obj_prop_watch = 1,874 __itt_obj_prop_ignore = 2,875 __itt_obj_prop_sharable = 3876} __itt_obj_prop_t;877 878typedef enum __itt_thr_prop { __itt_thr_prop_quiet = 1 } __itt_thr_prop_t;879/** @endcond */880 881/**882 * @deprecated Legacy API883 * @brief managing thread and object states884 */885__itt_state_t LIBITTAPI __itt_state_get(void);886 887/** @cond exclude_from_documentation */888#ifndef INTEL_NO_MACRO_BODY889#ifndef INTEL_NO_ITTNOTIFY_API890ITT_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)0895#define __itt_state_get_ptr 0896#endif /* INTEL_NO_ITTNOTIFY_API */897#else /* INTEL_NO_MACRO_BODY */898#define __itt_state_get_ptr 0899#endif /* INTEL_NO_MACRO_BODY */900/** @endcond */901 902/**903 * @deprecated Legacy API904 * @brief managing thread and object states905 */906__itt_state_t LIBITTAPI __itt_state_set(__itt_state_t s);907 908/** @cond exclude_from_documentation */909#ifndef INTEL_NO_MACRO_BODY910#ifndef INTEL_NO_ITTNOTIFY_API911ITT_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)0916#define __itt_state_set_ptr 0917#endif /* INTEL_NO_ITTNOTIFY_API */918#else /* INTEL_NO_MACRO_BODY */919#define __itt_state_set_ptr 0920#endif /* INTEL_NO_MACRO_BODY */921/** @endcond */922 923/**924 * @deprecated Legacy API925 * @brief managing thread and object modes926 */927__itt_thr_state_t LIBITTAPI __itt_thr_mode_set(__itt_thr_prop_t p,928 __itt_thr_state_t s);929 930/** @cond exclude_from_documentation */931#ifndef INTEL_NO_MACRO_BODY932#ifndef INTEL_NO_ITTNOTIFY_API933ITT_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)0939#define __itt_thr_mode_set_ptr 0940#endif /* INTEL_NO_ITTNOTIFY_API */941#else /* INTEL_NO_MACRO_BODY */942#define __itt_thr_mode_set_ptr 0943#endif /* INTEL_NO_MACRO_BODY */944/** @endcond */945 946/**947 * @deprecated Legacy API948 * @brief managing thread and object modes949 */950__itt_obj_state_t LIBITTAPI __itt_obj_mode_set(__itt_obj_prop_t p,951 __itt_obj_state_t s);952 953/** @cond exclude_from_documentation */954#ifndef INTEL_NO_MACRO_BODY955#ifndef INTEL_NO_ITTNOTIFY_API956ITT_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)0962#define __itt_obj_mode_set_ptr 0963#endif /* INTEL_NO_ITTNOTIFY_API */964#else /* INTEL_NO_MACRO_BODY */965#define __itt_obj_mode_set_ptr 0966#endif /* INTEL_NO_MACRO_BODY */967/** @endcond */968/** @} legacy_state group */969 970/**971 * @defgroup frames Frames972 * @ingroup legacy973 * Frames group974 * @{975 */976/**977 * @brief opaque structure for frame identification978 */979typedef struct __itt_frame_t *__itt_frame;980 981/**982 * @brief Create a global frame with given domain983 */984#if ITT_PLATFORM == ITT_PLATFORM_WIN985__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_createW989#define __itt_frame_create_ptr __itt_frame_createW_ptr990#else /* UNICODE */991#define __itt_frame_create __itt_frame_createA992#define __itt_frame_create_ptr __itt_frame_createA_ptr993#endif /* UNICODE */994#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */995__itt_frame ITTAPI __itt_frame_create(const char *domain);996#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */997 998/** @cond exclude_from_documentation */999#ifndef INTEL_NO_MACRO_BODY1000#ifndef INTEL_NO_ITTNOTIFY_API1001#if ITT_PLATFORM == ITT_PLATFORM_WIN1002ITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char *domain))1003ITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain))1004#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1005ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain))1006#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1007#if ITT_PLATFORM == ITT_PLATFORM_WIN1008#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_WIN1018#define __itt_frame_createA(domain)1019#define __itt_frame_createA_ptr 01020#define __itt_frame_createW(domain)1021#define __itt_frame_createW_ptr 01022#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1023#define __itt_frame_create(domain)1024#define __itt_frame_create_ptr 01025#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1026#endif /* INTEL_NO_ITTNOTIFY_API */1027#else /* INTEL_NO_MACRO_BODY */1028#if ITT_PLATFORM == ITT_PLATFORM_WIN1029#define __itt_frame_createA_ptr 01030#define __itt_frame_createW_ptr 01031#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1032#define __itt_frame_create_ptr 01033#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1034#endif /* INTEL_NO_MACRO_BODY */1035/** @endcond */1036 1037/** @brief Record a frame begin occurrence. */1038void ITTAPI __itt_frame_begin(__itt_frame frame);1039/** @brief Record a frame end occurrence. */1040void ITTAPI __itt_frame_end(__itt_frame frame);1041 1042/** @cond exclude_from_documentation */1043#ifndef INTEL_NO_MACRO_BODY1044#ifndef INTEL_NO_ITTNOTIFY_API1045ITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame))1046ITT_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 01054#define __itt_frame_end(frame)1055#define __itt_frame_end_ptr 01056#endif /* INTEL_NO_ITTNOTIFY_API */1057#else /* INTEL_NO_MACRO_BODY */1058#define __itt_frame_begin_ptr 01059#define __itt_frame_end_ptr 01060#endif /* INTEL_NO_MACRO_BODY */1061/** @endcond */1062/** @} frames group */1063 1064#ifdef __cplusplus1065}1066#endif /* __cplusplus */1067 1068#endif /* _LEGACY_ITTNOTIFY_H_ */1069