HPCToolkit
lush.c File Reference
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <dlfcn.h>
#include <monitor.h>
#include "lush.h"
#include <lib/prof-lean/lush/lush-support.h>
#include <unwind/common/unwind.h>
#include <memory/hpcrun-malloc.h>
Include dependency graph for lush.c:

Go to the source code of this file.

Macros

#define CALL_DLSYM(BASE, X, ID, HANDLE)
 
#define FN_TBL_ALLOC(BASE, FN, SZ)   BASE->FN = (FN ## _fn_t *) hpcrun_malloc(sizeof(FN ## _fn_t) * (SZ))
 
#define FN_TBL_FREE(BASE, FN)   /* free(BASE->FN) */
 

Functions

static void handle_any_dlerror ()
 
int lush_agent__init (lush_agent_t *x, int id, const char *path, lush_agent_pool_t *pool)
 
int lush_agent__fini (lush_agent_t *x, lush_agent_pool_t *pool)
 
int lush_agent_pool__init (lush_agent_pool_t *x, const char *path)
 
int lush_agent_pool__fini (lush_agent_pool_t *x)
 
void lush_init_unw (lush_cursor_t *cursor, lush_agent_pool_t *apool, ucontext_t *context)
 
lush_step_t lush_step_bichord (lush_cursor_t *cursor)
 
lush_step_t lush_step_pnote (lush_cursor_t *cursor)
 
lush_step_t lush_step_lnote (lush_cursor_t *cursor)
 
lush_step_t lush_step_pchord (lush_cursor_t *cursor)
 
lush_step_t lush_forcestep_pnote (lush_cursor_t *cursor)
 

Macro Definition Documentation

◆ CALL_DLSYM

#define CALL_DLSYM (   BASE,
  X,
  ID,
  HANDLE 
)
Value:
BASE->X[ID] = (X ## _fn_t)dlsym(HANDLE, #X); \
handle_any_dlerror()

◆ FN_TBL_ALLOC

#define FN_TBL_ALLOC (   BASE,
  FN,
  SZ 
)    BASE->FN = (FN ## _fn_t *) hpcrun_malloc(sizeof(FN ## _fn_t) * (SZ))

◆ FN_TBL_FREE

#define FN_TBL_FREE (   BASE,
  FN 
)    /* free(BASE->FN) */

Function Documentation

◆ handle_any_dlerror()

static void handle_any_dlerror ( )
static

Definition at line 152 of file lush.c.

Here is the caller graph for this function:

◆ lush_agent__fini()

int lush_agent__fini ( lush_agent_t x,
lush_agent_pool_t pool 
)

Definition at line 135 of file lush.c.

Here is the call graph for this function:

◆ lush_agent__init()

int lush_agent__init ( lush_agent_t x,
int  id,
const char *  path,
lush_agent_pool_t pool 
)

Definition at line 97 of file lush.c.

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

◆ lush_agent_pool__fini()

int lush_agent_pool__fini ( lush_agent_pool_t x)

Definition at line 203 of file lush.c.

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

◆ lush_agent_pool__init()

int lush_agent_pool__init ( lush_agent_pool_t x,
const char *  path 
)

Definition at line 168 of file lush.c.

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

◆ lush_forcestep_pnote()

lush_step_t lush_forcestep_pnote ( lush_cursor_t cursor)

Definition at line 412 of file lush.c.

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

◆ lush_init_unw()

void lush_init_unw ( lush_cursor_t cursor,
lush_agent_pool_t apool,
ucontext_t *  context 
)

Definition at line 231 of file lush.c.

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

◆ lush_step_bichord()

lush_step_t lush_step_bichord ( lush_cursor_t cursor)

Definition at line 244 of file lush.c.

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

◆ lush_step_lnote()

lush_step_t lush_step_lnote ( lush_cursor_t cursor)

Definition at line 335 of file lush.c.

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

◆ lush_step_pchord()

lush_step_t lush_step_pchord ( lush_cursor_t cursor)

Definition at line 381 of file lush.c.

Here is the call graph for this function:

◆ lush_step_pnote()

lush_step_t lush_step_pnote ( lush_cursor_t cursor)

Definition at line 300 of file lush.c.

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