HPCToolkit
pthread-blame-overrides.c File Reference
#include <pthread.h>
#include <dlfcn.h>
#include <sched.h>
#include <semaphore.h>
#include <stdio.h>
#include <sample-sources/blame-shift/blame-map.h>
#include <sample-sources/pthread-blame.h>
#include <hpcrun/thread_data.h>
#include <monitor-exts/overrides.h>
#include <hpcrun/hpctoolkit.h>
#include <hpcrun/safe-sampling.h>
#include <hpcrun/sample_event.h>
#include <messages/messages.h>
Include dependency graph for pthread-blame-overrides.c:

Go to the source code of this file.

Macros

#define pthread_cond_timedwait_REAL   DLV
 
#define pthread_cond_wait_REAL   DLV
 
#define pthread_cond_broadcast_REAL   DLV
 
#define pthread_cond_signal_REAL   DLV
 
#define pthread_mutex_lock_REAL   ALT
 
#define pthread_mutex_unlock_REAL   ALT
 
#define pthread_mutex_timedlock_REAL   DL
 
#define pthread_mutex_trylock_REAL   ALT
 
#define pthread_spin_lock_REAL   DL
 
#define pthread_spin_unlock_REAL   DL
 
#define sched_yield_REAL   DL
 
#define sem_wait_REAL   DL
 
#define sem_post_REAL   DL
 
#define sem_timedwait_REAL   DL
 

Functions

void monitor_real_abort (void)
 
 REAL_TYPEDEF (REAL_TYPEDEF(int, pthread_cond_timedwait)
 
int OVERRIDE_NM() pthread_cond_wait (pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex)
 
int OVERRIDE_NM() pthread_cond_broadcast (pthread_cond_t *cond)
 
int OVERRIDE_NM() pthread_cond_signal (pthread_cond_t *cond)
 
int OVERRIDE_NM() pthread_mutex_lock (pthread_mutex_t *mutex)
 
int OVERRIDE_NM() pthread_mutex_unlock (pthread_mutex_t *mutex)
 
int OVERRIDE_NM() pthread_mutex_timedlock (pthread_mutex_t *restrict mutex, const struct timespec *restrict abs_timeout)
 
int OVERRIDE_NM() pthread_spin_lock (pthread_spinlock_t *lock)
 
int OVERRIDE_NM() pthread_spin_unlock (pthread_spinlock_t *lock)
 
void * override_lookup (char *fname)
 
void * override_lookupv (char *fname)
 
 REAL_TYPEDEF (int, sched_yield)
 
 REAL_TYPEDEF (REAL_TYPEDEF(int, sem_wait)
 
int OVERRIDE_NM() sem_post (sem_t *sem)
 
int OVERRIDE_NM() sem_timedwait (sem_t *sem, const struct timespec *abs_timeout)
 
void tbb_stats (void)
 

Variables

static unsigned int calls_to_sched_yield = 0
 
static unsigned int calls_to_sem_wait = 0
 

Macro Definition Documentation

◆ pthread_cond_broadcast_REAL

#define pthread_cond_broadcast_REAL   DLV

Definition at line 110 of file pthread-blame-overrides.c.

◆ pthread_cond_signal_REAL

#define pthread_cond_signal_REAL   DLV

Definition at line 111 of file pthread-blame-overrides.c.

◆ pthread_cond_timedwait_REAL

#define pthread_cond_timedwait_REAL   DLV

Definition at line 108 of file pthread-blame-overrides.c.

◆ pthread_cond_wait_REAL

#define pthread_cond_wait_REAL   DLV

Definition at line 109 of file pthread-blame-overrides.c.

◆ pthread_mutex_lock_REAL

#define pthread_mutex_lock_REAL   ALT

Definition at line 113 of file pthread-blame-overrides.c.

◆ pthread_mutex_timedlock_REAL

#define pthread_mutex_timedlock_REAL   DL

Definition at line 115 of file pthread-blame-overrides.c.

◆ pthread_mutex_trylock_REAL

#define pthread_mutex_trylock_REAL   ALT

Definition at line 116 of file pthread-blame-overrides.c.

◆ pthread_mutex_unlock_REAL

#define pthread_mutex_unlock_REAL   ALT

Definition at line 114 of file pthread-blame-overrides.c.

◆ pthread_spin_lock_REAL

#define pthread_spin_lock_REAL   DL

Definition at line 118 of file pthread-blame-overrides.c.

◆ pthread_spin_unlock_REAL

#define pthread_spin_unlock_REAL   DL

Definition at line 119 of file pthread-blame-overrides.c.

◆ sched_yield_REAL

#define sched_yield_REAL   DL

Definition at line 125 of file pthread-blame-overrides.c.

◆ sem_post_REAL

#define sem_post_REAL   DL

Definition at line 127 of file pthread-blame-overrides.c.

◆ sem_timedwait_REAL

#define sem_timedwait_REAL   DL

Definition at line 128 of file pthread-blame-overrides.c.

◆ sem_wait_REAL

#define sem_wait_REAL   DL

Definition at line 126 of file pthread-blame-overrides.c.

Function Documentation

◆ monitor_real_abort()

void monitor_real_abort ( void  )
Here is the caller graph for this function:

◆ override_lookup()

void* override_lookup ( char *  fname)

Definition at line 298 of file pthread-blame-overrides.c.

◆ override_lookupv()

void* override_lookupv ( char *  fname)

Definition at line 314 of file pthread-blame-overrides.c.

◆ pthread_cond_broadcast()

int OVERRIDE_NM() pthread_cond_broadcast ( pthread_cond_t *  cond)

Definition at line 188 of file pthread-blame-overrides.c.

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

◆ pthread_cond_signal()

int OVERRIDE_NM() pthread_cond_signal ( pthread_cond_t *  cond)

Definition at line 198 of file pthread-blame-overrides.c.

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

◆ pthread_cond_wait()

int OVERRIDE_NM() pthread_cond_wait ( pthread_cond_t *restrict  cond,
pthread_mutex_t *restrict  mutex 
)

Definition at line 175 of file pthread-blame-overrides.c.

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

◆ pthread_mutex_lock()

int OVERRIDE_NM() pthread_mutex_lock ( pthread_mutex_t *  mutex)

Definition at line 208 of file pthread-blame-overrides.c.

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

◆ pthread_mutex_timedlock()

int OVERRIDE_NM() pthread_mutex_timedlock ( pthread_mutex_t *restrict  mutex,
const struct timespec *restrict  abs_timeout 
)

Definition at line 241 of file pthread-blame-overrides.c.

Here is the call graph for this function:

◆ pthread_mutex_unlock()

int OVERRIDE_NM() pthread_mutex_unlock ( pthread_mutex_t *  mutex)

Definition at line 226 of file pthread-blame-overrides.c.

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

◆ pthread_spin_lock()

int OVERRIDE_NM() pthread_spin_lock ( pthread_spinlock_t *  lock)

Definition at line 260 of file pthread-blame-overrides.c.

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

◆ pthread_spin_unlock()

int OVERRIDE_NM() pthread_spin_unlock ( pthread_spinlock_t *  lock)

Definition at line 278 of file pthread-blame-overrides.c.

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

◆ REAL_TYPEDEF() [1/3]

REAL_TYPEDEF ( REAL_TYPEDEF(  int,
pthread_cond_timedwait   
)

Definition at line 134 of file pthread-blame-overrides.c.

◆ REAL_TYPEDEF() [2/3]

REAL_TYPEDEF ( int  ,
sched_yield   
)

Definition at line 335 of file pthread-blame-overrides.c.

◆ REAL_TYPEDEF() [3/3]

REAL_TYPEDEF ( REAL_TYPEDEF(  int,
sem_wait   
)

Definition at line 351 of file pthread-blame-overrides.c.

◆ sem_post()

int OVERRIDE_NM() sem_post ( sem_t *  sem)

Definition at line 379 of file pthread-blame-overrides.c.

Here is the call graph for this function:

◆ sem_timedwait()

int OVERRIDE_NM() sem_timedwait ( sem_t *  sem,
const struct timespec *  abs_timeout 
)

Definition at line 396 of file pthread-blame-overrides.c.

◆ tbb_stats()

void tbb_stats ( void  )

Definition at line 407 of file pthread-blame-overrides.c.

Variable Documentation

◆ calls_to_sched_yield

unsigned int calls_to_sched_yield = 0
static

Definition at line 332 of file pthread-blame-overrides.c.

◆ calls_to_sem_wait

unsigned int calls_to_sem_wait = 0
static

Definition at line 333 of file pthread-blame-overrides.c.