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