HPCToolkit
ompt-callstack.c File Reference
#include <ompt.h>
#include <lib/prof-lean/placeholders.h>
#include <hpcrun/cct_backtrace_finalize.h>
#include <hpcrun/sample_event.h>
#include <hpcrun/trace.h>
#include <hpcrun/unresolved.h>
#include "ompt-callstack.h"
#include "ompt-interface.h"
#include "ompt-state-placeholders.h"
#include "ompt-defer.h"
#include "ompt-region.h"
#include "ompt-task-map.h"
Include dependency graph for ompt-callstack.c:

Go to the source code of this file.

Macros

#define OMPT_DEBUG   1
 
#define elide_debug_dump(t, i, o, r)   if (ompt_callstack_debug) stack_dump(t,i,o,r)
 

Functions

static void stack_dump (char *tag, frame_t *inner, frame_t *outer, uint64_t region_id)
 
static int interval_contains (void *lower, void *upper, void *addr)
 
static ompt_state_t check_state ()
 
static void set_frame (frame_t *f, ompt_placeholder_t *ph)
 
static void collapse_callstack (backtrace_info_t *bt, ompt_placeholder_t *placeholder)
 
static void ompt_elide_runtime_frame (backtrace_info_t *bt, uint64_t region_id, int isSync)
 
static cct_node_tmemoized_context_get (thread_data_t *td, uint64_t region_id)
 
static void memoized_context_set (thread_data_t *td, uint64_t region_id, cct_node_t *result)
 
cct_node_tregion_root (cct_node_t *_node)
 
static cct_node_tlookup_region_id (uint64_t region_id)
 
cct_node_tompt_region_context (uint64_t region_id, ompt_context_type_t ctype, int levels_to_skip, int adjust_callsite)
 
cct_node_tompt_parallel_begin_context (ompt_parallel_id_t region_id, int levels_to_skip, int adjust_callsite)
 
static void ompt_backtrace_finalize (backtrace_info_t *bt, int isSync)
 
cct_node_tompt_cct_cursor_finalize (cct_bundle_t *cct, backtrace_info_t *bt, cct_node_t *cct_cursor)
 
void ompt_callstack_register_handlers (void)
 

Variables

static cct_backtrace_finalize_entry_t ompt_finalizer
 
static int ompt_eager_context = 0
 
static int ompt_callstack_debug = 0
 

Macro Definition Documentation

◆ elide_debug_dump

#define elide_debug_dump (   t,
  i,
  o,
 
)    if (ompt_callstack_debug) stack_dump(t,i,o,r)

Definition at line 83 of file ompt-callstack.c.

◆ OMPT_DEBUG

#define OMPT_DEBUG   1

Definition at line 80 of file ompt-callstack.c.

Function Documentation

◆ check_state()

static ompt_state_t check_state ( )
static

Definition at line 143 of file ompt-callstack.c.

Here is the caller graph for this function:

◆ collapse_callstack()

static void collapse_callstack ( backtrace_info_t bt,
ompt_placeholder_t *  placeholder 
)
static

Definition at line 160 of file ompt-callstack.c.

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

◆ interval_contains()

static int interval_contains ( void *  lower,
void *  upper,
void *  addr 
)
static

Definition at line 128 of file ompt-callstack.c.

Here is the caller graph for this function:

◆ lookup_region_id()

static cct_node_t* lookup_region_id ( uint64_t  region_id)
static

Definition at line 429 of file ompt-callstack.c.

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

◆ memoized_context_get()

static cct_node_t* memoized_context_get ( thread_data_t td,
uint64_t  region_id 
)
static

Definition at line 393 of file ompt-callstack.c.

Here is the caller graph for this function:

◆ memoized_context_set()

static void memoized_context_set ( thread_data_t td,
uint64_t  region_id,
cct_node_t result 
)
static

Definition at line 401 of file ompt-callstack.c.

Here is the caller graph for this function:

◆ ompt_backtrace_finalize()

static void ompt_backtrace_finalize ( backtrace_info_t bt,
int  isSync 
)
static

Definition at line 505 of file ompt-callstack.c.

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

◆ ompt_callstack_register_handlers()

void ompt_callstack_register_handlers ( void  )

Definition at line 576 of file ompt-callstack.c.

Here is the call graph for this function:

◆ ompt_cct_cursor_finalize()

cct_node_t* ompt_cct_cursor_finalize ( cct_bundle_t cct,
backtrace_info_t bt,
cct_node_t cct_cursor 
)

Definition at line 525 of file ompt-callstack.c.

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

◆ ompt_elide_runtime_frame()

static void ompt_elide_runtime_frame ( backtrace_info_t bt,
uint64_t  region_id,
int  isSync 
)
static

Definition at line 171 of file ompt-callstack.c.

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

◆ ompt_parallel_begin_context()

cct_node_t* ompt_parallel_begin_context ( ompt_parallel_id_t  region_id,
int  levels_to_skip,
int  adjust_callsite 
)

Definition at line 494 of file ompt-callstack.c.

Here is the call graph for this function:

◆ ompt_region_context()

cct_node_t* ompt_region_context ( uint64_t  region_id,
ompt_context_type_t  ctype,
int  levels_to_skip,
int  adjust_callsite 
)

Definition at line 451 of file ompt-callstack.c.

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

◆ region_root()

cct_node_t* region_root ( cct_node_t _node)

Definition at line 409 of file ompt-callstack.c.

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

◆ set_frame()

static void set_frame ( frame_t f,
ompt_placeholder_t *  ph 
)
static

Definition at line 151 of file ompt-callstack.c.

Here is the caller graph for this function:

◆ stack_dump()

static void stack_dump ( char *  tag,
frame_t inner,
frame_t outer,
uint64_t  region_id 
)
static

Definition at line 105 of file ompt-callstack.c.

Here is the call graph for this function:

Variable Documentation

◆ ompt_callstack_debug

int ompt_callstack_debug = 0
static

Definition at line 96 of file ompt-callstack.c.

◆ ompt_eager_context

int ompt_eager_context = 0
static

Definition at line 95 of file ompt-callstack.c.

◆ ompt_finalizer

cct_backtrace_finalize_entry_t ompt_finalizer
static

Definition at line 93 of file ompt-callstack.c.