HPCToolkit
cct.h File Reference
#include <stdio.h>
#include <stddef.h>
#include <stdbool.h>
#include <ucontext.h>
#include <assert.h>
#include <hpcrun/metrics.h>
#include <hpcrun/unwind/common/backtrace.h>
#include <hpcrun/utilities/ip-normalized.h>
#include <lib/prof-lean/hpcio.h>
#include <lib/prof-lean/hpcfmt.h>
#include <lib/prof-lean/hpcrun-fmt.h>
#include "cct_addr.h"
Include dependency graph for cct.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CCT_ROOT   HPCRUN_FMT_LMId_NULL, HPCRUN_FMT_LMIp_NULL
 
#define PARTIAL_ROOT   HPCRUN_FMT_LMId_NULL, HPCRUN_FMT_LMIp_Flag1
 
#define ADDR_I(L)   NON_LUSH_ADDR_INI(L)
 
#define ADDR(L)   (cct_addr_t) NON_LUSH_ADDR_INI(L)
 
#define ADDR2_I(id, ip)   NON_LUSH_ADDR_INI(id, ip)
 
#define ADDR2(id, ip)   (cct_addr_t) ADDR2_I(id, ip)
 

Typedefs

typedef struct cct_node_t cct_node_t
 
typedef cct_node_tcct_node_id_t
 
typedef void * cct_op_arg_t
 
typedef void(* cct_op_t) (cct_node_t *cct, cct_op_arg_t arg, size_t level)
 
typedef struct cct2metrics_t cct2metrics_t
 
typedef void * merge_op_arg_t
 
typedef void(* merge_op_t) (cct_node_t *a, cct_node_t *b, merge_op_arg_t arg)
 

Functions

cct_node_thpcrun_cct_new (void)
 
cct_node_thpcrun_cct_new_partial (void)
 
cct_node_thpcrun_cct_new_special (void *addr)
 
cct_node_thpcrun_cct_top_new (uint16_t lmid, uintptr_t lmip)
 
cct_node_thpcrun_cct_parent (cct_node_t *node)
 
int32_t hpcrun_cct_persistent_id (cct_node_t *node)
 
cct_addr_thpcrun_cct_addr (cct_node_t *node)
 
bool hpcrun_cct_is_leaf (cct_node_t *node)
 
bool hpcrun_cct_no_children (cct_node_t *node)
 
bool hpcrun_cct_is_root (cct_node_t *node)
 
cct_node_thpcrun_cct_insert_addr (cct_node_t *cct, cct_addr_t *addr)
 
void hpcrun_cct_terminate_path (cct_node_t *node)
 
cct_node_thpcrun_cct_insert_node (cct_node_t *target, cct_node_t *src)
 
void hpcrun_cct_insert_path (cct_node_t **root, cct_node_t *path)
 
void hpcrun_cct_retain (cct_node_t *x)
 
int hpcrun_cct_retained (cct_node_t *x)
 
void hpcrun_cct_walk_child_1st_w_level (cct_node_t *cct, cct_op_t op, cct_op_arg_t arg, size_t level)
 
void hpcrun_cct_walk_node_1st_w_level (cct_node_t *cct, cct_op_t op, cct_op_arg_t arg, size_t level)
 
static void hpcrun_cct_walk_child_1st (cct_node_t *cct, cct_op_t op, cct_op_arg_t arg)
 
static void hpcrun_cct_walk_node_1st (cct_node_t *cct, cct_op_t op, cct_op_arg_t arg)
 
void hpcrun_walk_path (cct_node_t *node, cct_op_t op, cct_op_arg_t arg)
 
void hpcrun_cct_walkset (cct_node_t *cct, cct_op_t fn, cct_op_arg_t arg)
 
int hpcrun_cct_fwrite (cct2metrics_t *cct2metrics_map, cct_node_t *cct, FILE *fs, epoch_flags_t flags)
 
size_t hpcrun_cct_num_nodes (cct_node_t *cct)
 
cct_node_thpcrun_cct_find_addr (cct_node_t *cct, cct_addr_t *addr)
 
void hpcrun_cct_merge (cct_node_t *cct_a, cct_node_t *cct_b, merge_op_t merge, merge_op_arg_t arg)
 
cct_node_thpcrun_insert_special_node (cct_node_t *root, void *addr)
 
cct_node_thpcrun_cct_insert_path_return_leaf (cct_node_t *path, cct_node_t *root)
 
cct_node_thpcrun_cct_get_root (cct_node_t *node)
 
void hpcrun_cct_var_add (cct_node_t *node_source, void *start, cct_node_t *node_target)
 
bool hpcrun_cct_var_static (cct_node_t *node)
 
void hpcrun_cct_set_node_allocation (cct_node_t *node)
 
bool hpcrun_cct_is_node_allocation (cct_node_t *node)
 
void hpcrun_cct_set_node_memaccess (cct_node_t *node)
 
bool hpcrun_cct_is_node_memaccess (cct_node_t *node)
 
void hpcrun_cct_set_node_root (cct_node_t *root)
 
bool hpcrun_cct_is_node_root (cct_node_t *node)
 
void hpcrun_cct_set_node_variable (cct_node_t *node)
 
bool hpcrun_cct_is_node_variable (cct_node_t *node)
 

Macro Definition Documentation

◆ ADDR

#define ADDR (   L)    (cct_addr_t) NON_LUSH_ADDR_INI(L)

Definition at line 102 of file cct.h.

◆ ADDR2

#define ADDR2 (   id,
  ip 
)    (cct_addr_t) ADDR2_I(id, ip)

Definition at line 104 of file cct.h.

◆ ADDR2_I

#define ADDR2_I (   id,
  ip 
)    NON_LUSH_ADDR_INI(id, ip)

Definition at line 103 of file cct.h.

◆ ADDR_I

#define ADDR_I (   L)    NON_LUSH_ADDR_INI(L)

Definition at line 101 of file cct.h.

◆ CCT_ROOT

Definition at line 99 of file cct.h.

◆ PARTIAL_ROOT

#define PARTIAL_ROOT   HPCRUN_FMT_LMId_NULL, HPCRUN_FMT_LMIp_Flag1

Definition at line 100 of file cct.h.

Typedef Documentation

◆ cct2metrics_t

typedef struct cct2metrics_t cct2metrics_t

Definition at line 252 of file cct.h.

◆ cct_node_id_t

Definition at line 115 of file cct.h.

◆ cct_node_t

typedef struct cct_node_t cct_node_t

Definition at line 109 of file cct.h.

◆ cct_op_arg_t

typedef void* cct_op_arg_t

Definition at line 186 of file cct.h.

◆ cct_op_t

typedef void(* cct_op_t) (cct_node_t *cct, cct_op_arg_t arg, size_t level)

Definition at line 187 of file cct.h.

◆ merge_op_arg_t

typedef void* merge_op_arg_t

Definition at line 274 of file cct.h.

◆ merge_op_t

typedef void(* merge_op_t) (cct_node_t *a, cct_node_t *b, merge_op_arg_t arg)

Definition at line 275 of file cct.h.

Function Documentation

◆ hpcrun_cct_addr()

cct_addr_t* hpcrun_cct_addr ( cct_node_t node)

Definition at line 369 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_find_addr()

cct_node_t* hpcrun_cct_find_addr ( cct_node_t cct,
cct_addr_t addr 
)

Definition at line 719 of file cct.c.

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

◆ hpcrun_cct_fwrite()

int hpcrun_cct_fwrite ( cct2metrics_t cct2metrics_map,
cct_node_t cct,
FILE *  fs,
epoch_flags_t  flags 
)

Definition at line 672 of file cct.c.

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

◆ hpcrun_cct_get_root()

cct_node_t* hpcrun_cct_get_root ( cct_node_t node)

Definition at line 882 of file cct.c.

Here is the call graph for this function:

◆ hpcrun_cct_insert_addr()

cct_node_t* hpcrun_cct_insert_addr ( cct_node_t cct,
cct_addr_t addr 
)

Definition at line 405 of file cct.c.

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

◆ hpcrun_cct_insert_node()

cct_node_t* hpcrun_cct_insert_node ( cct_node_t target,
cct_node_t src 
)

Definition at line 537 of file cct.c.

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

◆ hpcrun_cct_insert_path()

void hpcrun_cct_insert_path ( cct_node_t **  root,
cct_node_t path 
)

Definition at line 662 of file cct.c.

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

◆ hpcrun_cct_insert_path_return_leaf()

cct_node_t* hpcrun_cct_insert_path_return_leaf ( cct_node_t path,
cct_node_t root 
)

Definition at line 871 of file cct.c.

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

◆ hpcrun_cct_is_leaf()

bool hpcrun_cct_is_leaf ( cct_node_t node)

Definition at line 458 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_is_node_allocation()

bool hpcrun_cct_is_node_allocation ( cct_node_t node)

Definition at line 474 of file cct.c.

◆ hpcrun_cct_is_node_memaccess()

bool hpcrun_cct_is_node_memaccess ( cct_node_t node)

Definition at line 504 of file cct.c.

◆ hpcrun_cct_is_node_root()

bool hpcrun_cct_is_node_root ( cct_node_t node)

Definition at line 520 of file cct.c.

Here is the call graph for this function:

◆ hpcrun_cct_is_node_variable()

bool hpcrun_cct_is_node_variable ( cct_node_t node)

Definition at line 486 of file cct.c.

◆ hpcrun_cct_is_root()

bool hpcrun_cct_is_root ( cct_node_t node)

Definition at line 387 of file cct.c.

◆ hpcrun_cct_merge()

void hpcrun_cct_merge ( cct_node_t cct_a,
cct_node_t cct_b,
merge_op_t  merge,
merge_op_arg_t  arg 
)

Definition at line 769 of file cct.c.

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

◆ hpcrun_cct_new()

cct_node_t* hpcrun_cct_new ( void  )

Definition at line 326 of file cct.c.

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

◆ hpcrun_cct_new_partial()

cct_node_t* hpcrun_cct_new_partial ( void  )

Definition at line 332 of file cct.c.

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

◆ hpcrun_cct_new_special()

cct_node_t* hpcrun_cct_new_special ( void *  addr)

Definition at line 338 of file cct.c.

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

◆ hpcrun_cct_no_children()

bool hpcrun_cct_no_children ( cct_node_t node)

Definition at line 381 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_num_nodes()

size_t hpcrun_cct_num_nodes ( cct_node_t cct)

Definition at line 707 of file cct.c.

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

◆ hpcrun_cct_parent()

cct_node_t* hpcrun_cct_parent ( cct_node_t node)

Definition at line 357 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_persistent_id()

int32_t hpcrun_cct_persistent_id ( cct_node_t node)

Definition at line 363 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_retain()

void hpcrun_cct_retain ( cct_node_t x)

Definition at line 567 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_retained()

int hpcrun_cct_retained ( cct_node_t x)

Definition at line 576 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_set_node_allocation()

void hpcrun_cct_set_node_allocation ( cct_node_t node)

Definition at line 468 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_set_node_memaccess()

void hpcrun_cct_set_node_memaccess ( cct_node_t node)

Definition at line 495 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_set_node_root()

void hpcrun_cct_set_node_root ( cct_node_t root)

Definition at line 513 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_set_node_variable()

void hpcrun_cct_set_node_variable ( cct_node_t node)

Definition at line 480 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_terminate_path()

void hpcrun_cct_terminate_path ( cct_node_t node)

Definition at line 452 of file cct.c.

Here is the caller graph for this function:

◆ hpcrun_cct_top_new()

cct_node_t* hpcrun_cct_top_new ( uint16_t  lmid,
uintptr_t  lmip 
)

Definition at line 348 of file cct.c.

Here is the call graph for this function:

◆ hpcrun_cct_var_add()

void hpcrun_cct_var_add ( cct_node_t node_source,
void *  start,
cct_node_t node_target 
)

◆ hpcrun_cct_var_static()

bool hpcrun_cct_var_static ( cct_node_t node)

◆ hpcrun_cct_walk_child_1st()

static void hpcrun_cct_walk_child_1st ( cct_node_t cct,
cct_op_t  op,
cct_op_arg_t  arg 
)
inlinestatic

Definition at line 219 of file cct.h.

Here is the call graph for this function:

◆ hpcrun_cct_walk_child_1st_w_level()

void hpcrun_cct_walk_child_1st_w_level ( cct_node_t cct,
cct_op_t  op,
cct_op_arg_t  arg,
size_t  level 
)

Definition at line 599 of file cct.c.

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

◆ hpcrun_cct_walk_node_1st()

static void hpcrun_cct_walk_node_1st ( cct_node_t cct,
cct_op_t  op,
cct_op_arg_t  arg 
)
inlinestatic

Definition at line 226 of file cct.h.

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

◆ hpcrun_cct_walk_node_1st_w_level()

void hpcrun_cct_walk_node_1st_w_level ( cct_node_t cct,
cct_op_t  op,
cct_op_arg_t  arg,
size_t  level 
)

Definition at line 611 of file cct.c.

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

◆ hpcrun_cct_walkset()

void hpcrun_cct_walkset ( cct_node_t cct,
cct_op_t  fn,
cct_op_arg_t  arg 
)

Definition at line 623 of file cct.c.

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

◆ hpcrun_insert_special_node()

cct_node_t* hpcrun_insert_special_node ( cct_node_t root,
void *  addr 
)

Definition at line 861 of file cct.c.

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

◆ hpcrun_walk_path()

void hpcrun_walk_path ( cct_node_t node,
cct_op_t  op,
cct_op_arg_t  arg 
)

Definition at line 636 of file cct.c.

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