Go to the documentation of this file. 51 #ifndef _MONITOR_EXT_H_ 52 #define _MONITOR_EXT_H_ 57 #ifdef HPCRUN_STATIC_LINK 59 #define MONITOR_EXT_CONCAT(x, y) x ## y 63 #define MONITOR_EXT_WRAP_NAME(name) MONITOR_EXT_CONCAT(__wrap_, name) 64 #define MONITOR_EXT_GET_NAME(var, name) var = & name 65 #define MONITOR_EXT_GET_NAME_WRAP(var, name) var = & __real_ ## name 67 #define MONITOR_EXT_DECLARE_REAL_FN(type, realname) \ 68 extern type MONITOR_EXT_CONCAT(__, realname); \ 69 static type * realname = NULL 76 #define RTLD_NEXT ((void *) -1L) 79 #define MONITOR_EXT_GET_DLSYM(var, name) do { \ 81 const char *err_str; \ 83 var = dlsym(RTLD_NEXT, #name ); \ 84 err_str = dlerror(); \ 86 hpcrun_abort("dlsym(%s) failed: %s", #name , err_str); \ 88 TMSG(MONITOR_EXTS, "%s() = %p", #name , var); \ 92 #define MONITOR_EXT_WRAP_NAME(name) name 93 #define MONITOR_EXT_GET_NAME(var, name) MONITOR_EXT_GET_DLSYM(var, name) 94 #define MONITOR_EXT_GET_NAME_WRAP(var, name) MONITOR_EXT_GET_DLSYM(var, name) 96 #define MONITOR_EXT_DECLARE_REAL_FN(type, realname) \ 97 static type * realname = NULL