reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

projects/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.cpp
  122 ITT_EXTERN_C int _N_(init_ittlib)(const char*, __itt_group_id);
  123 static __itt_init_ittlib_t* __itt_init_ittlib_ptr = _N_(init_ittlib);
  131 ITT_EXTERN_C void _N_(fini_ittlib)(void);
  132 static __itt_fini_ittlib_t* __itt_fini_ittlib_ptr = _N_(fini_ittlib);
  231 __itt_global _N_(_ittapi_global) = {
  274     if (_N_(_ittapi_global).error_handler != NULL)
  276         __itt_error_handler_t* handler = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler;
  322 static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))(const char* name)
  332     ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
  333     if (_N_(_ittapi_global).api_initialized)
  342         if (ITTNOTIFY_NAME(domain_create) && ITTNOTIFY_NAME(domain_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init)))
  344             if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  349     for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next)
  355         NEW_DOMAIN_A(&_N_(_ittapi_global),h,h_tail,name);
  357     if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  394 static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))(const char* name)
  404     ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
  405     if (_N_(_ittapi_global).api_initialized)
  414         if (ITTNOTIFY_NAME(string_handle_create) && ITTNOTIFY_NAME(string_handle_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init)))
  416             if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  421     for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next)
  427         NEW_STRING_HANDLE_A(&_N_(_ittapi_global),h,h_tail,name);
  429     if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  469 static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create),_init))(const char *name, const char *domain)
  480     ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
  481     if (_N_(_ittapi_global).api_initialized)
  490         if (ITTNOTIFY_NAME(counter_create) && ITTNOTIFY_NAME(counter_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create),_init)))
  492             if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  497     for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)
  504        NEW_COUNTER_A(&_N_(_ittapi_global),h,h_tail,name,domain,type);
  506     if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  545 static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typed),_init))(const char *name, const char *domain, __itt_metadata_type type)
  555     ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
  556     if (_N_(_ittapi_global).api_initialized)
  565         if (ITTNOTIFY_NAME(counter_create_typed) && ITTNOTIFY_NAME(counter_create_typed) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typed),_init)))
  567             if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  572     for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)
  579        NEW_COUNTER_A(&_N_(_ittapi_global),h,h_tail,name,domain,type);
  581     if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
  587 static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))(void)
  589     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  589     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  593     if (ITTNOTIFY_NAME(pause) && ITTNOTIFY_NAME(pause) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init)))
  599         _N_(_ittapi_global).state = __itt_collection_paused;
  603 static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))(void)
  605     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  605     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  609     if (ITTNOTIFY_NAME(resume) && ITTNOTIFY_NAME(resume) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init)))
  615         _N_(_ittapi_global).state = __itt_collection_normal;
  641 static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(const char* name)
  644     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  644     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  654     if (ITTNOTIFY_NAME(thread_set_name) && ITTNOTIFY_NAME(thread_set_name) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init)))
  669 static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_set),_init))(const char* name, int namelen)
  672     ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(name);
  677 static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))(void)
  679     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  679     if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
  683     if (ITTNOTIFY_NAME(thread_ignore) && ITTNOTIFY_NAME(thread_ignore) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init)))
  689 static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_ignore),_init))(void)
  691     ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))();
  694 static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(enable_attach),_init))(void)
 1016     for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)
 1017         *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
 1017         *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
 1026 ITT_EXTERN_C void _N_(fini_ittlib)(void)
 1031     if (_N_(_ittapi_global).api_initialized)
 1033         ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
 1034         if (_N_(_ittapi_global).api_initialized)
 1039                 if (_N_(_ittapi_global).lib != NULL)
 1041                     __itt_api_fini_ptr = (__itt_api_fini_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, "__itt_api_fini");
 1045                     __itt_api_fini_ptr(&_N_(_ittapi_global));
 1055                 _N_(_ittapi_global).api_initialized = 0;
 1059         if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
 1063 ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_groups)
 1072     if (!_N_(_ittapi_global).api_initialized)
 1075         ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
 1078         if (!_N_(_ittapi_global).api_initialized)
 1090                     _N_(_ittapi_global).lib = __itt_load_lib((lib_name == NULL) ? ittnotify_lib_name : lib_name);
 1092                     if (_N_(_ittapi_global).lib != NULL)
 1095                         int lib_version = __itt_lib_version(_N_(_ittapi_global).lib);
 1103                             for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)
 1105                                 if (_N_(_ittapi_global).api_list_ptr[i].group & groups & init_groups)
 1107                                     *_N_(_ittapi_global).api_list_ptr[i].func_ptr = (void*)__itt_get_proc(_N_(_ittapi_global).lib, _N_(_ittapi_global).api_list_ptr[i].name);
 1107                                     *_N_(_ittapi_global).api_list_ptr[i].func_ptr = (void*)__itt_get_proc(_N_(_ittapi_global).lib, _N_(_ittapi_global).api_list_ptr[i].name);
 1107                                     *_N_(_ittapi_global).api_list_ptr[i].func_ptr = (void*)__itt_get_proc(_N_(_ittapi_global).lib, _N_(_ittapi_global).api_list_ptr[i].name);
 1108                                     if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr == NULL)
 1111                                         *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
 1111                                         *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
 1112                                         __itt_report_error(__itt_error_no_symbol, lib_name, _N_(_ittapi_global).api_list_ptr[i].name);
 1119                                     *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
 1119                                     *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
 1145                             __itt_api_init_ptr = (__itt_api_init_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, "__itt_api_init");
 1147                                 __itt_api_init_ptr(&_N_(_ittapi_global), init_groups);
 1168                 _N_(_ittapi_global).api_initialized = 1;
 1171                 if (__itt_fini_ittlib_ptr == _N_(fini_ittlib)) current_thread = 0;
 1176         if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
 1181     for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)
 1183         if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr != _N_(_ittapi_global).api_list_ptr[i].null_func &&
 1183         if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr != _N_(_ittapi_global).api_list_ptr[i].null_func &&
 1184             _N_(_ittapi_global).api_list_ptr[i].group & init_groups)
 1192 ITT_EXTERN_C __itt_error_handler_t* _N_(set_error_handler)(__itt_error_handler_t* handler)
 1194     __itt_error_handler_t* prev = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler;
 1195     _N_(_ittapi_global).error_handler = (void*)(size_t)handler;