Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
itt_notify.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2019 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 
17 
18 
19 */
20 
21 #if DO_ITT_NOTIFY
22 
23 #if _WIN32||_WIN64
24  #ifndef UNICODE
25  #define UNICODE
26  #endif
27 #else
28  #pragma weak dlopen
29  #pragma weak dlsym
30  #pragma weak dlerror
31 #endif /* WIN */
32 
33 #if __TBB_BUILD
34 
35 extern "C" void ITT_DoOneTimeInitialization();
36 #define __itt_init_ittlib_name(x,y) (ITT_DoOneTimeInitialization(), true)
37 
38 #elif __TBBMALLOC_BUILD
39 
40 extern "C" void MallocInitializeITT();
41 #define __itt_init_ittlib_name(x,y) (MallocInitializeITT(), true)
42 
43 #else
44 #error This file is expected to be used for either TBB or TBB allocator build.
45 #endif // __TBB_BUILD
46 
48 
49 namespace tbb {
50 namespace internal {
52 #if !(_WIN32||_WIN64)
53  // tool_api crashes without dlopen, check that it's present. Common case
54  // for lack of dlopen is static binaries, i.e. ones build with -static.
55  if (dlopen == NULL)
56  return 0;
57 #endif
58  return __itt_init_ittlib(NULL, // groups for:
59  (__itt_group_id)(__itt_group_sync // prepare/cancel/acquired/releasing
60  | __itt_group_thread // name threads
61  | __itt_group_stitch // stack stitching
63  ));
64 }
65 
66 }} // namespaces
67 
68 #endif /* DO_ITT_NOTIFY */
69 
70 #define __TBB_NO_IMPLICIT_LINKAGE 1
71 #include "itt_notify.h"
72 
73 namespace tbb {
74 
75 #if DO_ITT_NOTIFY
76  const tchar
77  *SyncType_GlobalLock = _T("TbbGlobalLock"),
78  *SyncType_Scheduler = _T("%Constant")
79  ;
80  const tchar
81  *SyncObj_SchedulerInitialization = _T("TbbSchedulerInitialization"),
82  *SyncObj_SchedulersList = _T("TbbSchedulersList"),
83  *SyncObj_WorkerLifeCycleMgmt = _T("TBB Scheduler"),
84  *SyncObj_TaskStealingLoop = _T("TBB Scheduler"),
85  *SyncObj_WorkerTaskPool = _T("TBB Scheduler"),
86  *SyncObj_MasterTaskPool = _T("TBB Scheduler"),
87  *SyncObj_TaskPoolSpinning = _T("TBB Scheduler"),
88  *SyncObj_Mailbox = _T("TBB Scheduler"),
89  *SyncObj_TaskReturnList = _T("TBB Scheduler"),
90  *SyncObj_TaskStream = _T("TBB Scheduler"),
91 #if __TBB_PREVIEW_CRITICAL_TASKS
92  *SyncObj_CriticalTaskStream = _T("TBB Scheduler"),
93 #endif
94  *SyncObj_ContextsList = _T("TBB Scheduler")
95  ;
96 #endif /* DO_ITT_NOTIFY */
97 
98 } // namespace tbb
99 
int __TBB_load_ittnotify()
The graph class.
#define _T(string_literal)
Standard Windows style macro to markup the string literals.
Definition: itt_notify.h:66
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT __itt_group_structure
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT __itt_group_sync
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark d __itt_event ITT_FORMAT __itt_group_mark d void const wchar_t const wchar_t int ITT_FORMAT __itt_group_sync __itt_group_fsync x void const wchar_t int const wchar_t int int ITT_FORMAT __itt_group_sync __itt_group_fsync x void ITT_FORMAT __itt_group_sync __itt_group_fsync p void ITT_FORMAT __itt_group_sync __itt_group_fsync p void size_t ITT_FORMAT lu no args __itt_obj_prop_t __itt_obj_state_t ITT_FORMAT d const char ITT_FORMAT s __itt_frame ITT_FORMAT p const char const char ITT_FORMAT s __itt_counter ITT_FORMAT p __itt_counter unsigned long long ITT_FORMAT lu const wchar_t ITT_FORMAT S __itt_mark_type const wchar_t ITT_FORMAT S __itt_mark_type const char ITT_FORMAT s __itt_mark_type ITT_FORMAT d __itt_caller ITT_FORMAT __itt_group_stitch
char tchar
Unicode support.
Definition: itt_notify.h:64
enum ___itt_group_id __itt_group_id

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.