SURFEX v8.1
General documentation of Surfex
|
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_t * | callstack (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_t * | insertkey (int tid, const drhook_key_t *keyptr_in) |
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 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_t * | itself (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_t * | timeline = 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_t * | watch = NULL |
static drhook_watch_t * | last_watch = NULL |
static int | watch_count = 0 |
static drhook_prefix_t * | ec_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 struct callstack_t callstack_t |
typedef struct drhook_calltree_t drhook_calltree_t |
typedef struct drhook_key_t drhook_key_t |
typedef struct drhook_memprof_t drhook_memprof_t |
typedef struct drhook_prefix_t drhook_prefix_t |
typedef struct drhook_prof_t drhook_prof_t |
typedef struct drhook_sig_t drhook_sig_t |
typedef struct drhook_timeline_t drhook_timeline_t |
typedef struct drhook_watch_t drhook_watch_t |
enum PrintWatchKeys_t |
void c_drhook_check_watch_ | ( | const char * | where, |
const int * | allow_abort, | ||
int | where_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_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_init_signals_ | ( | const int * | enforce | ) |
void c_drhook_memcounter_ | ( | const int * | thread_id, |
const long long int * | size, | ||
long long int * | keyptr_addr | ||
) |
void c_drhook_print_ | ( | const int * | ftnunitno, |
const int * | thread_id, | ||
const int * | print_option, | ||
int * | level | ||
) |
void c_drhook_process_options_ | ( | const int * | lhook, |
const int * | Myproc, | ||
const int * | Nproc | ||
) |
void c_drhook_set_lhook_ | ( | const int * | lhook | ) |
void c_drhook_set_mpi_ | ( | ) |
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_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 | ||
) |
|
static |
unsigned int callpath_hashfunc | ( | unsigned int | inithash, |
const equivalence_t * | callpath, | ||
int | callpath_len, | ||
unsigned int * | fullhash | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void Dr_Hook | ( | const char * | name, |
int | option, | ||
double * | handle, | ||
const char * | filename, | ||
int | sizeinfo, | ||
int | name_len, | ||
int | filename_len | ||
) |
|
static |
|
static |
|
static |
void ec_set_umask_ | ( | ) |
void fedisableexcept | ( | ) |
void feenableexcept | ( | ) |
double flop_ | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int get_thread_id_ | ( | ) |
long long int getcurheap_ | ( | ) |
long long int getcurheap_thread_ | ( | const int * | tidnum | ) |
long long int gethwm_ | ( | ) |
|
static |
long long int getmaxcurheap_ | ( | ) |
long long int getmaxcurheap_thread_ | ( | const int * | tidnum | ) |
long long int getmaxhwm_ | ( | ) |
long long int getmaxrss_ | ( | ) |
long long int getmaxstk_ | ( | ) |
long long int getpag_ | ( | ) |
long long int getrss_ | ( | ) |
ll_t getstk_ | ( | ) |
|
static |
unsigned int hashfunc | ( | const char * | s, |
int | s_len | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
long long int irtc | ( | ) |
long long int irtc_ | ( | ) |
long long int irtc_rate_ | ( | ) |
|
static |
void LinuxTraceBack | ( | const char * | prefix, |
const char * | timestr, | ||
void * | sigcontextptr | ||
) |
Definition at line 385 of file linuxtrbk.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void necsx_trbk_ | ( | const char * | msg, |
int | msglen | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
clock_t times | ( | struct tms * | buffer | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
double util_cputime_ | ( | ) |
FORTRAN_CALL int util_ihpstat_ | ( | int * | option | ) |
double util_walltime_ | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |