itt_notify.h
Go to the documentation of this file.
/*
Copyright (c) 2005-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef _TBB_ITT_NOTIFY
#define _TBB_ITT_NOTIFY
#include "tbb/tbb_stddef.h"
#if DO_ITT_NOTIFY
#if _WIN32||_WIN64
#ifndef UNICODE
#define UNICODE
#endif
#endif /* WIN */
#ifndef INTEL_ITTNOTIFY_API_PRIVATE
#define INTEL_ITTNOTIFY_API_PRIVATE
#endif
#include "tools_api/ittnotify.h"
#include "tools_api/legacy/ittnotify.h"
extern "C" void __itt_fini_ittlib(void);
#if _WIN32||_WIN64
#undef _T
#endif /* WIN */
#endif /* DO_ITT_NOTIFY */
#if !ITT_CALLER_NULL
#define ITT_CALLER_NULL ((__itt_caller)0)
#endif
namespace tbb {
#if (_WIN32||_WIN64) && !__MINGW32__
typedef wchar_t tchar;
#define _T(string_literal) L ## string_literal
#else /* !WIN */
typedef char tchar;
#define _T(string_literal) string_literal
#endif /* !WIN */
} // namespace tbb
#if DO_ITT_NOTIFY
namespace tbb {
extern const tchar
*SyncType_GlobalLock,
*SyncType_Scheduler;
extern const tchar
*SyncObj_SchedulerInitialization,
*SyncObj_SchedulersList,
*SyncObj_WorkerLifeCycleMgmt,
*SyncObj_TaskStealingLoop,
*SyncObj_WorkerTaskPool,
*SyncObj_MasterTaskPool,
*SyncObj_TaskPoolSpinning,
*SyncObj_Mailbox,
*SyncObj_TaskReturnList,
*SyncObj_TaskStream,
#if __TBB_PREVIEW_CRITICAL_TASKS
*SyncObj_CriticalTaskStream,
#endif
*SyncObj_ContextsList
;
namespace internal {
void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void* obj, const tchar* name);
} // namespace internal
} // namespace tbb
// const_cast<void*>() is necessary to cast off volatility
#define ITT_NOTIFY(name,obj) __itt_##name(const_cast<void*>(static_cast<volatile void*>(obj)))
#define ITT_THREAD_SET_NAME(name) __itt_thread_set_name(name)
#define ITT_FINI_ITTLIB() __itt_fini_ittlib()
#define ITT_SYNC_CREATE(obj, type, name) __itt_sync_create((void*)(obj), type, name, 2)
#define ITT_SYNC_RENAME(obj, name) __itt_sync_rename(obj, name)
#define ITT_STACK_CREATE(obj) obj = __itt_stack_caller_create()
#if __TBB_TASK_GROUP_CONTEXT
#define ITT_STACK(precond, name, obj) (precond) ? __itt_stack_##name(obj) : ((void)0);
#else
#define ITT_STACK(precond, name, obj) ((void)0)
#endif /* !__TBB_TASK_GROUP_CONTEXT */
#define ITT_TASK_GROUP(obj,name,parent) itt_make_task_group_v7(internal::ITT_DOMAIN_MAIN,(void*)(obj),ALGORITHM,(void*)(parent),(parent!=NULL) ? ALGORITHM : FLOW_NULL,name)
#define ITT_TASK_BEGIN(obj,name,id) itt_task_begin_v7(internal::ITT_DOMAIN_MAIN,(void*)(id),ALGORITHM,(void*)(obj),ALGORITHM,name)
#define ITT_TASK_END itt_task_end_v7(internal::ITT_DOMAIN_MAIN)
#else /* !DO_ITT_NOTIFY */
#define ITT_NOTIFY(name,obj) ((void)0)
#define ITT_THREAD_SET_NAME(name) ((void)0)
#define ITT_FINI_ITTLIB() ((void)0)
#define ITT_SYNC_CREATE(obj, type, name) ((void)0)
#define ITT_SYNC_RENAME(obj, name) ((void)0)
#define ITT_STACK_CREATE(obj) ((void)0)
#define ITT_STACK(precond, name, obj) ((void)0)
#define ITT_TASK_GROUP(type,name,parent) ((void)0)
#define ITT_TASK_BEGIN(type,name,id) ((void)0)
#define ITT_TASK_END ((void)0)
#endif /* !DO_ITT_NOTIFY */
namespace tbb {
namespace internal {
int __TBB_load_ittnotify();
}}
#endif /* _TBB_ITT_NOTIFY */
__TBB_EXPORTED_FUNC
#define __TBB_EXPORTED_FUNC
Definition: scalable_allocator.h:38
tbb_stddef.h
ittnotify.h
name
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name
Definition: ittnotify_static.h:93
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::tchar
char tchar
Unicode support.
Definition: itt_notify.h:57
tbb::internal::__TBB_load_ittnotify
int __TBB_load_ittnotify()
tbb::internal::itt_set_sync_name_v3
void itt_set_sync_name_v3(void *obj, const tchar *name)
Definition: tbb_main.cpp:444
internal
Definition: _flow_graph_async_msg_impl.h:24
ittnotify.h
Legacy User API functions and types.

Copyright © 2005-2020 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.