SURFEX v8.1
General documentation of Surfex
Typedefs | Enumerations | Functions | Variables
drhook.c File Reference

Go to the source code of this file.

Typedefs

typedef struct drhook_timeline_t drhook_timeline_t
 
typedef struct drhook_key_t drhook_key_t
 
typedef struct drhook_calltree_t drhook_calltree_t
 
typedef struct drhook_sig_t drhook_sig_t
 
typedef struct drhook_prof_t drhook_prof_t
 
typedef struct drhook_memprof_t drhook_memprof_t
 
typedef struct drhook_watch_t drhook_watch_t
 
typedef struct drhook_prefix_t drhook_prefix_t
 
typedef struct callstack_t callstack_t
 

Enumerations

enum  PrintWatchKeys_t {
  KEYNONE = 0, KEYLOG = 1, KEYCHAR = 2, KEY_I4 = 4,
  KEY_I8 = 8, KEY_R4 = 16, KEY_R8 = 32
}
 

Functions

static void set_timed_kill ()
 
static void process_options ()
 
static char * TimeStr (char *s, int slen)
 
void necsx_trbk_ (const char *msg, int msglen)
 
void feenableexcept ()
 
void fedisableexcept ()
 
static void trapfpe (void)
 
static void untrapfpe (void)
 
long long int getstk_ ()
 
long long int getmaxstk_ ()
 
long long int gethwm_ ()
 
long long int getmaxhwm_ ()
 
long long int getrss_ ()
 
long long int getmaxrss_ ()
 
long long int getcurheap_ ()
 
long long int getmaxcurheap_ ()
 
long long int getcurheap_thread_ (const int *tidnum)
 
long long int getmaxcurheap_thread_ (const int *tidnum)
 
long long int getpag_ ()
 
void ec_set_umask_ ()
 
double flop_ ()
 
double util_cputime_ ()
 
double util_walltime_ ()
 
long long int irtc ()
 
long long int irtc_ ()
 
long long int irtc_rate_ ()
 
int get_thread_id_ ()
 
void LinuxTraceBack (const char *prefix, const char *timestr, void *sigcontextptr)
 
static pid_t gettid ()
 
static void stopstart_hpm (int tid, drhook_key_t *pstop, drhook_key_t *pstart)
 
static void stop_only_hpm (int tid, drhook_key_t *pstop)
 
static void init_hpm (int tid)
 
static double mflops_hpm (const drhook_key_t *keyptr)
 
static double mips_hpm (const drhook_key_t *keyptr)
 
static double divpc_hpm (const drhook_key_t *keyptr)
 
static double mflop_count (const drhook_key_t *keyptr)
 
static double mip_count (const drhook_key_t *keyptr)
 
static int spin (int secs)
 
static void dump_file (const char *pfx, int tid, int sig, int nsigs, const char filename[])
 
static void dump_hugepages (int enforce, const char *pfx, int tid, int sig, int nsigs)
 
static int set_unlimited_corefile (unsigned long long int *hardlimit)
 
static int set_default_handler (int sig, int unlimited_corefile, int verbose)
 
static void * malloc_drhook (size_t size)
 
static void * calloc_drhook (size_t nmemb, size_t size)
 
static drhook_key_tcallstack (int tid, void *key, drhook_key_t *keyptr)
 
static char * strdup_drhook (const char *s)
 
static char * strdup2_drhook (const char *s, int s_len)
 
static char * timestamp ()
 
unsigned int hashfunc (const char *s, int s_len)
 
unsigned int callpath_hashfunc (unsigned int inithash, const equivalence_t *callpath, int callpath_len, unsigned int *fullhash)
 
static void insert_calltree (int tid, drhook_key_t *keyptr)
 
static void remove_calltree (int tid, drhook_key_t *keyptr, const double *delta_wall, const double *delta_cpu)
 
static void memstat (drhook_key_t *keyptr, const int *thread_id, int in_getkey)
 
static void flptrap (int sig)
 
static void signal_gencore (int sig SIG_EXTRA_ARGS)
 
static void signal_harakiri (int sig SIG_EXTRA_ARGS)
 
static void signal_drhook (int sig SIG_EXTRA_ARGS)
 
static void trapfpe_treatment (int sig, int silent)
 
static void catch_signals (int silent)
 
static void restore_default_signals (int silent)
 
static void ignore_signals (int silent)
 
static void gdb__sigdump (int sig SIG_EXTRA_ARGS)
 
static char * safe_llitoa (long long int i, char b[], int blen)
 
void c_drhook_set_mpi_ ()
 
void c_drhook_not_mpi_ ()
 
static void signal_drhook_init (int enforce)
 
static char * get_mon_out (int me)
 
static char * get_memmon_out (int me)
 
static void random_memstat (int tid, int enforce)
 
static void do_prof ()
 
void c_drhook_process_options_ (const int *lhook, const int *Myproc, const int *Nproc)
 
static const char * trim (const char *name, int *n)
 
static drhook_key_tinsertkey (int tid, const drhook_key_t *keyptr_in)
 
static drhook_key_tgetkey (int tid, const char *name, int name_len, const char *filename, int filename_len, const double *walltime, const double *cputime, const equivalence_t *callpath, int callpath_len, int *free_callpath)
 
static void putkey (int tid, drhook_key_t *keyptr, const char *name, int name_len, int sizeinfo, double *walltime, double *cputime)
 
static void init_drhook (int ntids)
 
static drhook_key_titself (drhook_key_t *keyptr_self, int tid, int opt, double *delta_time, const double *walltime, const double *cputime)
 
static void lld_commie (long long int n, char sd[])
 
static void dbl_commie (double n, char sd[])
 
static void unroll_callpath (FILE *fp, int len, const equivalence_t *callpath, int callpath_len)
 
static equivalence_t * get_callpath (int tid, int *callpath_len)
 
static void print_watch (int ftnunitno, int key, const void *ptr, int n)
 
static void check_watch (const char *label, const char *name, int name_len, int allow_abort)
 
void c_drhook_check_watch_ (const char *where, const int *allow_abort, int where_len)
 
void c_drhook_set_lhook_ (const int *lhook)
 
void c_drhook_getenv_ (const char *s, char *value, int slen, const int valuelen)
 
void c_drhook_init_ (const char *progname, const int *num_threads, int progname_len)
 
void c_drhook_watch_ (const int *onoff, const char *array_name, const void *array_ptr, const int *nbytes, const int *abort_if_changed, const int *printkey, const int *nvals, const int *print_traceback_when_set, int array_name_len)
 
void c_drhook_start_ (const char *name, const int *thread_id, double *key, const char *filename, const int *sizeinfo, int name_len, int filename_len)
 
void c_drhook_end_ (const char *name, const int *thread_id, const double *key, const char *filename, const int *sizeinfo, int name_len, int filename_len)
 
void c_drhook_memcounter_ (const int *thread_id, const long long int *size, long long int *keyptr_addr)
 
static int prof_name_comp (const void *v1, const void *v2)
 
static int memprof_name_comp (const void *v1, const void *v2)
 
static int prof_pc_comp_desc (const void *v1, const void *v2)
 
static int memprof_pc_comp_desc (const void *v1, const void *v2)
 
static const char * trim_and_adjust_left (const char *p, int *name_len)
 
static void print_routine_name0 (FILE *fp, const char *p_name, int p_tid, const char *p_filename, int p_cluster, const equivalence_t *p_callpath, int p_callpath_len, int len, int cluster_size)
 
static void DrHookPrint (int ftnunitno, const char *line)
 
void c_drhook_print_ (const int *ftnunitno, const int *thread_id, const int *print_option, int *level)
 
void c_drhook_init_signals_ (const int *enforce)
 
void c_drhook_raise_ (const int *sig)
 
void Dr_Hook (const char *name, int option, double *handle, const char *filename, int sizeinfo, int name_len, int filename_len)
 
clock_t times (struct tms *buffer)
 
static int fujitsu_getrusage (int who, struct rusage *rusage)
 
FORTRAN_CALL int util_ihpstat_ (int *option)
 

Variables

int drhook_memtrace = 0
 
static char * start_stamp = NULL
 
static char * end_stamp = NULL
 
static int drhook_harakiri_timeout = drhook_harakiri_timeout_default
 
static int drhook_trapfpe = 1
 
static int atp_enabled = 0
 
static int atp_max_cores = 20
 
static int atp_max_analysis_time = 300
 
static int atp_ignore_sigterm = 0
 
static int any_memstat = 0
 
static int opt_gethwm = 0
 
static int opt_getstk = 0
 
static int opt_getrss = 0
 
static int opt_getpag = 0
 
static int opt_walltime = 0
 
static int opt_cputime = 0
 
static int opt_wallprof = 0
 
static int opt_cpuprof = 0
 
static int opt_hpmprof = 0
 
static int opt_memprof = 0
 
static int opt_trim = 0
 
static int opt_calls = 0
 
static int opt_self = 1
 
static int opt_propagate_signals = 1
 
static int opt_sizeinfo = 1
 
static int opt_clusterinfo = 0
 
static int opt_callpath = 0
 
static int callpath_indent = callpath_indent_default
 
static int callpath_depth = callpath_depth_default
 
static int callpath_packed = 0
 
static int opt_calltrace = 0
 
static int opt_funcenter = 0
 
static int opt_funcexit = 0
 
static int opt_timeline = 0
 
static int opt_timeline_thread = 1
 
static int opt_timeline_format = 1
 
static int opt_timeline_unitno = 6
 
static long long int opt_timeline_freq = 1000000
 
static double opt_timeline_MB = 1.0
 
static volatile sig_atomic_t opt_gencore = 0
 
static int opt_gencore_signal = 0
 
static int hpm_grp = 0
 
static int opt_random_memstat = 0
 
static char * drhook_timed_kill = NULL
 
static int drhook_dump_smaps = 0
 
static int drhook_dump_buddyinfo = 0
 
static int drhook_dump_hugepages = 0
 
static double drhook_dump_hugepages_freq = 0
 
static drhook_timeline_ttimeline = NULL
 
static long long int opt_hpmstop_threshold = -1
 
static double opt_hpmstop_mflops = 1000000.0
 
static long long int irtc_start = 0
 
static double dclock_start = 0
 
static double my_irtc_rate = 0
 
static double my_inv_irtc_rate = 0
 
static o_lock_t DRHOOK_lock = 0
 
static int numthreads = 0
 
static int myproc = 1
 
static int nproc = -1
 
static int max_threads = 1
 
static pid_t pid = -1
 
static drhook_key_t ** keydata = NULL
 
static drhook_calltree_t ** calltree = NULL
 
static drhook_calltree_t ** thiscall = NULL
 
static int signals_set = 0
 
static volatile sig_atomic_t signal_handler_called = 0
 
static volatile sig_atomic_t signal_handler_ignore_atexit = 0
 
static volatile sig_atomic_t unlimited_corefile_retcode = 9999
 
static volatile unsigned long long int saved_corefile_hardlimit = 0
 
static int allow_coredump = -1
 
static drhook_sig_t siglist [1+NSIG] = { 0 }
 
static char * a_out = NULL
 
static char * mon_out = NULL
 
static int mon_out_procs = -1
 
static double percent_limit = -10
 
static drhook_key_t ** keyself = NULL
 
static double * overhead
 
static drhook_key_t ** curkeyptr = NULL
 
static drhook_watch_twatch = NULL
 
static drhook_watch_tlast_watch = NULL
 
static int watch_count = 0
 
static drhook_prefix_tec_drhook = NULL
 
static int timestr_len = 0
 
static int cstklen = NCALLSTACK
 
static int nhash = NHASH
 
static unsigned int hashsize = HASHSIZE(NHASH)
 
static unsigned int hashmask = HASHMASK(NHASH)
 
static callstack_t ** cstk = NULL
 
static int do_prof_off = 0
 
static pthread_mutex_t hpm_lock = PTHREAD_MUTEX_INITIALIZER
 
static int * hpm_tid_init = NULL
 
static double cycles = 1300000000.0
 

Typedef Documentation

◆ callstack_t

typedef struct callstack_t callstack_t

◆ drhook_calltree_t

typedef struct drhook_calltree_t drhook_calltree_t

◆ drhook_key_t

typedef struct drhook_key_t drhook_key_t

◆ drhook_memprof_t

typedef struct drhook_memprof_t drhook_memprof_t

◆ drhook_prefix_t

typedef struct drhook_prefix_t drhook_prefix_t

◆ drhook_prof_t

typedef struct drhook_prof_t drhook_prof_t

◆ drhook_sig_t

typedef struct drhook_sig_t drhook_sig_t

◆ drhook_timeline_t

typedef struct drhook_timeline_t drhook_timeline_t

◆ drhook_watch_t

typedef struct drhook_watch_t drhook_watch_t

Enumeration Type Documentation

◆ PrintWatchKeys_t

Enumerator
KEYNONE 
KEYLOG 
KEYCHAR 
KEY_I4 
KEY_I8 
KEY_R4 
KEY_R8 

Definition at line 2968 of file drhook.c.

Function Documentation

◆ c_drhook_check_watch_()

void c_drhook_check_watch_ ( const char *  where,
const int *  allow_abort,
int  where_len 
)

Definition at line 3060 of file drhook.c.

Here is the call graph for this function:

◆ c_drhook_end_()

void c_drhook_end_ ( const char *  name,
const int *  thread_id,
const double *  key,
const char *  filename,
const int *  sizeinfo,
int  name_len,
int  filename_len 
)

Definition at line 3320 of file drhook.c.

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

◆ c_drhook_getenv_()

void c_drhook_getenv_ ( const char *  s,
char *  value,
int  slen,
const int  valuelen 
)

Definition at line 3088 of file drhook.c.

Here is the call graph for this function:

◆ c_drhook_init_()

void c_drhook_init_ ( const char *  progname,
const int *  num_threads,
int  progname_len 
)

Definition at line 3116 of file drhook.c.

Here is the call graph for this function:

◆ c_drhook_init_signals_()

void c_drhook_init_signals_ ( const int *  enforce)

Definition at line 4474 of file drhook.c.

Here is the call graph for this function:

◆ c_drhook_memcounter_()

void c_drhook_memcounter_ ( const int *  thread_id,
const long long int *  size,
long long int *  keyptr_addr 
)

Definition at line 3392 of file drhook.c.

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

◆ c_drhook_not_mpi_()

void c_drhook_not_mpi_ ( )

Definition at line 1754 of file drhook.c.

◆ c_drhook_print_()

void c_drhook_print_ ( const int *  ftnunitno,
const int *  thread_id,
const int *  print_option,
int *  level 
)

Definition at line 3639 of file drhook.c.

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

◆ c_drhook_process_options_()

void c_drhook_process_options_ ( const int *  lhook,
const int *  Myproc,
const int *  Nproc 
)

Definition at line 1963 of file drhook.c.

Here is the call graph for this function:

◆ c_drhook_raise_()

void c_drhook_raise_ ( const int *  sig)

Definition at line 4487 of file drhook.c.

◆ c_drhook_set_lhook_()

void c_drhook_set_lhook_ ( const int *  lhook)

Definition at line 3080 of file drhook.c.

Here is the caller graph for this function:

◆ c_drhook_set_mpi_()

void c_drhook_set_mpi_ ( )

Definition at line 1748 of file drhook.c.

Here is the call graph for this function:

◆ c_drhook_start_()

void c_drhook_start_ ( const char *  name,
const int *  thread_id,
double *  key,
const char *  filename,
const int *  sizeinfo,
int  name_len,
int  filename_len 
)

Definition at line 3225 of file drhook.c.

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

◆ c_drhook_watch_()

void c_drhook_watch_ ( const int *  onoff,
const char *  array_name,
const void *  array_ptr,
const int *  nbytes,
const int *  abort_if_changed,
const int *  printkey,
const int *  nvals,
const int *  print_traceback_when_set,
int  array_name_len 
)

Definition at line 3152 of file drhook.c.

Here is the call graph for this function:

◆ calloc_drhook()

static void* calloc_drhook ( size_t  nmemb,
size_t  size 
)
static

Definition at line 638 of file drhook.c.

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

◆ callpath_hashfunc()

unsigned int callpath_hashfunc ( unsigned int  inithash,
const equivalence_t *  callpath,
int  callpath_len,
unsigned int *  fullhash 
)

Definition at line 811 of file drhook.c.

Here is the caller graph for this function:

◆ callstack()

static drhook_key_t* callstack ( int  tid,
void *  key,
drhook_key_t keyptr 
)
static

Definition at line 662 of file drhook.c.

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

◆ catch_signals()

static void catch_signals ( int  silent)
static

Definition at line 1082 of file drhook.c.

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

◆ check_watch()

static void check_watch ( const char *  label,
const char *  name,
int  name_len,
int  allow_abort 
)
static

Definition at line 3004 of file drhook.c.

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

◆ dbl_commie()

static void dbl_commie ( double  n,
char  sd[] 
)
static

Definition at line 2846 of file drhook.c.

Here is the caller graph for this function:

◆ divpc_hpm()

static double divpc_hpm ( const drhook_key_t keyptr)
static

Definition at line 4926 of file drhook.c.

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

◆ do_prof()

static void do_prof ( )
static

Definition at line 2932 of file drhook.c.

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

◆ Dr_Hook()

void Dr_Hook ( const char *  name,
int  option,
double *  handle,
const char *  filename,
int  sizeinfo,
int  name_len,
int  filename_len 
)

Definition at line 4496 of file drhook.c.

Here is the call graph for this function:

◆ DrHookPrint()

static void DrHookPrint ( int  ftnunitno,
const char *  line 
)
static

Definition at line 3623 of file drhook.c.

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

◆ dump_file()

static void dump_file ( const char *  pfx,
int  tid,
int  sig,
int  nsigs,
const char  filename[] 
)
static

Definition at line 534 of file drhook.c.

Here is the caller graph for this function:

◆ dump_hugepages()

static void dump_hugepages ( int  enforce,
const char *  pfx,
int  tid,
int  sig,
int  nsigs 
)
static

Definition at line 562 of file drhook.c.

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

◆ ec_set_umask_()

void ec_set_umask_ ( )

Definition at line 76 of file endian.c.

Here is the caller graph for this function:

◆ fedisableexcept()

void fedisableexcept ( )

Definition at line 114 of file drhook.c.

Here is the caller graph for this function:

◆ feenableexcept()

void feenableexcept ( )

Definition at line 113 of file drhook.c.

Here is the caller graph for this function:

◆ flop_()

double flop_ ( )
Here is the caller graph for this function:

◆ flptrap()

static void flptrap ( int  sig)
static

Definition at line 1019 of file drhook.c.

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

◆ fujitsu_getrusage()

static int fujitsu_getrusage ( int  who,
struct rusage *  rusage 
)
static

Definition at line 5118 of file drhook.c.

Here is the caller graph for this function:

◆ gdb__sigdump()

static void gdb__sigdump ( int sig  SIG_EXTRA_ARGS)
static

Definition at line 1250 of file drhook.c.

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

◆ get_callpath()

static equivalence_t* get_callpath ( int  tid,
int *  callpath_len 
)
static

Definition at line 2902 of file drhook.c.

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

◆ get_memmon_out()

static char* get_memmon_out ( int  me)
static

Definition at line 1932 of file drhook.c.

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

◆ get_mon_out()

static char* get_mon_out ( int  me)
static

Definition at line 1917 of file drhook.c.

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

◆ get_thread_id_()

int get_thread_id_ ( )
Here is the caller graph for this function:

◆ getcurheap_()

long long int getcurheap_ ( )
Here is the caller graph for this function:

◆ getcurheap_thread_()

long long int getcurheap_thread_ ( const int *  tidnum)
Here is the caller graph for this function:

◆ gethwm_()

long long int gethwm_ ( )
Here is the caller graph for this function:

◆ getkey()

static drhook_key_t* getkey ( int  tid,
const char *  name,
int  name_len,
const char *  filename,
int  filename_len,
const double *  walltime,
const double *  cputime,
const equivalence_t *  callpath,
int  callpath_len,
int *  free_callpath 
)
static

Definition at line 2439 of file drhook.c.

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

◆ getmaxcurheap_()

long long int getmaxcurheap_ ( )

◆ getmaxcurheap_thread_()

long long int getmaxcurheap_thread_ ( const int *  tidnum)
Here is the caller graph for this function:

◆ getmaxhwm_()

long long int getmaxhwm_ ( )

Definition at line 120 of file gethwm.c.

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

◆ getmaxrss_()

long long int getmaxrss_ ( )

Definition at line 5 of file getmaxrss.c.

Here is the caller graph for this function:

◆ getmaxstk_()

long long int getmaxstk_ ( )

Definition at line 111 of file getstk.c.

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

◆ getpag_()

long long int getpag_ ( )
Here is the caller graph for this function:

◆ getrss_()

long long int getrss_ ( )
Here is the caller graph for this function:

◆ getstk_()

ll_t getstk_ ( )

Definition at line 63 of file getstk.c.

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

◆ gettid()

static pid_t gettid ( )
static

Definition at line 471 of file drhook.c.

Here is the caller graph for this function:

◆ hashfunc()

unsigned int hashfunc ( const char *  s,
int  s_len 
)

Definition at line 790 of file drhook.c.

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

◆ ignore_signals()

static void ignore_signals ( int  silent)
static

Definition at line 1198 of file drhook.c.

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

◆ init_drhook()

static void init_drhook ( int  ntids)
static

Definition at line 2639 of file drhook.c.

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

◆ init_hpm()

static void init_hpm ( int  tid)
static

Definition at line 4554 of file drhook.c.

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

◆ insert_calltree()

static void insert_calltree ( int  tid,
drhook_key_t keyptr 
)
static

Definition at line 827 of file drhook.c.

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

◆ insertkey()

static drhook_key_t* insertkey ( int  tid,
const drhook_key_t keyptr_in 
)
static

Definition at line 2412 of file drhook.c.

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

◆ irtc()

long long int irtc ( )
Here is the caller graph for this function:

◆ irtc_()

long long int irtc_ ( )
Here is the caller graph for this function:

◆ irtc_rate_()

long long int irtc_rate_ ( )
Here is the caller graph for this function:

◆ itself()

static drhook_key_t* itself ( drhook_key_t keyptr_self,
int  tid,
int  opt,
double *  delta_time,
const double *  walltime,
const double *  cputime 
)
static

Definition at line 2788 of file drhook.c.

◆ LinuxTraceBack()

void LinuxTraceBack ( const char *  prefix,
const char *  timestr,
void *  sigcontextptr 
)

Definition at line 385 of file linuxtrbk.c.

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

◆ lld_commie()

static void lld_commie ( long long int  n,
char  sd[] 
)
static

Definition at line 2820 of file drhook.c.

Here is the caller graph for this function:

◆ malloc_drhook()

static void* malloc_drhook ( size_t  size)
static

Definition at line 622 of file drhook.c.

Here is the caller graph for this function:

◆ memprof_name_comp()

static int memprof_name_comp ( const void *  v1,
const void *  v2 
)
static

Definition at line 3536 of file drhook.c.

Here is the caller graph for this function:

◆ memprof_pc_comp_desc()

static int memprof_pc_comp_desc ( const void *  v1,
const void *  v2 
)
static

Definition at line 3554 of file drhook.c.

Here is the caller graph for this function:

◆ memstat()

static void memstat ( drhook_key_t keyptr,
const int *  thread_id,
int  in_getkey 
)
static

Definition at line 968 of file drhook.c.

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

◆ mflop_count()

static double mflop_count ( const drhook_key_t keyptr)
static

Definition at line 4962 of file drhook.c.

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

◆ mflops_hpm()

static double mflops_hpm ( const drhook_key_t keyptr)
static

Definition at line 4881 of file drhook.c.

Here is the call graph for this function:

◆ mip_count()

static double mip_count ( const drhook_key_t keyptr)
static

Definition at line 4991 of file drhook.c.

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

◆ mips_hpm()

static double mips_hpm ( const drhook_key_t keyptr)
static

Definition at line 4912 of file drhook.c.

◆ necsx_trbk_()

void necsx_trbk_ ( const char *  msg,
int  msglen 
)
Here is the caller graph for this function:

◆ print_routine_name0()

static void print_routine_name0 ( FILE *  fp,
const char *  p_name,
int  p_tid,
const char *  p_filename,
int  p_cluster,
const equivalence_t *  p_callpath,
int  p_callpath_len,
int  len,
int  cluster_size 
)
static

Definition at line 3576 of file drhook.c.

Here is the call graph for this function:

◆ print_watch()

static void print_watch ( int  ftnunitno,
int  key,
const void *  ptr,
int  n 
)
static

Definition at line 2978 of file drhook.c.

Here is the caller graph for this function:

◆ process_options()

static void process_options ( )
static

Definition at line 1974 of file drhook.c.

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

◆ prof_name_comp()

static int prof_name_comp ( const void *  v1,
const void *  v2 
)
static

Definition at line 3528 of file drhook.c.

Here is the caller graph for this function:

◆ prof_pc_comp_desc()

static int prof_pc_comp_desc ( const void *  v1,
const void *  v2 
)
static

Definition at line 3544 of file drhook.c.

Here is the caller graph for this function:

◆ putkey()

static void putkey ( int  tid,
drhook_key_t keyptr,
const char *  name,
int  name_len,
int  sizeinfo,
double *  walltime,
double *  cputime 
)
static

Definition at line 2531 of file drhook.c.

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

◆ random_memstat()

static void random_memstat ( int  tid,
int  enforce 
)
static

Definition at line 1947 of file drhook.c.

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

◆ remove_calltree()

static void remove_calltree ( int  tid,
drhook_key_t keyptr,
const double *  delta_wall,
const double *  delta_cpu 
)
static

Definition at line 870 of file drhook.c.

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

◆ restore_default_signals()

static void restore_default_signals ( int  silent)
static

Definition at line 1149 of file drhook.c.

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

◆ safe_llitoa()

static char* safe_llitoa ( long long int  i,
char  b[],
int  blen 
)
static

Definition at line 1400 of file drhook.c.

Here is the caller graph for this function:

◆ set_default_handler()

static int set_default_handler ( int  sig,
int  unlimited_corefile,
int  verbose 
)
static

Definition at line 590 of file drhook.c.

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

◆ set_timed_kill()

static void set_timed_kill ( )
static

Definition at line 5212 of file drhook.c.

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

◆ set_unlimited_corefile()

static int set_unlimited_corefile ( unsigned long long int *  hardlimit)
static

Definition at line 1347 of file drhook.c.

Here is the caller graph for this function:

◆ signal_drhook()

static void signal_drhook ( int sig  SIG_EXTRA_ARGS)
static

Definition at line 1462 of file drhook.c.

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

◆ signal_drhook_init()

static void signal_drhook_init ( int  enforce)
static

Definition at line 1766 of file drhook.c.

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

◆ signal_gencore()

static void signal_gencore ( int sig  SIG_EXTRA_ARGS)
static

Definition at line 1374 of file drhook.c.

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

◆ signal_harakiri()

static void signal_harakiri ( int sig  SIG_EXTRA_ARGS)
static

Definition at line 1424 of file drhook.c.

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

◆ spin()

static int spin ( int  secs)
static

Definition at line 525 of file drhook.c.

Here is the caller graph for this function:

◆ stop_only_hpm()

static void stop_only_hpm ( int  tid,
drhook_key_t pstop 
)
static

Definition at line 4713 of file drhook.c.

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

◆ stopstart_hpm()

static void stopstart_hpm ( int  tid,
drhook_key_t pstop,
drhook_key_t pstart 
)
static

Definition at line 4749 of file drhook.c.

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

◆ strdup2_drhook()

static char* strdup2_drhook ( const char *  s,
int  s_len 
)
static

Definition at line 750 of file drhook.c.

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

◆ strdup_drhook()

static char* strdup_drhook ( const char *  s)
static

Definition at line 738 of file drhook.c.

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

◆ times()

clock_t times ( struct tms *  buffer)
Here is the caller graph for this function:

◆ timestamp()

static char* timestamp ( )
static

Definition at line 762 of file drhook.c.

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

◆ TimeStr()

static char * TimeStr ( char *  s,
int  slen 
)
static

Definition at line 775 of file drhook.c.

Here is the call graph for this function:

◆ trapfpe()

static void trapfpe ( void  )
static

Definition at line 117 of file drhook.c.

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

◆ trapfpe_treatment()

static void trapfpe_treatment ( int  sig,
int  silent 
)
static

Definition at line 1118 of file drhook.c.

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

◆ trim()

static const char* trim ( const char *  name,
int *  n 
)
static

Definition at line 2383 of file drhook.c.

◆ trim_and_adjust_left()

static const char* trim_and_adjust_left ( const char *  p,
int *  name_len 
)
static

Definition at line 3564 of file drhook.c.

Here is the caller graph for this function:

◆ unroll_callpath()

static void unroll_callpath ( FILE *  fp,
int  len,
const equivalence_t *  callpath,
int  callpath_len 
)
static

Definition at line 2874 of file drhook.c.

Here is the caller graph for this function:

◆ untrapfpe()

static void untrapfpe ( void  )
static

Definition at line 123 of file drhook.c.

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

◆ util_cputime_()

double util_cputime_ ( )

Definition at line 5064 of file drhook.c.

Here is the call graph for this function:

◆ util_ihpstat_()

FORTRAN_CALL int util_ihpstat_ ( int *  option)

Definition at line 5173 of file drhook.c.

Here is the call graph for this function:

◆ util_walltime_()

double util_walltime_ ( )

Definition at line 5040 of file drhook.c.

Here is the caller graph for this function:

Variable Documentation

◆ a_out

char* a_out = NULL
static

Definition at line 449 of file drhook.c.

◆ allow_coredump

int allow_coredump = -1
static

Definition at line 447 of file drhook.c.

◆ any_memstat

int any_memstat = 0
static

Definition at line 151 of file drhook.c.

◆ atp_enabled

int atp_enabled = 0
static

Definition at line 146 of file drhook.c.

◆ atp_ignore_sigterm

int atp_ignore_sigterm = 0
static

Definition at line 149 of file drhook.c.

◆ atp_max_analysis_time

int atp_max_analysis_time = 300
static

Definition at line 148 of file drhook.c.

◆ atp_max_cores

int atp_max_cores = 20
static

Definition at line 147 of file drhook.c.

◆ callpath_depth

int callpath_depth = callpath_depth_default
static

Definition at line 174 of file drhook.c.

◆ callpath_indent

int callpath_indent = callpath_indent_default
static

Definition at line 172 of file drhook.c.

◆ callpath_packed

int callpath_packed = 0
static

Definition at line 175 of file drhook.c.

◆ calltree

drhook_calltree_t** calltree = NULL
static

Definition at line 440 of file drhook.c.

◆ cstk

callstack_t** cstk = NULL
static

Definition at line 660 of file drhook.c.

◆ cstklen

int cstklen = NCALLSTACK
static

Definition at line 486 of file drhook.c.

◆ curkeyptr

drhook_key_t** curkeyptr = NULL
static

Definition at line 455 of file drhook.c.

◆ cycles

static double cycles = 1300000000.0
static

Definition at line 4540 of file drhook.c.

◆ dclock_start

double dclock_start = 0
static

Definition at line 274 of file drhook.c.

◆ do_prof_off

int do_prof_off = 0
static

Definition at line 2929 of file drhook.c.

◆ drhook_dump_buddyinfo

int drhook_dump_buddyinfo = 0
static

Definition at line 200 of file drhook.c.

◆ drhook_dump_hugepages

int drhook_dump_hugepages = 0
static

Definition at line 201 of file drhook.c.

◆ drhook_dump_hugepages_freq

double drhook_dump_hugepages_freq = 0
static

Definition at line 202 of file drhook.c.

◆ drhook_dump_smaps

int drhook_dump_smaps = 0
static

Definition at line 199 of file drhook.c.

◆ drhook_harakiri_timeout

int drhook_harakiri_timeout = drhook_harakiri_timeout_default
static

Definition at line 143 of file drhook.c.

◆ DRHOOK_lock

o_lock_t DRHOOK_lock = 0
static

Definition at line 433 of file drhook.c.

◆ drhook_memtrace

int drhook_memtrace = 0

Definition at line 79 of file drhook.c.

◆ drhook_timed_kill

char* drhook_timed_kill = NULL
static

Definition at line 198 of file drhook.c.

◆ drhook_trapfpe

int drhook_trapfpe = 1
static

Definition at line 144 of file drhook.c.

◆ ec_drhook

drhook_prefix_t* ec_drhook = NULL
static

Definition at line 459 of file drhook.c.

◆ end_stamp

char* end_stamp = NULL
static

Definition at line 94 of file drhook.c.

◆ hashmask

unsigned int hashmask = HASHMASK(NHASH)
static

Definition at line 495 of file drhook.c.

◆ hashsize

unsigned int hashsize = HASHSIZE(NHASH)
static

Definition at line 494 of file drhook.c.

◆ hpm_grp

int hpm_grp = 0
static

Definition at line 194 of file drhook.c.

◆ hpm_lock

pthread_mutex_t hpm_lock = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 4537 of file drhook.c.

◆ hpm_tid_init

static int * hpm_tid_init = NULL
static

Definition at line 4539 of file drhook.c.

◆ irtc_start

static long long int irtc_start = 0
static

Definition at line 267 of file drhook.c.

◆ keydata

drhook_key_t** keydata = NULL
static

Definition at line 439 of file drhook.c.

◆ keyself

drhook_key_t** keyself = NULL
static

Definition at line 453 of file drhook.c.

◆ last_watch

drhook_watch_t* last_watch = NULL
static

Definition at line 457 of file drhook.c.

◆ max_threads

int max_threads = 1
static

Definition at line 437 of file drhook.c.

◆ mon_out

char* mon_out = NULL
static

Definition at line 450 of file drhook.c.

◆ mon_out_procs

int mon_out_procs = -1
static

Definition at line 451 of file drhook.c.

◆ my_inv_irtc_rate

double my_inv_irtc_rate = 0
static

Definition at line 288 of file drhook.c.

◆ my_irtc_rate

double my_irtc_rate = 0
static

Definition at line 287 of file drhook.c.

◆ myproc

int myproc = 1
static

Definition at line 435 of file drhook.c.

◆ nhash

int nhash = NHASH
static

Definition at line 493 of file drhook.c.

◆ nproc

int nproc = -1
static

Definition at line 436 of file drhook.c.

◆ numthreads

int numthreads = 0
static

Definition at line 434 of file drhook.c.

◆ opt_callpath

int opt_callpath = 0
static

Definition at line 170 of file drhook.c.

◆ opt_calls

int opt_calls = 0
static

Definition at line 163 of file drhook.c.

◆ opt_calltrace

int opt_calltrace = 0
static

Definition at line 177 of file drhook.c.

◆ opt_clusterinfo

int opt_clusterinfo = 0
static

Definition at line 169 of file drhook.c.

◆ opt_cpuprof

int opt_cpuprof = 0
static

Definition at line 159 of file drhook.c.

◆ opt_cputime

int opt_cputime = 0
static

Definition at line 157 of file drhook.c.

◆ opt_funcenter

int opt_funcenter = 0
static

Definition at line 178 of file drhook.c.

◆ opt_funcexit

int opt_funcexit = 0
static

Definition at line 179 of file drhook.c.

◆ opt_gencore

volatile sig_atomic_t opt_gencore = 0
static

Definition at line 191 of file drhook.c.

◆ opt_gencore_signal

int opt_gencore_signal = 0
static

Definition at line 192 of file drhook.c.

◆ opt_gethwm

int opt_gethwm = 0
static

Definition at line 152 of file drhook.c.

◆ opt_getpag

int opt_getpag = 0
static

Definition at line 155 of file drhook.c.

◆ opt_getrss

int opt_getrss = 0
static

Definition at line 154 of file drhook.c.

◆ opt_getstk

int opt_getstk = 0
static

Definition at line 153 of file drhook.c.

◆ opt_hpmprof

int opt_hpmprof = 0
static

Definition at line 160 of file drhook.c.

◆ opt_hpmstop_mflops

double opt_hpmstop_mflops = 1000000.0
static

Definition at line 217 of file drhook.c.

◆ opt_hpmstop_threshold

long long int opt_hpmstop_threshold = -1
static

Definition at line 216 of file drhook.c.

◆ opt_memprof

int opt_memprof = 0
static

Definition at line 161 of file drhook.c.

◆ opt_propagate_signals

int opt_propagate_signals = 1
static

Definition at line 167 of file drhook.c.

◆ opt_random_memstat

int opt_random_memstat = 0
static

Definition at line 195 of file drhook.c.

◆ opt_self

int opt_self = 1
static

Definition at line 164 of file drhook.c.

◆ opt_sizeinfo

int opt_sizeinfo = 1
static

Definition at line 168 of file drhook.c.

◆ opt_timeline

int opt_timeline = 0
static

Definition at line 181 of file drhook.c.

◆ opt_timeline_format

int opt_timeline_format = 1
static

Definition at line 186 of file drhook.c.

◆ opt_timeline_freq

long long int opt_timeline_freq = 1000000
static

Definition at line 188 of file drhook.c.

◆ opt_timeline_MB

double opt_timeline_MB = 1.0
static

Definition at line 189 of file drhook.c.

◆ opt_timeline_thread

int opt_timeline_thread = 1
static

Definition at line 182 of file drhook.c.

◆ opt_timeline_unitno

int opt_timeline_unitno = 6
static

Definition at line 187 of file drhook.c.

◆ opt_trim

int opt_trim = 0
static

Definition at line 162 of file drhook.c.

◆ opt_wallprof

int opt_wallprof = 0
static

Definition at line 158 of file drhook.c.

◆ opt_walltime

int opt_walltime = 0
static

Definition at line 156 of file drhook.c.

◆ overhead

double* overhead
static

Definition at line 454 of file drhook.c.

◆ percent_limit

double percent_limit = -10
static

Definition at line 452 of file drhook.c.

◆ pid

pid_t pid = -1
static

Definition at line 438 of file drhook.c.

◆ saved_corefile_hardlimit

volatile unsigned long long int saved_corefile_hardlimit = 0
static

Definition at line 446 of file drhook.c.

◆ siglist

drhook_sig_t siglist[1+NSIG] = { 0 }
static

Definition at line 448 of file drhook.c.

◆ signal_handler_called

volatile sig_atomic_t signal_handler_called = 0
static

Definition at line 443 of file drhook.c.

◆ signal_handler_ignore_atexit

volatile sig_atomic_t signal_handler_ignore_atexit = 0
static

Definition at line 444 of file drhook.c.

◆ signals_set

int signals_set = 0
static

Definition at line 442 of file drhook.c.

◆ start_stamp

char* start_stamp = NULL
static

Definition at line 93 of file drhook.c.

◆ thiscall

drhook_calltree_t** thiscall = NULL
static

Definition at line 441 of file drhook.c.

◆ timeline

drhook_timeline_t* timeline = NULL
static

Definition at line 212 of file drhook.c.

◆ timestr_len

int timestr_len = 0
static

Definition at line 460 of file drhook.c.

◆ unlimited_corefile_retcode

volatile sig_atomic_t unlimited_corefile_retcode = 9999
static

Definition at line 445 of file drhook.c.

◆ watch

drhook_watch_t* watch = NULL
static

Definition at line 456 of file drhook.c.

◆ watch_count

int watch_count = 0
static

Definition at line 458 of file drhook.c.