103 strcpy(x->
path, path);
106 x->
dlhandle = monitor_real_dlopen(path, RTLD_LAZY);
109 #define CALL_DLSYM(BASE, X, ID, HANDLE) \ 110 BASE->X[ID] = (X ## _fn_t)dlsym(HANDLE, #X); \ 125 pool->LUSHI_init[x->
id](0,
NULL, id,
126 (LUSHCB_malloc_fn_t)
NULL,
127 (LUSHCB_free_fn_t)
NULL,
137 pool->LUSHI_fini[x->
id]();
156 if ((error = dlerror()) !=
NULL) {
157 fprintf(stderr,
"%s\n", error);
176 #define FN_TBL_ALLOC(BASE, FN, SZ) \ 177 BASE->FN = (FN ## _fn_t *) hpcrun_malloc(sizeof(FN ## _fn_t) * (SZ)) 195 const char* apath = path;
205 #define FN_TBL_FREE(BASE, FN) \ 220 memset(x, 0,
sizeof(*x));
234 memset(cursor, 0,
sizeof(*cursor));
236 cursor->
apool = apool;
270 for (aid = 1; aid <= 1; ++aid) {
271 if (pool->LUSHI_ismycode[aid]((
void*) ip_unnorm)) {
272 ty = pool->LUSHI_step_bichord[aid](cursor);
347 ty = pool->LUSHI_step_lnote[aid](cursor);
385 #if 0 // FIXME: check this 424 ty = pool->LUSHI_step_pnote[aid](cursor);
lush_step_t lush_step_bichord(lush_cursor_t *cursor)
#define lush_agentid_NULL
lush_step_t LUSHI_step_bichord(lush_cursor_t *cursor)
char * LUSHI_strerror(int code)
static lush_lip_t * lush_cursor_get_lip(lush_cursor_t *cursor)
static void lush_lip_setLMId(lush_lip_t *x, uint16_t lmId)
lush_agent_pool_t * apool
lush_step_t LUSHI_step_lnote(lush_cursor_t *cursor)
int LUSHI_init(int argc, char **argv, lush_agentid_t aid, LUSHCB_malloc_fn_t malloc_fn, LUSHCB_free_fn_t free_fn, LUSHCB_step_fn_t step_fn, LUSHCB_loadmap_find_fn_t loadmap_fn)
bool LUSHI_do_metric(uint64_t incrMetricIn, bool *doMetric, bool *doMetricIdleness, uint64_t *incrMetric, double *incrMetricIdleness)
static void lush_cursor_unset_flag(lush_cursor_t *cursor, lush_cursor_flags_t f)
bool LUSHI_ismycode(void *addr)
#define FN_TBL_FREE(BASE, FN)
#define CALL_DLSYM(BASE, X, ID, HANDLE)
static void * lush_cursor_get_ip_unnorm(lush_cursor_t *cursor)
lush_step_t LUSHI_step_pnote(lush_cursor_t *cursor)
int LUSHCB_loadmap_find(void *addr, char *module_name, void **start, void **end)
void lush_init_unw(lush_cursor_t *cursor, lush_agent_pool_t *apool, ucontext_t *context)
lush_step_t lush_forcestep_pnote(lush_cursor_t *cursor)
int lush_agent__init(lush_agent_t *x, int id, const char *path, lush_agent_pool_t *pool)
int lush_agent_pool__fini(lush_agent_pool_t *x)
static void lush_lip_setLMIP(lush_lip_t *x, uint64_t lm_ip)
step_state hpcrun_unw_step(hpcrun_unw_cursor_t *c)
static ip_normalized_t lush_cursor_get_ip_norm(lush_cursor_t *cursor)
static void lush_cursor_set_aid(lush_cursor_t *cursor, lush_agentid_t aid)
static void lush_cursor_set_aid_prev(lush_cursor_t *cursor, lush_agentid_t aid)
static bool lush_cursor_is_flag(lush_cursor_t *cursor, lush_cursor_flags_t f)
lush_step_t lush_step_lnote(lush_cursor_t *cursor)
void * hpcrun_malloc(size_t size)
#define FN_TBL_ALLOC(BASE, FN, SZ)
enum lush_step lush_step_t
lush_step_t lush_step_pnote(lush_cursor_t *cursor)
static void lush_cursor_set_assoc(lush_cursor_t *cursor, lush_assoc_t as)
static void lush_cursor_set_flag(lush_cursor_t *cursor, lush_cursor_flags_t f)
static lush_assoc_t lush_cursor_get_assoc(lush_cursor_t *cursor)
#define lush_metricid_NULL
static lush_agentid_t lush_cursor_get_aid(lush_cursor_t *cursor)
static hpcrun_unw_cursor_t * lush_cursor_get_pcursor(lush_cursor_t *cursor)
int lush_agent__fini(lush_agent_t *x, lush_agent_pool_t *pool)
lush_step_t lush_step_pchord(lush_cursor_t *cursor)
static void handle_any_dlerror()
void hpcrun_unw_init_cursor(hpcrun_unw_cursor_t *cursor, void *context)
int lush_agent_pool__init(lush_agent_pool_t *x, const char *path)