LLVM API Documentation

Classes | Defines | Typedefs | Enumerations | Functions
ittnotify_config.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <dlfcn.h>
#include <pthread.h>
#include "ittnotify_types.h"
Include dependency graph for ittnotify_config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ___itt_thread_info
struct  ___itt_api_info_20101001
struct  ___itt_api_info
struct  ___itt_global

Defines

#define ITT_ARCH_IA32   1
#define ITT_ARCH_IA32E   2
#define ITT_ARCH_IA64   3
#define ITT_ARCH   ITT_ARCH_IA32
#define ITT_EXTERN_C   /* nothing */
#define ITT_TO_STR_AUX(x)   #x
#define ITT_TO_STR(x)   ITT_TO_STR_AUX(x)
#define __ITT_BUILD_ASSERT(expr, suffix)
#define _ITT_BUILD_ASSERT(expr, suffix)   __ITT_BUILD_ASSERT((expr), suffix)
#define ITT_BUILD_ASSERT(expr)   _ITT_BUILD_ASSERT((expr), __LINE__)
#define ITT_MAGIC   { 0xED, 0xAB, 0xAB, 0xEC, 0x0D, 0xEE, 0xDA, 0x30 }
#define API_VERSION_BUILD   20111111
#define API_VERSION_NUM   0.0.0
#define API_VERSION
#define _GNU_SOURCE   1 /* need for PTHREAD_MUTEX_RECURSIVE */
#define MUTEX_INITIALIZER   PTHREAD_MUTEX_INITIALIZER
#define _strong_alias(name, aliasname)   extern __typeof (name) aliasname __attribute__ ((alias (#name)));
#define strong_alias(name, aliasname)   _strong_alias(name, aliasname)
#define __itt_get_proc(lib, name)   dlsym(lib, name)
#define __itt_mutex_init(mutex)
#define __itt_mutex_lock(mutex)   pthread_mutex_lock(mutex)
#define __itt_mutex_unlock(mutex)   pthread_mutex_unlock(mutex)
#define __itt_load_lib(name)   dlopen(name, RTLD_LAZY)
#define __itt_unload_lib(handle)   dlclose(handle)
#define __itt_system_error()   errno
#define __itt_fstrcmp(s1, s2)   strcmp(s1, s2)
#define __itt_fstrlen(s)   strlen(s)
#define __itt_fstrcpyn(s1, s2, l)   strncpy(s1, s2, l)
#define __itt_fstrdup(s)   strdup(s)
#define __itt_thread_id()   pthread_self()
#define __itt_thread_yield()   sched_yield()
#define NEW_THREAD_INFO_W(gptr, h, h_tail, t, s, n)
#define NEW_THREAD_INFO_A(gptr, h, h_tail, t, s, n)
#define NEW_DOMAIN_W(gptr, h, h_tail, name)
#define NEW_DOMAIN_A(gptr, h, h_tail, name)
#define NEW_STRING_HANDLE_W(gptr, h, h_tail, name)
#define NEW_STRING_HANDLE_A(gptr, h, h_tail, name)

Typedefs

typedef void * lib_t
typedef pthread_t TIDT
typedef pthread_mutex_t mutex_t
typedef struct ___itt_thread_info __itt_thread_info
typedef struct
___itt_api_info_20101001 
__itt_api_info_20101001
typedef struct ___itt_api_info __itt_api_info
typedef struct ___itt_global __itt_global

Enumerations

enum  __itt_collection_state { __itt_collection_normal = 0, __itt_collection_paused = 1 }
enum  __itt_thread_state { __itt_thread_normal = 0, __itt_thread_ignored = 1 }

Functions

ITT_INLINE long __TBB_machine_fetchadd4 (volatile void *ptr, long addend) ITT_INLINE_ATTRIBUTE
ITT_INLINE long __itt_interlocked_increment (volatile long *ptr) ITT_INLINE_ATTRIBUTE

Define Documentation

#define __ITT_BUILD_ASSERT (   expr,
  suffix 
)
Value:
do { \
    static char __itt_build_check_##suffix[(expr) ? 1 : -1]; \
    __itt_build_check_##suffix[0] = 0; \
} while(0)

Definition at line 156 of file ittnotify_config.h.

#define __itt_fstrcmp (   s1,
  s2 
)    strcmp(s1, s2)

Definition at line 250 of file ittnotify_config.h.

#define __itt_fstrcpyn (   s1,
  s2,
 
)    strncpy(s1, s2, l)

Definition at line 252 of file ittnotify_config.h.

#define __itt_fstrdup (   s)    strdup(s)

Definition at line 253 of file ittnotify_config.h.

#define __itt_fstrlen (   s)    strlen(s)

Definition at line 251 of file ittnotify_config.h.

#define __itt_get_proc (   lib,
  name 
)    dlsym(lib, name)

Definition at line 224 of file ittnotify_config.h.

#define __itt_load_lib (   name)    dlopen(name, RTLD_LAZY)

Definition at line 247 of file ittnotify_config.h.

#define __itt_mutex_init (   mutex)
Value:
{\
    pthread_mutexattr_t mutex_attr;                                         \
    int error_code = pthread_mutexattr_init(&mutex_attr);                   \
    if (error_code)                                                         \
        __itt_report_error(__itt_error_system, "pthread_mutexattr_init",    \
                           error_code);                                     \
    error_code = pthread_mutexattr_settype(&mutex_attr,                     \
                                           PTHREAD_MUTEX_RECURSIVE);        \
    if (error_code)                                                         \
        __itt_report_error(__itt_error_system, "pthread_mutexattr_settype", \
                           error_code);                                     \
    error_code = pthread_mutex_init(mutex, &mutex_attr);                    \
    if (error_code)                                                         \
        __itt_report_error(__itt_error_system, "pthread_mutex_init",        \
                           error_code);                                     \
    error_code = pthread_mutexattr_destroy(&mutex_attr);                    \
    if (error_code)                                                         \
        __itt_report_error(__itt_error_system, "pthread_mutexattr_destroy", \
                           error_code);                                     \
}

Definition at line 225 of file ittnotify_config.h.

#define __itt_mutex_lock (   mutex)    pthread_mutex_lock(mutex)

Definition at line 245 of file ittnotify_config.h.

#define __itt_mutex_unlock (   mutex)    pthread_mutex_unlock(mutex)

Definition at line 246 of file ittnotify_config.h.

#define __itt_system_error ( )    errno

Definition at line 249 of file ittnotify_config.h.

#define __itt_thread_id ( )    pthread_self()

Definition at line 254 of file ittnotify_config.h.

#define __itt_thread_yield ( )    sched_yield()

Definition at line 255 of file ittnotify_config.h.

#define __itt_unload_lib (   handle)    dlclose(handle)

Definition at line 248 of file ittnotify_config.h.

#define _GNU_SOURCE   1 /* need for PTHREAD_MUTEX_RECURSIVE */

Definition at line 189 of file ittnotify_config.h.

#define _ITT_BUILD_ASSERT (   expr,
  suffix 
)    __ITT_BUILD_ASSERT((expr), suffix)

Definition at line 160 of file ittnotify_config.h.

#define _strong_alias (   name,
  aliasname 
)    extern __typeof (name) aliasname __attribute__ ((alias (#name)));

Definition at line 196 of file ittnotify_config.h.

#define API_VERSION
Value:
"ITT-API-Version " ITT_TO_STR(API_VERSION_NUM) \
                                " (" ITT_TO_STR(API_VERSION_BUILD) ")"

Definition at line 172 of file ittnotify_config.h.

#define API_VERSION_BUILD   20111111

Definition at line 166 of file ittnotify_config.h.

#define API_VERSION_NUM   0.0.0

Definition at line 169 of file ittnotify_config.h.

#define ITT_ARCH   ITT_ARCH_IA32

Definition at line 143 of file ittnotify_config.h.

#define ITT_ARCH_IA32   1

Definition at line 126 of file ittnotify_config.h.

#define ITT_ARCH_IA32E   2

Definition at line 130 of file ittnotify_config.h.

#define ITT_ARCH_IA64   3

Definition at line 134 of file ittnotify_config.h.

#define ITT_BUILD_ASSERT (   expr)    _ITT_BUILD_ASSERT((expr), __LINE__)

Definition at line 161 of file ittnotify_config.h.

#define ITT_EXTERN_C   /* nothing */

Definition at line 150 of file ittnotify_config.h.

#define ITT_MAGIC   { 0xED, 0xAB, 0xAB, 0xEC, 0x0D, 0xEE, 0xDA, 0x30 }

Definition at line 163 of file ittnotify_config.h.

#define ITT_TO_STR (   x)    ITT_TO_STR_AUX(x)

Definition at line 154 of file ittnotify_config.h.

#define ITT_TO_STR_AUX (   x)    #x

Definition at line 153 of file ittnotify_config.h.

#define MUTEX_INITIALIZER   PTHREAD_MUTEX_INITIALIZER

Definition at line 195 of file ittnotify_config.h.

#define NEW_DOMAIN_A (   gptr,
  h,
  h_tail,
  name 
)
Value:
{ \
    h = (__itt_domain*)malloc(sizeof(__itt_domain)); \
    if (h != NULL) { \
        h->flags  = 0;    /* domain is disabled by default */ \
        h->nameA  = name ? __itt_fstrdup(name) : NULL; \
        h->nameW  = NULL; \
        h->extra1 = 0;    /* reserved */ \
        h->extra2 = NULL; /* reserved */ \
        h->next   = NULL; \
        if (h_tail == NULL) \
            (gptr)->domain_list = h; \
        else \
            h_tail->next = h; \
    } \
}

Definition at line 408 of file ittnotify_config.h.

#define NEW_DOMAIN_W (   gptr,
  h,
  h_tail,
  name 
)
Value:
{ \
    h = (__itt_domain*)malloc(sizeof(__itt_domain)); \
    if (h != NULL) { \
        h->flags  = 0;    /* domain is disabled by default */ \
        h->nameA  = NULL; \
        h->nameW  = name ? _wcsdup(name) : NULL; \
        h->extra1 = 0;    /* reserved */ \
        h->extra2 = NULL; /* reserved */ \
        h->next   = NULL; \
        if (h_tail == NULL) \
            (gptr)->domain_list = h; \
        else \
            h_tail->next = h; \
    } \
}

Definition at line 392 of file ittnotify_config.h.

#define NEW_STRING_HANDLE_A (   gptr,
  h,
  h_tail,
  name 
)
Value:
{ \
    h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \
    if (h != NULL) { \
        h->strA   = name ? __itt_fstrdup(name) : NULL; \
        h->strW   = NULL; \
        h->extra1 = 0;    /* reserved */ \
        h->extra2 = NULL; /* reserved */ \
        h->next   = NULL; \
        if (h_tail == NULL) \
            (gptr)->string_list = h; \
        else \
            h_tail->next = h; \
    } \
}

Definition at line 439 of file ittnotify_config.h.

#define NEW_STRING_HANDLE_W (   gptr,
  h,
  h_tail,
  name 
)
Value:
{ \
    h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \
    if (h != NULL) { \
        h->strA   = NULL; \
        h->strW   = name ? _wcsdup(name) : NULL; \
        h->extra1 = 0;    /* reserved */ \
        h->extra2 = NULL; /* reserved */ \
        h->next   = NULL; \
        if (h_tail == NULL) \
            (gptr)->string_list = h; \
        else \
            h_tail->next = h; \
    } \
}

Definition at line 424 of file ittnotify_config.h.

#define NEW_THREAD_INFO_A (   gptr,
  h,
  h_tail,
  t,
  s,
 
)
Value:
{ \
    h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \
    if (h != NULL) { \
        h->tid    = t; \
        h->nameA  = n ? __itt_fstrdup(n) : NULL; \
        h->nameW  = NULL; \
        h->state  = s; \
        h->extra1 = 0;    /* reserved */ \
        h->extra2 = NULL; /* reserved */ \
        h->next   = NULL; \
        if (h_tail == NULL) \
            (gptr)->thread_list = h; \
        else \
            h_tail->next = h; \
    } \
}

Definition at line 375 of file ittnotify_config.h.

#define NEW_THREAD_INFO_W (   gptr,
  h,
  h_tail,
  t,
  s,
 
)
Value:
{ \
    h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \
    if (h != NULL) { \
        h->tid    = t; \
        h->nameA  = NULL; \
        h->nameW  = n ? _wcsdup(n) : NULL; \
        h->state  = s; \
        h->extra1 = 0;    /* reserved */ \
        h->extra2 = NULL; /* reserved */ \
        h->next   = NULL; \
        if (h_tail == NULL) \
            (gptr)->thread_list = h; \
        else \
            h_tail->next = h; \
    } \
}

Definition at line 358 of file ittnotify_config.h.

#define strong_alias (   name,
  aliasname 
)    _strong_alias(name, aliasname)

Definition at line 198 of file ittnotify_config.h.


Typedef Documentation

typedef struct ___itt_global __itt_global
typedef void* lib_t

Definition at line 192 of file ittnotify_config.h.

typedef pthread_mutex_t mutex_t

Definition at line 194 of file ittnotify_config.h.

typedef pthread_t TIDT

Definition at line 193 of file ittnotify_config.h.


Enumeration Type Documentation

Enumerator:
__itt_collection_normal 
__itt_collection_paused 

Definition at line 285 of file ittnotify_config.h.

Enumerator:
__itt_thread_normal 
__itt_thread_ignored 

Definition at line 290 of file ittnotify_config.h.


Function Documentation

ITT_INLINE long __itt_interlocked_increment ( volatile long *  ptr)

Definition at line 278 of file ittnotify_config.h.

References __TBB_machine_fetchadd4().

ITT_INLINE long __TBB_machine_fetchadd4 ( volatile void *  ptr,
long  addend 
)

Definition at line 265 of file ittnotify_config.h.

Referenced by __itt_interlocked_increment().