HPCToolkit
thread_data.c File Reference
#include <assert.h>
#include <pthread.h>
#include <stdlib.h>
#include <monitor.h>
#include "newmem.h"
#include "epoch.h"
#include "handling_sample.h"
#include "thread_data.h"
#include "trace.h"
#include <lush/lush-pthread.h>
#include <messages/messages.h>
#include <trampoline/common/trampoline.h>
#include <memory/mmap.h>
Include dependency graph for thread_data.c:

Go to the source code of this file.

Enumerations

enum  _local_int_const { BACKTRACE_INIT_SZ = 32, NEW_BACKTRACE_INIT_SZ = 32 }
 

Functions

void hpcrun_init_pthread_key (void)
 
void hpcrun_set_thread0_data (void)
 
void hpcrun_set_thread_data (thread_data_t *td)
 
static thread_data_thpcrun_get_thread_data_local (void)
 
static bool hpcrun_get_thread_data_local_avail (void)
 
thread_data_thpcrun_safe_get_td (void)
 
static thread_data_thpcrun_get_thread_data_specific (void)
 
static bool hpcrun_get_thread_data_specific_avail (void)
 
void hpcrun_unthreaded_data (void)
 
void hpcrun_threaded_data (void)
 
thread_data_thpcrun_allocate_thread_data (int id)
 
static void core_profile_trace_data_init (core_profile_trace_data_t *cptd, int id, cct_ctxt_t *thr_ctxt)
 
void hpcrun_thread_data_init (int id, cct_ctxt_t *thr_ctxt, int is_child, size_t n_sources)
 
void hpcrun_cached_bt_adjust_size (size_t n)
 
frame_thpcrun_expand_btbuf (void)
 
void hpcrun_ensure_btbuf_avail (void)
 

Variables

static thread_data_t _local_td
 
static pthread_key_t _hpcrun_key
 
static int use_getspecific = 0
 
thread_data_t *(* hpcrun_get_thread_data )(void) = &hpcrun_get_thread_data_local
 
bool(* hpcrun_td_avail )(void) = &hpcrun_get_thread_data_local_avail
 

Enumeration Type Documentation

◆ _local_int_const

Enumerator
BACKTRACE_INIT_SZ 
NEW_BACKTRACE_INIT_SZ 

Definition at line 76 of file thread_data.c.

Function Documentation

◆ core_profile_trace_data_init()

static void core_profile_trace_data_init ( core_profile_trace_data_t cptd,
int  id,
cct_ctxt_t thr_ctxt 
)
inlinestatic

Definition at line 215 of file thread_data.c.

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

◆ hpcrun_allocate_thread_data()

thread_data_t* hpcrun_allocate_thread_data ( int  id)

Definition at line 208 of file thread_data.c.

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

◆ hpcrun_cached_bt_adjust_size()

void hpcrun_cached_bt_adjust_size ( size_t  n)

Definition at line 373 of file thread_data.c.

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

◆ hpcrun_ensure_btbuf_avail()

void hpcrun_ensure_btbuf_avail ( void  )

Definition at line 426 of file thread_data.c.

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

◆ hpcrun_expand_btbuf()

frame_t* hpcrun_expand_btbuf ( void  )

Definition at line 390 of file thread_data.c.

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

◆ hpcrun_get_thread_data_local()

static thread_data_t* hpcrun_get_thread_data_local ( void  )
static

Definition at line 126 of file thread_data.c.

Here is the caller graph for this function:

◆ hpcrun_get_thread_data_local_avail()

static bool hpcrun_get_thread_data_local_avail ( void  )
static

Definition at line 133 of file thread_data.c.

Here is the caller graph for this function:

◆ hpcrun_get_thread_data_specific()

static thread_data_t* hpcrun_get_thread_data_specific ( void  )
static

Definition at line 151 of file thread_data.c.

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

◆ hpcrun_get_thread_data_specific_avail()

static bool hpcrun_get_thread_data_specific_avail ( void  )
static

Definition at line 161 of file thread_data.c.

Here is the caller graph for this function:

◆ hpcrun_init_pthread_key()

void hpcrun_init_pthread_key ( void  )

Definition at line 96 of file thread_data.c.

Here is the caller graph for this function:

◆ hpcrun_safe_get_td()

thread_data_t* hpcrun_safe_get_td ( void  )

Definition at line 140 of file thread_data.c.

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

◆ hpcrun_set_thread0_data()

void hpcrun_set_thread0_data ( void  )

Definition at line 108 of file thread_data.c.

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

◆ hpcrun_set_thread_data()

void hpcrun_set_thread_data ( thread_data_t td)

Definition at line 116 of file thread_data.c.

Here is the caller graph for this function:

◆ hpcrun_thread_data_init()

void hpcrun_thread_data_init ( int  id,
cct_ctxt_t thr_ctxt,
int  is_child,
size_t  n_sources 
)

Definition at line 265 of file thread_data.c.

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

◆ hpcrun_threaded_data()

void hpcrun_threaded_data ( void  )

Definition at line 195 of file thread_data.c.

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

◆ hpcrun_unthreaded_data()

void hpcrun_unthreaded_data ( void  )

Definition at line 187 of file thread_data.c.

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

Variable Documentation

◆ _hpcrun_key

pthread_key_t _hpcrun_key
static

Definition at line 91 of file thread_data.c.

◆ _local_td

thread_data_t _local_td
static

Definition at line 90 of file thread_data.c.

◆ hpcrun_get_thread_data

thread_data_t*(* hpcrun_get_thread_data) (void) = &hpcrun_get_thread_data_local

Definition at line 168 of file thread_data.c.

◆ hpcrun_td_avail

bool(* hpcrun_td_avail) (void) = &hpcrun_get_thread_data_local_avail

Definition at line 169 of file thread_data.c.

◆ use_getspecific

int use_getspecific = 0
static

Definition at line 92 of file thread_data.c.