HPCToolkit
fnbounds_dynamic.c File Reference
#include <stdio.h>
#include <dlfcn.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/param.h>
#include <sys/types.h>
#include <unistd.h>
#include <include/hpctoolkit-config.h>
#include <monitor.h>
#include "fnbounds_interface.h"
#include "fnbounds_file_header.h"
#include "client.h"
#include "dylib.h"
#include <hpcrun/main.h>
#include <hpcrun_dlfns.h>
#include <hpcrun_stats.h>
#include <disabled.h>
#include <loadmap.h>
#include <env.h>
#include <epoch.h>
#include <sample_event.h>
#include <thread_data.h>
#include <unwind/common/uw_recipe_map.h>
#include <messages/messages.h>
#include <lib/prof-lean/spinlock.h>
#include "data_tree.h"
Include dependency graph for fnbounds_dynamic.c:

Go to the source code of this file.

Macros

#define PERFORM_RELOCATION(addr, offset)   ((void *) (((unsigned long) addr) + ((long) offset)))
 
#define MAPPING_END(addr, length)   ((void *) (((unsigned long) addr) + ((unsigned long) length)))
 
#define FNBOUNDS_LOCK
 
#define FNBOUNDS_UNLOCK
 

Functions

static load_module_tfnbounds_get_loadModule (void *ip)
 
static dso_info_tfnbounds_compute (const char *filename, void *start, void *end)
 
static void fnbounds_map_executable ()
 
static bool fnbounds_is_datacentric_enabled ()
 
int fnbounds_init ()
 
bool fnbounds_enclosing_addr (void *ip, void **start, void **end, load_module_t **lm)
 
void fnbounds_map_open_dsos ()
 
static void insert_var_table (void **var_table, unsigned long num)
 
static void fnbounds_run_var_analysis (dso_info_t *dso)
 
static void fnbounds_find_exec_bounds_proc_maps (char *exename, void **start, void **end)
 
dso_info_tfnbounds_dso_exec (void)
 
bool fnbounds_ensure_mapped_dso (const char *module_name, void *start, void *end)
 
void fnbounds_unmap_closed_dsos ()
 
void fnbounds_fini ()
 
void fnbounds_release_lock (void)
 
fnbounds_table_t fnbounds_fetch_executable_table (void)
 

Variables

static spinlock_t fnbounds_lock = SPINLOCK_UNLOCKED
 

Macro Definition Documentation

◆ FNBOUNDS_LOCK

#define FNBOUNDS_LOCK
Value:
do { \
spinlock_lock(&fnbounds_lock); \
TD_GET(fnbounds_lock) = 1; \
} while (0)
static spinlock_t fnbounds_lock

Definition at line 135 of file fnbounds_dynamic.c.

◆ FNBOUNDS_UNLOCK

#define FNBOUNDS_UNLOCK
Value:
do { \
spinlock_unlock(&fnbounds_lock); \
TD_GET(fnbounds_lock) = 0; \
} while (0)
static spinlock_t fnbounds_lock

Definition at line 140 of file fnbounds_dynamic.c.

◆ MAPPING_END

#define MAPPING_END (   addr,
  length 
)    ((void *) (((unsigned long) addr) + ((unsigned long) length)))

Definition at line 122 of file fnbounds_dynamic.c.

◆ PERFORM_RELOCATION

#define PERFORM_RELOCATION (   addr,
  offset 
)    ((void *) (((unsigned long) addr) + ((long) offset)))

Definition at line 119 of file fnbounds_dynamic.c.

Function Documentation

◆ fnbounds_compute()

static dso_info_t * fnbounds_compute ( const char *  filename,
void *  start,
void *  end 
)
static

Definition at line 511 of file fnbounds_dynamic.c.

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

◆ fnbounds_dso_exec()

dso_info_t* fnbounds_dso_exec ( void  )

Definition at line 344 of file fnbounds_dynamic.c.

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

◆ fnbounds_enclosing_addr()

bool fnbounds_enclosing_addr ( void *  ip,
void **  start,
void **  end,
load_module_t **  lm 
)

Definition at line 193 of file fnbounds_dynamic.c.

Here is the caller graph for this function:

◆ fnbounds_ensure_mapped_dso()

bool fnbounds_ensure_mapped_dso ( const char *  module_name,
void *  start,
void *  end 
)

Definition at line 402 of file fnbounds_dynamic.c.

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

◆ fnbounds_fetch_executable_table()

fnbounds_table_t fnbounds_fetch_executable_table ( void  )

Definition at line 479 of file fnbounds_dynamic.c.

Here is the caller graph for this function:

◆ fnbounds_find_exec_bounds_proc_maps()

static void fnbounds_find_exec_bounds_proc_maps ( char *  exename,
void **  start,
void **  end 
)
static

Definition at line 310 of file fnbounds_dynamic.c.

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

◆ fnbounds_fini()

void fnbounds_fini ( )

Definition at line 463 of file fnbounds_dynamic.c.

Here is the caller graph for this function:

◆ fnbounds_get_loadModule()

static load_module_t * fnbounds_get_loadModule ( void *  ip)
static

Definition at line 583 of file fnbounds_dynamic.c.

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

◆ fnbounds_init()

int fnbounds_init ( )

Definition at line 181 of file fnbounds_dynamic.c.

Here is the caller graph for this function:

◆ fnbounds_is_datacentric_enabled()

static bool fnbounds_is_datacentric_enabled ( )
static

Definition at line 503 of file fnbounds_dynamic.c.

Here is the caller graph for this function:

◆ fnbounds_map_executable()

static void fnbounds_map_executable ( )
static

Definition at line 618 of file fnbounds_dynamic.c.

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

◆ fnbounds_map_open_dsos()

void fnbounds_map_open_dsos ( )

Definition at line 243 of file fnbounds_dynamic.c.

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

◆ fnbounds_release_lock()

void fnbounds_release_lock ( void  )

Definition at line 472 of file fnbounds_dynamic.c.

Here is the caller graph for this function:

◆ fnbounds_run_var_analysis()

static void fnbounds_run_var_analysis ( dso_info_t dso)
static

running hpcfnbounds to analyse static variable and its address

Definition at line 287 of file fnbounds_dynamic.c.

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

◆ fnbounds_unmap_closed_dsos()

void fnbounds_unmap_closed_dsos ( )

Definition at line 435 of file fnbounds_dynamic.c.

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

◆ insert_var_table()

static void insert_var_table ( void **  var_table,
unsigned long  num 
)
static

Definition at line 256 of file fnbounds_dynamic.c.

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

Variable Documentation

◆ fnbounds_lock

spinlock_t fnbounds_lock = SPINLOCK_UNLOCKED
static

Definition at line 133 of file fnbounds_dynamic.c.