Intel(R) Threading Building Blocks Doxygen Documentation version 4.2.3
ittnotify_static.c File Reference
#include "ittnotify_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "ittnotify.h"
#include "legacy/ittnotify.h"
#include "disable_warnings.h"
#include "ittnotify_static.h"
Include dependency graph for ittnotify_static.c:

Go to the source code of this file.

Classes

struct  ___itt_group_alias
 

Macros

#define PATH_MAX   512
 
#define INTEL_NO_MACRO_BODY
 
#define INTEL_ITTNOTIFY_API_PRIVATE
 
#define _N_(n)   ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)
 
#define LIB_VAR_NAME   INTEL_LIBITTNOTIFY64
 
#define ITT_MUTEX_INIT_AND_LOCK(p)
 
#define __itt_init_ittlib_name   __itt_init_ittlib_ptr
 
#define __itt_fini_ittlib_name   __itt_fini_ittlib_ptr
 
#define ITT_STUB(api, type, name, args, params, ptr, group, format)
 
#define ITT_STUBV(api, type, name, args, params, ptr, group, format)
 
#define ITT_STUB(api, type, name, args, params, ptr, group, format)
 
#define ITT_STUBV(api, type, name, args, params, ptr, group, format)
 
#define __ITT_INTERNAL_INIT
 
#define ITT_STUB(api, type, name, args, params, nameindll, group, format)   { ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (__itt_group_id)(group)},
 
#define ITT_STUBV   ITT_STUB
 
#define __ITT_INTERNAL_INIT
 
#define ITT_STUB(api, type, name, args, params, nameindll, group, format)   {ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), NULL, (__itt_group_id)(group)},
 
#define ITT_STUBV   ITT_STUB
 
#define __itt_report_error(code, ...)    __itt_report_error_impl((int)code,__VA_ARGS__)
 
#define MAX_ENV_VALUE_SIZE   4086
 
#define __itt_min(a, b)   ((a) < (b) ? (a) : (b))
 

Typedefs

typedef int() __itt_init_ittlib_t(const char *, __itt_group_id)
 
typedef void() __itt_fini_ittlib_t(void)
 
typedef struct ___itt_group_alias __itt_group_alias
 
typedef void() __itt_api_init_t(__itt_global *, __itt_group_id)
 
typedef void() __itt_api_fini_t(__itt_global *)
 

Functions

const int _N_ (err)=0
 
ITT_EXTERN_C int _N_() init_ittlib (const char *, __itt_group_id)
 
ITT_EXTERN_C void _N_() fini_ittlib (void)
 
__itt_global _N_ (_ittapi_global)
 
 ITT_GROUP_LIST (group_list)
 
static void __itt_report_error_impl (int code,...)
 
static __itt_domain *ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(domain_createW), _init)) const
 
static __itt_domain *ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(domain_createA), _init)) const
 
static __itt_string_handle *ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(string_handle_createW), _init)) const
 
static __itt_string_handle *ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(string_handle_createA), _init)) const
 
static __itt_counter ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(counter_createW), _init)) const
 
static __itt_counter ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(counter_createA), _init)) const
 
static __itt_counter ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(counter_create_typedW), _init)) const
 
static __itt_counter ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(counter_create_typedA), _init)) const
 
static void ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(pause), _init))
 
static void ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(resume), _init))
 
static void ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(thread_set_nameW), _init)) const
 
static int ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(thr_name_setW), _init)) const
 
static void ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(thread_set_nameA), _init)) const
 
static int ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(thr_name_setA), _init)) const
 
static void ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(thread_ignore), _init))
 
static void ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(thr_ignore), _init))
 
static void ITTAPI ITT_VERSIONIZE (ITT_JOIN(_N_(enable_attach), _init))
 
static const char * __itt_fsplit (const char *s, const char *sep, const char **out, int *len)
 
static const char * __itt_get_env_var (const char *name)
 
static const char * __itt_get_lib_name (void)
 
static __itt_group_id __itt_get_groups (void)
 
static int __itt_lib_version (lib_t lib)
 
static void __itt_nullify_all_pointers (void)
 
ITT_EXTERN_C __itt_error_handler_t *_N_() set_error_handler (__itt_error_handler_t *handler)
 
ITT_EXTERN_C void _N_() mark_pt_region_begin (__itt_pt_region region)
 
ITT_EXTERN_C void _N_() mark_pt_region_end (__itt_pt_region region)
 

Variables

static const char api_version [] = API_VERSION "\0\n@(#) $Revision$\n"
 
static const char * ittnotify_lib_name = "libittnotify.dll"
 
static __itt_init_ittlib_t__itt_init_ittlib_ptr = _N_(init_ittlib)
 
static __itt_fini_ittlib_t__itt_fini_ittlib_ptr = _N_(fini_ittlib)
 
static __itt_group_alias group_alias []
 
static __itt_api_info api_list []
 
static const char dll_path [PATH_MAX] = { 0 }
 

Macro Definition Documentation

◆ __itt_fini_ittlib_name

#define __itt_fini_ittlib_name   __itt_fini_ittlib_ptr

Definition at line 130 of file ittnotify_static.c.

◆ __itt_init_ittlib_name

#define __itt_init_ittlib_name   __itt_init_ittlib_ptr

Definition at line 121 of file ittnotify_static.c.

◆ __ITT_INTERNAL_INIT [1/2]

#define __ITT_INTERNAL_INIT

Definition at line 181 of file ittnotify_static.c.

◆ __ITT_INTERNAL_INIT [2/2]

#define __ITT_INTERNAL_INIT

Definition at line 181 of file ittnotify_static.c.

◆ __itt_min

#define __itt_min (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 942 of file ittnotify_static.c.

◆ __itt_report_error

#define __itt_report_error (   code,
  ... 
)     __itt_report_error_impl((int)code,__VA_ARGS__)

Definition at line 283 of file ittnotify_static.c.

◆ _N_

#define _N_ (   n)    ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)

Definition at line 40 of file ittnotify_static.c.

◆ INTEL_ITTNOTIFY_API_PRIVATE

#define INTEL_ITTNOTIFY_API_PRIVATE

Definition at line 32 of file ittnotify_static.c.

◆ INTEL_NO_MACRO_BODY

#define INTEL_NO_MACRO_BODY

Definition at line 31 of file ittnotify_static.c.

◆ ITT_MUTEX_INIT_AND_LOCK

#define ITT_MUTEX_INIT_AND_LOCK (   p)
Value:
{ \
{ \
if (!p.mutex_initialized) \
{ \
if (__itt_interlocked_increment(&p.atomic_counter) == 1) \
{ \
__itt_mutex_init(&p.mutex); \
p.mutex_initialized = 1; \
} \
else \
while (!p.mutex_initialized) \
__itt_thread_yield(); \
} \
__itt_mutex_lock(&p.mutex); \
} \
}
ITT_INLINE long __itt_interlocked_increment(volatile long *ptr) ITT_INLINE_ATTRIBUTE
#define PTHREAD_SYMBOLS
void const char const char int ITT_FORMAT __itt_group_sync p

Definition at line 95 of file ittnotify_static.c.

◆ ITT_STUB [1/4]

#define ITT_STUB (   api,
  type,
  name,
  args,
  params,
  nameindll,
  group,
  format 
)    { ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (__itt_group_id)(group)},

Definition at line 171 of file ittnotify_static.c.

◆ ITT_STUB [2/4]

#define ITT_STUB (   api,
  type,
  name,
  args,
  params,
  nameindll,
  group,
  format 
)    {ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), NULL, (__itt_group_id)(group)},

Definition at line 171 of file ittnotify_static.c.

◆ ITT_STUB [3/4]

#define ITT_STUB (   api,
  type,
  name,
  args,
  params,
  ptr,
  group,
  format 
)
Value:
static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\
typedef type api ITT_JOIN(_N_(name),_t) args; \
ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END \
static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \
{ \
if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) \
__itt_init_ittlib_name(NULL, __itt_group_all); \
if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \
return ITTNOTIFY_NAME(name) params; \
else \
return (type)0; \
}
@ __itt_group_all
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name
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_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
#define _N_(n)
static __itt_domain *ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW), _init)) const

Definition at line 171 of file ittnotify_static.c.

◆ ITT_STUB [4/4]

#define ITT_STUB (   api,
  type,
  name,
  args,
  params,
  ptr,
  group,
  format 
)
Value:
static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\
typedef type api ITT_JOIN(_N_(name),_t) args; \
ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END
#define ITT_EXTERN_C_END

Definition at line 171 of file ittnotify_static.c.

◆ ITT_STUBV [1/4]

#define ITT_STUBV (   api,
  type,
  name,
  args,
  params,
  ptr,
  group,
  format 
)
Value:
static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\
typedef type api ITT_JOIN(_N_(name),_t) args; \
ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END \
static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \
{ \
if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) \
__itt_init_ittlib_name(NULL, __itt_group_all); \
if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \
ITTNOTIFY_NAME(name) params; \
else \
return; \
}

Definition at line 176 of file ittnotify_static.c.

◆ ITT_STUBV [2/4]

#define ITT_STUBV (   api,
  type,
  name,
  args,
  params,
  ptr,
  group,
  format 
)
Value:
static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\
typedef type api ITT_JOIN(_N_(name),_t) args; \
ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END

Definition at line 176 of file ittnotify_static.c.

◆ ITT_STUBV [3/4]

#define ITT_STUBV   ITT_STUB

Definition at line 176 of file ittnotify_static.c.

◆ ITT_STUBV [4/4]

#define ITT_STUBV   ITT_STUB

Definition at line 176 of file ittnotify_static.c.

◆ LIB_VAR_NAME

#define LIB_VAR_NAME   INTEL_LIBITTNOTIFY64

Definition at line 91 of file ittnotify_static.c.

◆ MAX_ENV_VALUE_SIZE

#define MAX_ENV_VALUE_SIZE   4086

◆ PATH_MAX

#define PATH_MAX   512

Definition at line 20 of file ittnotify_static.c.

Typedef Documentation

◆ __itt_api_fini_t

typedef void() __itt_api_fini_t(__itt_global *)

Definition at line 255 of file ittnotify_static.c.

◆ __itt_api_init_t

typedef void() __itt_api_init_t(__itt_global *, __itt_group_id)

Definition at line 254 of file ittnotify_static.c.

◆ __itt_fini_ittlib_t

typedef void() __itt_fini_ittlib_t(void)

Definition at line 124 of file ittnotify_static.c.

◆ __itt_group_alias

◆ __itt_init_ittlib_t

typedef int() __itt_init_ittlib_t(const char *, __itt_group_id)

Definition at line 115 of file ittnotify_static.c.

Function Documentation

◆ __itt_fsplit()

static const char * __itt_fsplit ( const char *  s,
const char *  sep,
const char **  out,
int len 
)
static

Definition at line 709 of file ittnotify_static.c.

710{
711 int i;
712 int j;
713
714 if (!s || !sep || !out || !len)
715 return NULL;
716
717 for (i = 0; s[i]; i++)
718 {
719 int b = 0;
720 for (j = 0; sep[j]; j++)
721 if (s[i] == sep[j])
722 {
723 b = 1;
724 break;
725 }
726 if (!b)
727 break;
728 }
729
730 if (!s[i])
731 return NULL;
732
733 *len = 0;
734 *out = &s[i];
735
736 for (; s[i]; i++, (*len)++)
737 {
738 int b = 0;
739 for (j = 0; sep[j]; j++)
740 if (s[i] == sep[j])
741 {
742 b = 1;
743 break;
744 }
745 if (b)
746 break;
747 }
748
749 for (; s[i]; i++)
750 {
751 int b = 0;
752 for (j = 0; sep[j]; j++)
753 if (s[i] == sep[j])
754 {
755 b = 1;
756 break;
757 }
758 if (!b)
759 break;
760 }
761
762 return &s[i];
763}
void const char const char int ITT_FORMAT __itt_group_sync s

References s.

Referenced by __itt_get_groups().

Here is the caller graph for this function:

◆ __itt_get_env_var()

static const char * __itt_get_env_var ( const char *  name)
static

Definition at line 770 of file ittnotify_static.c.

771{
772#define MAX_ENV_VALUE_SIZE 4086
773 static char env_buff[MAX_ENV_VALUE_SIZE];
774 static char* env_value = (char*)env_buff;
775
776 if (name != NULL)
777 {
778#if ITT_PLATFORM==ITT_PLATFORM_WIN
779 size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff);
780 DWORD rc = GetEnvironmentVariableA(name, env_value, (DWORD)max_len);
781 if (rc >= max_len)
782 __itt_report_error(__itt_error_env_too_long, name, (size_t)rc - 1, (size_t)(max_len - 1));
783 else if (rc > 0)
784 {
785 const char* ret = (const char*)env_value;
786 env_value += rc + 1;
787 return ret;
788 }
789 else
790 {
791 /* If environment variable is empty, GetEnvirornmentVariables()
792 * returns zero (number of characters (not including terminating null),
793 * and GetLastError() returns ERROR_SUCCESS. */
794 DWORD err = GetLastError();
795 if (err == ERROR_SUCCESS)
796 return env_value;
797
798 if (err != ERROR_ENVVAR_NOT_FOUND)
799 __itt_report_error(__itt_error_cant_read_env, name, (int)err);
800 }
801#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */
802 char* env = getenv(name);
803 if (env != NULL)
804 {
805 size_t len = __itt_fstrnlen(env, MAX_ENV_VALUE_SIZE);
806 size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff);
807 if (len < max_len)
808 {
809 const char* ret = (const char*)env_value;
810 __itt_fstrcpyn(env_value, max_len, env, len + 1);
811 env_value += len + 1;
812 return ret;
813 } else
814 __itt_report_error(__itt_error_env_too_long, name, (size_t)len, (size_t)(max_len - 1));
815 }
816#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
817 }
818 return NULL;
819}
#define __itt_fstrnlen(s, l)
#define __itt_fstrcpyn(s1, b, s2, l)
#define MAX_ENV_VALUE_SIZE
#define __itt_report_error(code,...)

References __itt_fstrcpyn, __itt_fstrnlen, __itt_report_error, MAX_ENV_VALUE_SIZE, and name.

Referenced by __itt_get_groups(), and __itt_get_lib_name().

Here is the caller graph for this function:

◆ __itt_get_groups()

static __itt_group_id __itt_get_groups ( void  )
static

Definition at line 944 of file ittnotify_static.c.

945{
946 int i;
948 const char* var_name = "INTEL_ITTNOTIFY_GROUPS";
949 const char* group_str = __itt_get_env_var(var_name);
950
951 if (group_str != NULL)
952 {
953 int len;
954 char gr[255];
955 const char* chunk;
956 while ((group_str = __itt_fsplit(group_str, ",; ", &chunk, &len)) != NULL)
957 {
958 int min_len = __itt_min(len, (int)(sizeof(gr) - 1));
959 __itt_fstrcpyn(gr, sizeof(gr) - 1, chunk, min_len);
960 gr[min_len] = 0;
961
962 for (i = 0; group_list[i].name != NULL; i++)
963 {
964 if (!__itt_fstrcmp(gr, group_list[i].name))
965 {
966 res = (__itt_group_id)(res | group_list[i].id);
967 break;
968 }
969 }
970 }
971 /* TODO: !!! Workaround for bug with warning for unknown group !!!
972 * Should be fixed in new initialization scheme.
973 * Now the following groups should be set always. */
974 for (i = 0; group_list[i].id != __itt_group_none; i++)
975 if (group_list[i].id != __itt_group_all &&
976 group_list[i].id > __itt_group_splitter_min &&
977 group_list[i].id < __itt_group_splitter_max)
978 res = (__itt_group_id)(res | group_list[i].id);
979 return res;
980 }
981 else
982 {
983 for (i = 0; group_alias[i].env_var != NULL; i++)
984 if (__itt_get_env_var(group_alias[i].env_var) != NULL)
985 return group_alias[i].groups;
986 }
987
988 return res;
989}
#define __itt_fstrcmp(s1, s2)
@ __itt_group_splitter_max
@ __itt_group_splitter_min
enum ___itt_group_id __itt_group_id
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_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 const char ITT_FORMAT s __itt_frame ITT_FORMAT p __itt_counter ITT_FORMAT p __itt_counter unsigned long long ITT_FORMAT lu __itt_counter unsigned long long ITT_FORMAT lu __itt_counter __itt_clock_domain unsigned long long void ITT_FORMAT p 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 p __itt_caller ITT_FORMAT p no args const __itt_domain __itt_clock_domain unsigned long long __itt_id ITT_FORMAT lu const __itt_domain __itt_clock_domain unsigned long long __itt_id __itt_id void ITT_FORMAT p const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_clock_domain unsigned long long __itt_id __itt_string_handle __itt_scope ITT_FORMAT d const __itt_domain __itt_scope __itt_string_handle const char size_t ITT_FORMAT lu const __itt_domain __itt_clock_domain unsigned long long __itt_relation __itt_id ITT_FORMAT lu __itt_track_group __itt_string_handle __itt_track_group_type ITT_FORMAT d __itt_track ITT_FORMAT p void int const int int const char int ITT_FORMAT d void void const char ITT_FORMAT __itt_group_none
static __itt_group_alias group_alias[]
static const char * __itt_get_env_var(const char *name)
#define __itt_min(a, b)
static const char * __itt_fsplit(const char *s, const char *sep, const char **out, int *len)

References __itt_fsplit(), __itt_fstrcmp, __itt_fstrcpyn, __itt_get_env_var(), __itt_group_all, __itt_group_none, __itt_group_splitter_max, __itt_group_splitter_min, __itt_min, ___itt_group_alias::env_var, group_alias, and name.

Referenced by init_ittlib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __itt_get_lib_name()

static const char * __itt_get_lib_name ( void  )
static

Definition at line 821 of file ittnotify_static.c.

822{
823 const char* lib_name = __itt_get_env_var(ITT_TO_STR(LIB_VAR_NAME));
824
825#ifdef __ANDROID__
826 if (lib_name == NULL)
827 {
828
829#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM
830 const char* const marker_filename = "com.intel.itt.collector_lib_32";
831#else
832 const char* const marker_filename = "com.intel.itt.collector_lib_64";
833#endif
834
835 char system_wide_marker_filename[PATH_MAX] = {0};
836 int itt_marker_file_fd = -1;
837 ssize_t res = 0;
838
839 res = snprintf(system_wide_marker_filename, PATH_MAX - 1, "%s%s", "/data/local/tmp/", marker_filename);
840 if (res < 0)
841 {
842 ITT_ANDROID_LOGE("Unable to concatenate marker file string.");
843 return lib_name;
844 }
845 itt_marker_file_fd = open(system_wide_marker_filename, O_RDONLY);
846
847 if (itt_marker_file_fd == -1)
848 {
849 const pid_t my_pid = getpid();
850 char cmdline_path[PATH_MAX] = {0};
851 char package_name[PATH_MAX] = {0};
852 char app_sandbox_file[PATH_MAX] = {0};
853 int cmdline_fd = 0;
854
855 ITT_ANDROID_LOGI("Unable to open system-wide marker file.");
856 res = snprintf(cmdline_path, PATH_MAX - 1, "/proc/%d/cmdline", my_pid);
857 if (res < 0)
858 {
859 ITT_ANDROID_LOGE("Unable to get cmdline path string.");
860 return lib_name;
861 }
862
863 ITT_ANDROID_LOGI("CMD file: %s\n", cmdline_path);
864 cmdline_fd = open(cmdline_path, O_RDONLY);
865 if (cmdline_fd == -1)
866 {
867 ITT_ANDROID_LOGE("Unable to open %s file!", cmdline_path);
868 return lib_name;
869 }
870 res = read(cmdline_fd, package_name, PATH_MAX - 1);
871 if (res == -1)
872 {
873 ITT_ANDROID_LOGE("Unable to read %s file!", cmdline_path);
874 res = close(cmdline_fd);
875 if (res == -1)
876 {
877 ITT_ANDROID_LOGE("Unable to close %s file!", cmdline_path);
878 }
879 return lib_name;
880 }
881 res = close(cmdline_fd);
882 if (res == -1)
883 {
884 ITT_ANDROID_LOGE("Unable to close %s file!", cmdline_path);
885 return lib_name;
886 }
887 ITT_ANDROID_LOGI("Package name: %s\n", package_name);
888 res = snprintf(app_sandbox_file, PATH_MAX - 1, "/data/data/%s/%s", package_name, marker_filename);
889 if (res < 0)
890 {
891 ITT_ANDROID_LOGE("Unable to concatenate marker file string.");
892 return lib_name;
893 }
894
895 ITT_ANDROID_LOGI("Lib marker file name: %s\n", app_sandbox_file);
896 itt_marker_file_fd = open(app_sandbox_file, O_RDONLY);
897 if (itt_marker_file_fd == -1)
898 {
899 ITT_ANDROID_LOGE("Unable to open app marker file!");
900 return lib_name;
901 }
902 }
903
904 {
905 char itt_lib_name[PATH_MAX] = {0};
906
907 res = read(itt_marker_file_fd, itt_lib_name, PATH_MAX - 1);
908 if (res == -1)
909 {
910 ITT_ANDROID_LOGE("Unable to read %s file!", itt_marker_file_fd);
911 res = close(itt_marker_file_fd);
912 if (res == -1)
913 {
914 ITT_ANDROID_LOGE("Unable to close %s file!", itt_marker_file_fd);
915 }
916 return lib_name;
917 }
918 ITT_ANDROID_LOGI("ITT Lib path: %s", itt_lib_name);
919 res = close(itt_marker_file_fd);
920 if (res == -1)
921 {
922 ITT_ANDROID_LOGE("Unable to close %s file!", itt_marker_file_fd);
923 return lib_name;
924 }
925 ITT_ANDROID_LOGI("Set env %s to %s", ITT_TO_STR(LIB_VAR_NAME), itt_lib_name);
926 res = setenv(ITT_TO_STR(LIB_VAR_NAME), itt_lib_name, 0);
927 if (res == -1)
928 {
929 ITT_ANDROID_LOGE("Unable to set env var!");
930 return lib_name;
931 }
933 ITT_ANDROID_LOGI("ITT Lib path from env: %s", lib_name);
934 }
935 }
936#endif
937
938 return lib_name;
939}
#define ITT_TO_STR(x)
#define LIB_VAR_NAME
#define PATH_MAX

References __itt_get_env_var(), ITT_TO_STR, LIB_VAR_NAME, and PATH_MAX.

Referenced by init_ittlib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __itt_lib_version()

static int __itt_lib_version ( lib_t  lib)
static

Definition at line 993 of file ittnotify_static.c.

994{
995 if (lib == NULL)
996 return 0;
997 if (__itt_get_proc(lib, "__itt_api_init"))
998 return 2;
999 if (__itt_get_proc(lib, "__itt_api_version"))
1000 return 1;
1001 return 0;
1002}
#define __itt_get_proc(lib, name)

References __itt_get_proc.

Referenced by init_ittlib().

Here is the caller graph for this function:

◆ __itt_nullify_all_pointers()

static void __itt_nullify_all_pointers ( void  )
static

Definition at line 1014 of file ittnotify_static.c.

1015{
1016 int i;
1017 /* Nulify all pointers except domain_create, string_handle_create and counter_create */
1018 for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)
1019 *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
1020}

References _N_.

Referenced by fini_ittlib(), and init_ittlib().

Here is the caller graph for this function:

◆ __itt_report_error_impl()

static void __itt_report_error_impl ( int  code,
  ... 
)
static

Definition at line 268 of file ittnotify_static.c.

268 {
269 va_list args;
270 va_start(args, code);
271 if (_N_(_ittapi_global).error_handler != NULL)
272 {
273 __itt_error_handler_t* handler = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler;
274 handler((__itt_error_code)code, args);
275 }
276#ifdef ITT_NOTIFY_EXT_REPORT
277 _N_(error_handler)(code, args);
278#endif /* ITT_NOTIFY_EXT_REPORT */
279 va_end(args);
280}

References _N_.

◆ _N_() [1/2]

__itt_global _N_ ( _ittapi_global  )
Initial value:
= {
ITT_MAJOR, ITT_MINOR, API_VERSION_BUILD,
0,
0,
0,
NULL,
NULL,
(const char**)&dll_path,
NULL,
NULL,
NULL,
NULL,
NULL,
0
}
#define MUTEX_INITIALIZER
@ __itt_collection_normal
#define ITT_MAGIC
#define API_VERSION_BUILD
static const char dll_path[PATH_MAX]
static __itt_api_info api_list[]

◆ _N_() [2/2]

const int _N_ ( err  )
pure virtual

◆ fini_ittlib()

ITT_EXTERN_C void _N_() fini_ittlib ( void  )

Definition at line 1028 of file ittnotify_static.c.

1029{
1030 __itt_api_fini_t* __itt_api_fini_ptr = NULL;
1031 static volatile TIDT current_thread = 0;
1032
1033 if (_N_(_ittapi_global).api_initialized)
1034 {
1035 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
1036 if (_N_(_ittapi_global).api_initialized)
1037 {
1038 if (current_thread == 0)
1039 {
1040 if (PTHREAD_SYMBOLS) current_thread = __itt_thread_id();
1041 if (_N_(_ittapi_global).lib != NULL)
1042 {
1043 __itt_api_fini_ptr = (__itt_api_fini_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, "__itt_api_fini");
1044 }
1045 if (__itt_api_fini_ptr)
1046 {
1047 __itt_api_fini_ptr(&_N_(_ittapi_global));
1048 }
1049
1051
1052 /* TODO: !!! not safe !!! don't support unload so far.
1053 * if (_N_(_ittapi_global).lib != NULL)
1054 * __itt_unload_lib(_N_(_ittapi_global).lib);
1055 * _N_(_ittapi_global).lib = NULL;
1056 */
1057 _N_(_ittapi_global).api_initialized = 0;
1058 current_thread = 0;
1059 }
1060 }
1061 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
1062 }
1063}
DWORD TIDT
#define __itt_mutex_unlock(mutex)
#define __itt_thread_id()
#define ITT_MUTEX_INIT_AND_LOCK(p)
static void __itt_nullify_all_pointers(void)
void() __itt_api_fini_t(__itt_global *)

References __itt_get_proc, __itt_mutex_unlock, __itt_nullify_all_pointers(), __itt_thread_id, _N_, ITT_MUTEX_INIT_AND_LOCK, and PTHREAD_SYMBOLS.

Referenced by init_ittlib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_ittlib()

ITT_EXTERN_C int _N_() init_ittlib ( const char *  lib_name,
__itt_group_id  init_groups 
)

Definition at line 1065 of file ittnotify_static.c.

1066{
1067 int i;
1068 __itt_group_id groups;
1069#ifdef ITT_COMPLETE_GROUP
1070 __itt_group_id zero_group = __itt_group_none;
1071#endif /* ITT_COMPLETE_GROUP */
1072 static volatile TIDT current_thread = 0;
1073
1074 if (!_N_(_ittapi_global).api_initialized)
1075 {
1076#ifndef ITT_SIMPLE_INIT
1077 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
1078#endif /* ITT_SIMPLE_INIT */
1079
1080 if (!_N_(_ittapi_global).api_initialized)
1081 {
1082 if (current_thread == 0)
1083 {
1084 if (PTHREAD_SYMBOLS) current_thread = __itt_thread_id();
1085 if (lib_name == NULL)
1086 {
1087 lib_name = __itt_get_lib_name();
1088 }
1089 groups = __itt_get_groups();
1090 if (DL_SYMBOLS && (groups != __itt_group_none || lib_name != NULL))
1091 {
1092 _N_(_ittapi_global).lib = __itt_load_lib((lib_name == NULL) ? ittnotify_lib_name : lib_name);
1093
1094 if (_N_(_ittapi_global).lib != NULL)
1095 {
1096 __itt_api_init_t* __itt_api_init_ptr;
1097 int lib_version = __itt_lib_version(_N_(_ittapi_global).lib);
1098
1099 switch (lib_version) {
1100 case 0:
1101 groups = __itt_group_legacy;
1102 /* Falls through */
1103 case 1:
1104 /* Fill all pointers from dynamic library */
1105 for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)
1106 {
1107 if (_N_(_ittapi_global).api_list_ptr[i].group & groups & init_groups)
1108 {
1109 *_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);
1110 if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr == NULL)
1111 {
1112 /* Restore pointers for function with static implementation */
1113 *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
1114 __itt_report_error(__itt_error_no_symbol, lib_name, _N_(_ittapi_global).api_list_ptr[i].name);
1115#ifdef ITT_COMPLETE_GROUP
1116 zero_group = (__itt_group_id)(zero_group | _N_(_ittapi_global).api_list_ptr[i].group);
1117#endif /* ITT_COMPLETE_GROUP */
1118 }
1119 }
1120 else
1121 *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
1122 }
1123
1124 if (groups == __itt_group_legacy)
1125 {
1126 /* Compatibility with legacy tools */
1127 ITTNOTIFY_NAME(thread_ignore) = ITTNOTIFY_NAME(thr_ignore);
1128#if ITT_PLATFORM==ITT_PLATFORM_WIN
1129 ITTNOTIFY_NAME(sync_createA) = ITTNOTIFY_NAME(sync_set_nameA);
1130 ITTNOTIFY_NAME(sync_createW) = ITTNOTIFY_NAME(sync_set_nameW);
1131#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */
1132 ITTNOTIFY_NAME(sync_create) = ITTNOTIFY_NAME(sync_set_name);
1133#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1134 ITTNOTIFY_NAME(sync_prepare) = ITTNOTIFY_NAME(notify_sync_prepare);
1135 ITTNOTIFY_NAME(sync_cancel) = ITTNOTIFY_NAME(notify_sync_cancel);
1136 ITTNOTIFY_NAME(sync_acquired) = ITTNOTIFY_NAME(notify_sync_acquired);
1137 ITTNOTIFY_NAME(sync_releasing) = ITTNOTIFY_NAME(notify_sync_releasing);
1138 }
1139
1140#ifdef ITT_COMPLETE_GROUP
1141 for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)
1142 if (_N_(_ittapi_global).api_list_ptr[i].group & zero_group)
1143 *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func;
1144#endif /* ITT_COMPLETE_GROUP */
1145 break;
1146 case 2:
1147 __itt_api_init_ptr = (__itt_api_init_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, "__itt_api_init");
1148 if (__itt_api_init_ptr)
1149 __itt_api_init_ptr(&_N_(_ittapi_global), init_groups);
1150 break;
1151 }
1152 }
1153 else
1154 {
1156
1157#if ITT_PLATFORM==ITT_PLATFORM_WIN
1158 int error = __itt_system_error();
1159#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1160 const char* error = dlerror();
1161#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
1162 __itt_report_error(__itt_error_no_module, lib_name, error);
1163 }
1164 }
1165 else
1166 {
1168 }
1169 _N_(_ittapi_global).api_initialized = 1;
1170 current_thread = 0;
1171 /* !!! Just to avoid unused code elimination !!! */
1172 if (__itt_fini_ittlib_ptr == _N_(fini_ittlib)) current_thread = 0;
1173 }
1174 }
1175
1176#ifndef ITT_SIMPLE_INIT
1177 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
1178#endif /* ITT_SIMPLE_INIT */
1179 }
1180
1181 /* Evaluating if any function ptr is non empty and it's in init_groups */
1182 for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)
1183 {
1184 if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr != _N_(_ittapi_global).api_list_ptr[i].null_func &&
1185 _N_(_ittapi_global).api_list_ptr[i].group & init_groups)
1186 {
1187 return 1;
1188 }
1189 }
1190 return 0;
1191}
#define __itt_system_error()
#define DL_SYMBOLS
#define __itt_load_lib(name)
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_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 sync_set_nameW
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 sync_cancel
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_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 notify_sync_cancel
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_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 __itt_group_legacy
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_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 notify_sync_releasing
sync_createA
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 sync_releasing
static __itt_fini_ittlib_t * __itt_fini_ittlib_ptr
static __itt_group_id __itt_get_groups(void)
ITT_EXTERN_C void _N_() fini_ittlib(void)
static const char * __itt_get_lib_name(void)
void() __itt_api_init_t(__itt_global *, __itt_group_id)
static const char * ittnotify_lib_name
static int __itt_lib_version(lib_t lib)

References __itt_fini_ittlib_ptr, __itt_get_groups(), __itt_get_lib_name(), __itt_get_proc, __itt_group_legacy, __itt_group_none, __itt_lib_version(), __itt_load_lib, __itt_mutex_unlock, __itt_nullify_all_pointers(), __itt_report_error, __itt_system_error, __itt_thread_id, _N_, DL_SYMBOLS, fini_ittlib(), ITT_MUTEX_INIT_AND_LOCK, ittnotify_lib_name, name, notify_sync_cancel, notify_sync_releasing, PTHREAD_SYMBOLS, sync_cancel, sync_createA, sync_releasing, and sync_set_nameW.

Here is the call graph for this function:

◆ ITT_GROUP_LIST()

ITT_GROUP_LIST ( group_list  )

◆ ITT_VERSIONIZE() [1/17]

static __itt_counter ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(counter_create_typedA), _init)  ) const
static

Definition at line 545 of file ittnotify_static.c.

549{
550 __itt_counter_info_t *h_tail = NULL, *h = NULL;
551
552 if (name == NULL)
553 {
554 return NULL;
555 }
556
557 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
558 if (_N_(_ittapi_global).api_initialized)
559 {
560#if ITT_PLATFORM==ITT_PLATFORM_WIN
561 if (ITTNOTIFY_NAME(counter_create_typedA) && ITTNOTIFY_NAME(counter_create_typedA) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typedA),_init)))
562 {
563 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
564 return ITTNOTIFY_NAME(counter_create_typedA)(name, domain, type);
565 }
566#else
567 if (ITTNOTIFY_NAME(counter_create_typed) && ITTNOTIFY_NAME(counter_create_typed) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typed),_init)))
568 {
569 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
570 return ITTNOTIFY_NAME(counter_create_typed)(name, domain, type);
571 }
572#endif
573 }
574 for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)
575 {
576 if (h->nameA != NULL && h->type == type && !__itt_fstrcmp(h->nameA, name) && ((h->domainA == NULL && domain == NULL) ||
577 (h->domainA != NULL && domain != NULL && !__itt_fstrcmp(h->domainA, domain)))) break;
578 }
579 if (h == NULL)
580 {
581 NEW_COUNTER_A(&_N_(_ittapi_global),h,h_tail,name,domain,type);
582 }
583 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
584 return (__itt_counter)h;
585}
#define NEW_COUNTER_A(gptr, h, h_tail, name, domain, type)
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 * domain
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 h

References __itt_fstrcmp, __itt_mutex_unlock, _N_, domain, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, NEW_COUNTER_A, PTHREAD_SYMBOLS, and type.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [2/17]

static __itt_counter ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(counter_create_typedW), _init)  ) const
static

Definition at line 513 of file ittnotify_static.c.

514{
515 __itt_counter_info_t *h_tail = NULL, *h = NULL;
516
517 if (name == NULL)
518 {
519 return NULL;
520 }
521
522 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
523 if (_N_(_ittapi_global).api_initialized)
524 {
525 if (ITTNOTIFY_NAME(counter_create_typedW) && ITTNOTIFY_NAME(counter_create_typedW) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typedW),_init)))
526 {
527 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
528 return ITTNOTIFY_NAME(counter_create_typedW)(name, domain, type);
529 }
530 }
531 for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)
532 {
533 if (h->nameW != NULL && h->type == type && !wcscmp(h->nameW, name) && ((h->domainW == NULL && domain == NULL) ||
534 (h->domainW != NULL && domain != NULL && !wcscmp(h->domainW, domain)))) break;
535
536 }
537 if (h == NULL)
538 {
539 NEW_COUNTER_W(&_N_(_ittapi_global),h,h_tail,name,domain,type);
540 }
541 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
542 return (__itt_counter)h;
543}
#define NEW_COUNTER_W(gptr, h, h_tail, name, domain, type)

References __itt_mutex_unlock, _N_, domain, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, NEW_COUNTER_W, and type.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [3/17]

static __itt_counter ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(counter_createA), _init)  ) const
static

Definition at line 469 of file ittnotify_static.c.

473{
474 __itt_counter_info_t *h_tail = NULL, *h = NULL;
476
477 if (name == NULL)
478 {
479 return NULL;
480 }
481
482 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
483 if (_N_(_ittapi_global).api_initialized)
484 {
485#if ITT_PLATFORM==ITT_PLATFORM_WIN
486 if (ITTNOTIFY_NAME(counter_createA) && ITTNOTIFY_NAME(counter_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createA),_init)))
487 {
488 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
489 return ITTNOTIFY_NAME(counter_createA)(name, domain);
490 }
491#else
492 if (ITTNOTIFY_NAME(counter_create) && ITTNOTIFY_NAME(counter_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create),_init)))
493 {
494 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
495 return ITTNOTIFY_NAME(counter_create)(name, domain);
496 }
497#endif
498 }
499 for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)
500 {
501 if (h->nameA != NULL && h->type == type && !__itt_fstrcmp(h->nameA, name) && ((h->domainA == NULL && domain == NULL) ||
502 (h->domainA != NULL && domain != NULL && !__itt_fstrcmp(h->domainA, domain)))) break;
503 }
504 if (h == NULL)
505 {
506 NEW_COUNTER_A(&_N_(_ittapi_global),h,h_tail,name,domain,type);
507 }
508 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
509 return (__itt_counter)h;
510}
__itt_metadata_type
describes the type of metadata
Definition: ittnotify.h:2403
@ __itt_metadata_u64
Definition: ittnotify.h:2405

References __itt_fstrcmp, __itt_metadata_u64, __itt_mutex_unlock, _N_, domain, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, NEW_COUNTER_A, PTHREAD_SYMBOLS, and type.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [4/17]

static __itt_counter ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(counter_createW), _init)  ) const
static

Definition at line 436 of file ittnotify_static.c.

437{
438 __itt_counter_info_t *h_tail = NULL, *h = NULL;
440
441 if (name == NULL)
442 {
443 return NULL;
444 }
445
446 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
447 if (_N_(_ittapi_global).api_initialized)
448 {
449 if (ITTNOTIFY_NAME(counter_createW) && ITTNOTIFY_NAME(counter_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW),_init)))
450 {
451 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
452 return ITTNOTIFY_NAME(counter_createW)(name, domain);
453 }
454 }
455 for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next)
456 {
457 if (h->nameW != NULL && h->type == type && !wcscmp(h->nameW, name) && ((h->domainW == NULL && domain == NULL) ||
458 (h->domainW != NULL && domain != NULL && !wcscmp(h->domainW, domain)))) break;
459
460 }
461 if (h == NULL)
462 {
463 NEW_COUNTER_W(&_N_(_ittapi_global),h,h_tail,name,domain,type);
464 }
465 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
466 return (__itt_counter)h;
467}

References __itt_metadata_u64, __itt_mutex_unlock, _N_, domain, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, NEW_COUNTER_W, and type.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [5/17]

static __itt_domain *ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(domain_createA), _init)  ) const
static

Definition at line 322 of file ittnotify_static.c.

326{
327 __itt_domain *h_tail = NULL, *h = NULL;
328
329 if (name == NULL)
330 {
331 return NULL;
332 }
333
334 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
335 if (_N_(_ittapi_global).api_initialized)
336 {
337#if ITT_PLATFORM==ITT_PLATFORM_WIN
338 if (ITTNOTIFY_NAME(domain_createA) && ITTNOTIFY_NAME(domain_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init)))
339 {
340 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
341 return ITTNOTIFY_NAME(domain_createA)(name);
342 }
343#else
344 if (ITTNOTIFY_NAME(domain_create) && ITTNOTIFY_NAME(domain_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init)))
345 {
346 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
347 return ITTNOTIFY_NAME(domain_create)(name);
348 }
349#endif
350 }
351 for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next)
352 {
353 if (h->nameA != NULL && !__itt_fstrcmp(h->nameA, name)) break;
354 }
355 if (h == NULL)
356 {
357 NEW_DOMAIN_A(&_N_(_ittapi_global),h,h_tail,name);
358 }
359 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
360 return h;
361}
#define NEW_DOMAIN_A(gptr, h, h_tail, name)

References __itt_fstrcmp, __itt_mutex_unlock, _N_, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, NEW_DOMAIN_A, and PTHREAD_SYMBOLS.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [6/17]

static __itt_domain *ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(domain_createW), _init)  ) const
static

Definition at line 292 of file ittnotify_static.c.

293{
294 __itt_domain *h_tail = NULL, *h = NULL;
295
296 if (name == NULL)
297 {
298 return NULL;
299 }
300
301 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
302 if (_N_(_ittapi_global).api_initialized)
303 {
304 if (ITTNOTIFY_NAME(domain_createW) && ITTNOTIFY_NAME(domain_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init)))
305 {
306 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
307 return ITTNOTIFY_NAME(domain_createW)(name);
308 }
309 }
310 for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next)
311 {
312 if (h->nameW != NULL && !wcscmp(h->nameW, name)) break;
313 }
314 if (h == NULL)
315 {
316 NEW_DOMAIN_W(&_N_(_ittapi_global),h,h_tail,name);
317 }
318 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
319 return h;
320}
#define NEW_DOMAIN_W(gptr, h, h_tail, name)

References __itt_mutex_unlock, _N_, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, NEW_DOMAIN_W, and PTHREAD_SYMBOLS.

Referenced by ITT_VERSIONIZE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ITT_VERSIONIZE() [7/17]

static void ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(enable_attach), _init)  )
static

Definition at line 696 of file ittnotify_static.c.

697{
698#ifdef __ANDROID__
699 /*
700 * if LIB_VAR_NAME env variable were set before then stay previous value
701 * else set default path
702 */
703 setenv(ITT_TO_STR(LIB_VAR_NAME), ANDROID_ITTNOTIFY_DEFAULT_PATH, 0);
704#endif
705}

References ITT_TO_STR, and LIB_VAR_NAME.

◆ ITT_VERSIONIZE() [8/17]

static void ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(pause), _init)  )
static

Definition at line 589 of file ittnotify_static.c.

590{
591 if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
592 {
594 }
595 if (ITTNOTIFY_NAME(pause) && ITTNOTIFY_NAME(pause) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init)))
596 {
597 ITTNOTIFY_NAME(pause)();
598 }
599 else
600 {
601 _N_(_ittapi_global).state = __itt_collection_paused;
602 }
603}
@ __itt_collection_paused
#define __itt_init_ittlib_name
namespace msvc_inline_asm static inline void pause(uintptr_t delay)

References __itt_collection_paused, __itt_group_all, __itt_init_ittlib_name, _N_, ITT_VERSIONIZE(), and tbb::internal::pause().

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [9/17]

static void ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(resume), _init)  )
static

Definition at line 605 of file ittnotify_static.c.

606{
607 if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
608 {
610 }
611 if (ITTNOTIFY_NAME(resume) && ITTNOTIFY_NAME(resume) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init)))
612 {
613 ITTNOTIFY_NAME(resume)();
614 }
615 else
616 {
617 _N_(_ittapi_global).state = __itt_collection_normal;
618 }
619}

References __itt_collection_normal, __itt_group_all, __itt_init_ittlib_name, _N_, and ITT_VERSIONIZE().

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [10/17]

static __itt_string_handle *ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(string_handle_createA), _init)  ) const
static

Definition at line 394 of file ittnotify_static.c.

398{
399 __itt_string_handle *h_tail = NULL, *h = NULL;
400
401 if (name == NULL)
402 {
403 return NULL;
404 }
405
406 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
407 if (_N_(_ittapi_global).api_initialized)
408 {
409#if ITT_PLATFORM==ITT_PLATFORM_WIN
410 if (ITTNOTIFY_NAME(string_handle_createA) && ITTNOTIFY_NAME(string_handle_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init)))
411 {
412 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
413 return ITTNOTIFY_NAME(string_handle_createA)(name);
414 }
415#else
416 if (ITTNOTIFY_NAME(string_handle_create) && ITTNOTIFY_NAME(string_handle_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init)))
417 {
418 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
419 return ITTNOTIFY_NAME(string_handle_create)(name);
420 }
421#endif
422 }
423 for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next)
424 {
425 if (h->strA != NULL && !__itt_fstrcmp(h->strA, name)) break;
426 }
427 if (h == NULL)
428 {
429 NEW_STRING_HANDLE_A(&_N_(_ittapi_global),h,h_tail,name);
430 }
431 if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
432 return h;
433}
#define NEW_STRING_HANDLE_A(gptr, h, h_tail, name)

References __itt_fstrcmp, __itt_mutex_unlock, _N_, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, NEW_STRING_HANDLE_A, and PTHREAD_SYMBOLS.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [11/17]

static __itt_string_handle *ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(string_handle_createW), _init)  ) const
static

Definition at line 364 of file ittnotify_static.c.

365{
366 __itt_string_handle *h_tail = NULL, *h = NULL;
367
368 if (name == NULL)
369 {
370 return NULL;
371 }
372
373 ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global));
374 if (_N_(_ittapi_global).api_initialized)
375 {
376 if (ITTNOTIFY_NAME(string_handle_createW) && ITTNOTIFY_NAME(string_handle_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init)))
377 {
378 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
379 return ITTNOTIFY_NAME(string_handle_createW)(name);
380 }
381 }
382 for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next)
383 {
384 if (h->strW != NULL && !wcscmp(h->strW, name)) break;
385 }
386 if (h == NULL)
387 {
388 NEW_STRING_HANDLE_W(&_N_(_ittapi_global),h,h_tail,name);
389 }
390 __itt_mutex_unlock(&_N_(_ittapi_global).mutex);
391 return h;
392}
#define NEW_STRING_HANDLE_W(gptr, h, h_tail, name)

References __itt_mutex_unlock, _N_, h, ITT_MUTEX_INIT_AND_LOCK, ITT_VERSIONIZE(), name, and NEW_STRING_HANDLE_W.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [12/17]

static void ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(thr_ignore), _init)  )
static

Definition at line 691 of file ittnotify_static.c.

692{
693 ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))();
694}

References _N_, and ITT_VERSIONIZE().

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [13/17]

static int ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(thr_name_setA), _init)  ) const
static

Definition at line 664 of file ittnotify_static.c.

665{
666 (void)namelen;
667 ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(name);
668 return 0;
669}
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_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 namelen

References _N_, ITT_VERSIONIZE(), name, namelen, and void.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [14/17]

static int ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(thr_name_setW), _init)  ) const
static

Definition at line 634 of file ittnotify_static.c.

635{
636 (void)namelen;
637 ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(name);
638 return 0;
639}

References _N_, ITT_VERSIONIZE(), name, namelen, and void.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [15/17]

static void ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(thread_ignore), _init)  )
static

Definition at line 679 of file ittnotify_static.c.

680{
681 if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
682 {
684 }
685 if (ITTNOTIFY_NAME(thread_ignore) && ITTNOTIFY_NAME(thread_ignore) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init)))
686 {
687 ITTNOTIFY_NAME(thread_ignore)();
688 }
689}

References __itt_group_all, __itt_init_ittlib_name, _N_, and ITT_VERSIONIZE().

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [16/17]

static void ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(thread_set_nameA), _init)  ) const
static

Definition at line 641 of file ittnotify_static.c.

645{
646 if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
647 {
649 }
650#if ITT_PLATFORM==ITT_PLATFORM_WIN
651 if (ITTNOTIFY_NAME(thread_set_nameA) && ITTNOTIFY_NAME(thread_set_nameA) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init)))
652 {
653 ITTNOTIFY_NAME(thread_set_nameA)(name);
654 }
655#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
656 if (ITTNOTIFY_NAME(thread_set_name) && ITTNOTIFY_NAME(thread_set_name) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init)))
657 {
658 ITTNOTIFY_NAME(thread_set_name)(name);
659 }
660#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
661}

References __itt_group_all, __itt_init_ittlib_name, _N_, ITT_VERSIONIZE(), and name.

Here is the call graph for this function:

◆ ITT_VERSIONIZE() [17/17]

static void ITTAPI ITT_VERSIONIZE ( ITT_JOIN(_N_(thread_set_nameW), _init)  ) const
static

Definition at line 622 of file ittnotify_static.c.

623{
624 if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL)
625 {
627 }
628 if (ITTNOTIFY_NAME(thread_set_nameW) && ITTNOTIFY_NAME(thread_set_nameW) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init)))
629 {
630 ITTNOTIFY_NAME(thread_set_nameW)(name);
631 }
632}

References __itt_group_all, __itt_init_ittlib_name, _N_, ITT_VERSIONIZE(), and name.

Here is the call graph for this function:

◆ mark_pt_region_begin()

ITT_EXTERN_C void _N_() mark_pt_region_begin ( __itt_pt_region  region)

__itt_mark_pt_region functions marks region of interest region parameter defines different regions. 0 <= region < 8

Definition at line 1213 of file ittnotify_static.c.

1214{
1215#if defined(ITT_API_IPT_SUPPORT) && (ITT_PLATFORM==ITT_PLATFORM_WIN || ITT_PLATFORM==ITT_PLATFORM_POSIX) && !defined(__ANDROID__)
1216 if (_N_(_ittapi_global).ipt_collect_events == 1)
1217 {
1218 __itt_pt_mark_event(2*region);
1219 }
1220 else
1221 {
1222 __itt_pt_mark(2*region);
1223 }
1224#else
1225 (void)region;
1226#endif
1227}

References _N_, and void.

◆ mark_pt_region_end()

ITT_EXTERN_C void _N_() mark_pt_region_end ( __itt_pt_region  region)

Definition at line 1229 of file ittnotify_static.c.

1230{
1231#if defined(ITT_API_IPT_SUPPORT) && (ITT_PLATFORM==ITT_PLATFORM_WIN || ITT_PLATFORM==ITT_PLATFORM_POSIX) && !defined(__ANDROID__)
1232 if (_N_(_ittapi_global).ipt_collect_events == 1)
1233 {
1234 __itt_pt_mark_event(2*region + 1);
1235 }
1236 else
1237 {
1238 __itt_pt_mark(2*region + 1);
1239 }
1240#else
1241 (void)region;
1242#endif
1243}

References _N_, and void.

◆ set_error_handler()

ITT_EXTERN_C __itt_error_handler_t *_N_() set_error_handler ( __itt_error_handler_t *  handler)

Definition at line 1193 of file ittnotify_static.c.

1194{
1195 __itt_error_handler_t* prev = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler;
1196 _N_(_ittapi_global).error_handler = (void*)(size_t)handler;
1197 return prev;
1198}

References _N_.

Variable Documentation

◆ __itt_fini_ittlib_ptr

__itt_fini_ittlib_t* __itt_fini_ittlib_ptr = _N_(fini_ittlib)
static

Definition at line 129 of file ittnotify_static.c.

Referenced by init_ittlib().

◆ __itt_init_ittlib_ptr

__itt_init_ittlib_t* __itt_init_ittlib_ptr = _N_(init_ittlib)
static

Definition at line 120 of file ittnotify_static.c.

◆ api_list

__itt_api_info api_list[]
static
Initial value:
= {
#define ITT_STUB(api,type,name,args,params,nameindll,group,format)
#define ITT_STUBV
#define __ITT_INTERNAL_INIT
#define ITT_STUB(api,type,name,args,params,nameindll,group,format)
#define ITT_STUBV
{NULL, NULL, NULL, NULL, __itt_group_none}
}

Definition at line 209 of file ittnotify_static.c.

◆ api_version

const char api_version[] = API_VERSION "\0\n@(#) $Revision$\n"
static

Definition at line 38 of file ittnotify_static.c.

◆ dll_path

const char dll_path[PATH_MAX] = { 0 }
static

Definition at line 231 of file ittnotify_static.c.

◆ group_alias

__itt_group_alias group_alias[]
static
Initial value:
= {
{ NULL, (__itt_group_none) },
}
@ __itt_group_control
@ __itt_group_thread
void const char const char int ITT_FORMAT __itt_group_sync __itt_group_fsync
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 __itt_group_suppress
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_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 const char ITT_FORMAT s __itt_frame ITT_FORMAT p __itt_counter ITT_FORMAT p __itt_counter unsigned long long ITT_FORMAT lu __itt_counter unsigned long long ITT_FORMAT lu __itt_counter __itt_clock_domain unsigned long long void ITT_FORMAT p const wchar_t ITT_FORMAT __itt_group_mark
static const char api_version[]

Definition at line 195 of file ittnotify_static.c.

Referenced by __itt_get_groups().

◆ ittnotify_lib_name

const char* ittnotify_lib_name = "libittnotify.dll"
static

Definition at line 43 of file ittnotify_static.c.

Referenced by init_ittlib().


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.