HPCToolkit
agent-cilk.c File Reference
#include <stdlib.h>
#include <stdbool.h>
#include <pthread.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include "agent-cilk.h"
#include <messages/messages.h>
Include dependency graph for agent-cilk.c:

Go to the source code of this file.

Macros

#define LUSHCB_DECL(FN)   LUSH ## FN ## _fn_t FN
 
#define SET_LIP_AND_TY(cl, lip, ty)
 

Functions

 LUSHCB_DECL (CB_malloc)
 
 LUSHCB_DECL (CB_free)
 
 LUSHCB_DECL (CB_step)
 
 LUSHCB_DECL (CB_loadmap_find)
 
static int init_lcursor (lush_cursor_t *cursor)
 
static unw_seg_t classify_by_unw_segment (cilk_cursor_t *csr)
 
static unw_seg_t peek_segment (lush_cursor_t *cursor)
 
static bool is_libcilk (void *addr, char *lm_buffer)
 
static bool is_cilkprogram (void *addr, char *lm_buffer)
 
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)
 
int LUSHI_fini ()
 
char * LUSHI_strerror (int code)
 
int LUSHI_reg_dlopen ()
 
bool LUSHI_ismycode (void *addr)
 
lush_step_t LUSHI_step_bichord (lush_cursor_t *cursor)
 
lush_step_t LUSHI_step_pnote (lush_cursor_t *cursor)
 
lush_step_t LUSHI_step_lnote (lush_cursor_t *cursor)
 
int LUSHI_set_active_frame_marker ()
 
int LUSHI_lip_destroy (lush_lip_t *lip)
 
int LUSHI_lip_eq (lush_lip_t *lip)
 
int LUSHI_lip_read ()
 
int LUSHI_lip_write ()
 
bool LUSHI_do_metric (uint64_t incrMetricIn, bool *doMetric, bool *doMetricIdleness, uint64_t *incrMetric, double *incrMetricIdleness)
 

Variables

static lush_agentid_t MY_lush_aid
 
static const char * libcilk_str = "libcilk"
 
static const char * lib_str = "lib"
 
static const char * ld_str = "ld-linux"
 

Macro Definition Documentation

◆ LUSHCB_DECL

#define LUSHCB_DECL (   FN)    LUSH ## FN ## _fn_t FN

Definition at line 83 of file agent-cilk.c.

◆ SET_LIP_AND_TY

#define SET_LIP_AND_TY (   cl,
  lip,
  ty 
)
Value:
if (!cl) { \
cilk_ip_set(lip, ip_normalized_NULL_lval); \
} \
else { \
/* NOTE: interior lips should act like a return address; */ \
/* therefore, we add 1 */ \
ip_normalized_t ip = \
hpcrun_normalize_ip(CILKFRM_PROC(cl->frame) + 1, NULL); \
cilk_ip_set(lip, ip); \
}
static void * CILKFRM_PROC(CilkStackFrame *x)
Definition: agent-cilk.h:265
#define NULL
Definition: ElfHelper.cpp:85
const ip_normalized_t ip_normalized_NULL_lval
Definition: ip-normalized.c:66

Definition at line 312 of file agent-cilk.c.

Function Documentation

◆ classify_by_unw_segment()

static unw_seg_t classify_by_unw_segment ( cilk_cursor_t csr)
static

Definition at line 453 of file agent-cilk.c.

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

◆ init_lcursor()

static int init_lcursor ( lush_cursor_t cursor)
static

Definition at line 383 of file agent-cilk.c.

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

◆ is_cilkprogram()

bool is_cilkprogram ( void *  addr,
char *  lm_buffer 
)
static

Definition at line 190 of file agent-cilk.c.

Here is the caller graph for this function:

◆ is_libcilk()

bool is_libcilk ( void *  addr,
char *  lm_buffer 
)
static

Definition at line 178 of file agent-cilk.c.

Here is the caller graph for this function:

◆ LUSHCB_DECL() [1/4]

LUSHCB_DECL ( CB_malloc  )

◆ LUSHCB_DECL() [2/4]

LUSHCB_DECL ( CB_free  )

◆ LUSHCB_DECL() [3/4]

LUSHCB_DECL ( CB_step  )

◆ LUSHCB_DECL() [4/4]

LUSHCB_DECL ( CB_loadmap_find  )

◆ LUSHI_do_metric()

bool LUSHI_do_metric ( uint64_t  incrMetricIn,
bool *  doMetric,
bool *  doMetricIdleness,
uint64_t *  incrMetric,
double *  incrMetricIdleness 
)

Definition at line 557 of file agent-cilk.c.

Here is the caller graph for this function:

◆ LUSHI_fini()

int LUSHI_fini ( )

Definition at line 145 of file agent-cilk.c.

Here is the caller graph for this function:

◆ LUSHI_init()

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 
)

Definition at line 126 of file agent-cilk.c.

Here is the caller graph for this function:

◆ LUSHI_ismycode()

bool LUSHI_ismycode ( void *  addr)

Definition at line 170 of file agent-cilk.c.

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

◆ LUSHI_lip_destroy()

int LUSHI_lip_destroy ( lush_lip_t lip)

Definition at line 525 of file agent-cilk.c.

◆ LUSHI_lip_eq()

int LUSHI_lip_eq ( lush_lip_t lip)

Definition at line 532 of file agent-cilk.c.

◆ LUSHI_lip_read()

int LUSHI_lip_read ( )

Definition at line 539 of file agent-cilk.c.

◆ LUSHI_lip_write()

int LUSHI_lip_write ( )

Definition at line 546 of file agent-cilk.c.

◆ LUSHI_reg_dlopen()

int LUSHI_reg_dlopen ( )

Definition at line 163 of file agent-cilk.c.

Here is the caller graph for this function:

◆ LUSHI_set_active_frame_marker()

int LUSHI_set_active_frame_marker ( )

Definition at line 372 of file agent-cilk.c.

◆ LUSHI_step_bichord()

lush_step_t LUSHI_step_bichord ( lush_cursor_t cursor)

Definition at line 206 of file agent-cilk.c.

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

◆ LUSHI_step_lnote()

lush_step_t LUSHI_step_lnote ( lush_cursor_t cursor)

Definition at line 327 of file agent-cilk.c.

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

◆ LUSHI_step_pnote()

lush_step_t LUSHI_step_pnote ( lush_cursor_t cursor)

Definition at line 291 of file agent-cilk.c.

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

◆ LUSHI_strerror()

char* LUSHI_strerror ( int  code)

Definition at line 152 of file agent-cilk.c.

Here is the caller graph for this function:

◆ peek_segment()

static unw_seg_t peek_segment ( lush_cursor_t cursor)
static

Definition at line 502 of file agent-cilk.c.

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

Variable Documentation

◆ ld_str

const char* ld_str = "ld-linux"
static

Definition at line 101 of file agent-cilk.c.

◆ lib_str

const char* lib_str = "lib"
static

Definition at line 100 of file agent-cilk.c.

◆ libcilk_str

const char* libcilk_str = "libcilk"
static

Definition at line 99 of file agent-cilk.c.

◆ MY_lush_aid

lush_agentid_t MY_lush_aid
static

Definition at line 94 of file agent-cilk.c.