67 #ifndef hpcrun_flat_monitor_h 68 #define hpcrun_flat_monitor_h 78 #include <sys/profil.h> 82 #include <include/hpctoolkit-config.h> 91 #define HPCRUN_DBG_LVL 0 102 #define MSG_str(fmt) \ 103 HPCRUN_NAME" [pid %d, tid 0x%lx]: " fmt "\n", getpid(), hpcrun_gettid() 106 #define MSG0(x, fmt) \ 107 { fprintf(x, MSG_str(fmt)); } 109 #define MSGx(x, fmt, ...) \ 110 { fprintf(x, MSG_str(fmt), __VA_ARGS__); } 116 #define ERRMSG0(fmt) \ 117 { if (HPCRUN_DBG_LVL) { \ 118 fprintf(stderr, MSG_str("[%s:%d]: " fmt), __FILE__, __LINE__); } \ 120 fprintf(stderr, MSG_str(fmt)); } \ 123 #define ERRMSGx(fmt, ...) \ 124 { if (HPCRUN_DBG_LVL) { \ 125 fprintf(stderr, MSG_str("[%s:%d]: " fmt), __FILE__, __LINE__, __VA_ARGS__); } \ 127 fprintf(stderr, MSG_str(fmt), __VA_ARGS__); } \ 137 #define DIE0(fmt) ERRMSG0(fmt); { exit(1); } 139 #define DIEx(fmt, ...) ERRMSGx(fmt, __VA_ARGS__); { exit(1); } 192 #define HPC_GETL_SYSPROFS(x) ((x)->sysprofs) 193 #define HPC_GET_SYSPROFS(x) ((hpcsys_profile_desc_vec_t*)((x)->sysprofs)) 196 #define HPC_GETL_PAPIPROFS(x) ((x)->papiprofs) 197 #define HPC_GET_PAPIPROFS(x) ((hpcpapi_profile_desc_vec_t*)((x)->papiprofs)) 206 #define PARAMS_START_MAIN (int (*main) (int, char **, char **), \ 208 char *__unbounded *__unbounded ubp_av, \ 209 void (*init) (void), \ 210 void (*fini) (void), \ 211 void (*rtld_fini) (void), \ 212 void *__unbounded stack_end) 218 #define PARAMS_EXECV (const char *path, char *const argv[]) 219 #define PARAMS_EXECVP (const char *file, char *const argv[]) 220 #define PARAMS_EXECVE (const char *path, char *const argv[], \ 228 typedef void* (*dlopen_fptr_t) (
const char *filename,
int flag);
234 #define PARAMS_PTHREAD_CREATE (pthread_t* thread, \ 235 const pthread_attr_t* attr, \ 236 void *(*start_routine)(void*), \ 240 void* (*start_routine)(
void*);
275 const char* arg, va_list arglist);
unsigned int bytesPerCntr
void init_papi_for_process_SPECIALIZED()
#define PARAMS_PTHREAD_CREATE
void(* _exit_fptr_t)(int)
void init_library_SPECIALIZED()
void(* libc_start_main_fini_fptr_t)(void)
hpcrun_profiles_desc_t * profdesc
long hpcrun_gettid_SPECIALIZED()
hpc_threadprof_t opt_thread
enum enum_hpc_threadprof_t hpc_threadprof_t
void fini_thread(hpcrun_profiles_desc_t **profdesc, int is_thread)
pthread_t(* pthread_self_fptr_t)(void)
#define PARAMS_START_MAIN
unsigned int bytesPerCodeBlk
hpcrun_ofile_desc_t ofile
pid_t(* fork_fptr_t)(void)
hpcrun_profiles_desc_t * init_thread(int is_thread)
char opt_outpath[PATH_MAX]
hpcsys_profile_desc_t * vec
void hpcrun_parse_execl(const char ***argv, const char *const **envp, const char *arg, va_list arglist)