HPCToolkit
papi-c.c File Reference
#include <alloca.h>
#include <assert.h>
#include <ctype.h>
#include <papi.h>
#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ucontext.h>
#include <stdbool.h>
#include <stdint.h>
#include <pthread.h>
#include <monitor.h>
#include "simple_oo.h"
#include "sample_source_obj.h"
#include "common.h"
#include "papi-c-extended-info.h"
#include <hpcrun/hpcrun_options.h>
#include <hpcrun/hpcrun_stats.h>
#include <hpcrun/metrics.h>
#include <hpcrun/safe-sampling.h>
#include <hpcrun/sample_sources_registered.h>
#include <hpcrun/sample_event.h>
#include <hpcrun/thread_data.h>
#include <hpcrun/threadmgr.h>
#include <sample-sources/blame-shift/blame-shift.h>
#include <utilities/tokenize.h>
#include <messages/messages.h>
#include <lush/lush-backtrace.h>
#include <lib/prof-lean/hpcrun-fmt.h>
#include "papi-c.h"
#include "ss_obj.h"
Include dependency graph for papi-c.c:

Go to the source code of this file.

Macros

#define OVERFLOW_MODE   0
 
#define WEIGHT_METRIC   0
 
#define DEFAULT_THRESHOLD   2000000L
 
#define BUFLEN   68
 
#define ss_name   papi
 
#define ss_cls   SS_HARDWARE
 
#define ss_sort_order   70
 

Functions

static void papi_event_handler (int event_set, void *pc, long long ovec, void *context)
 
static int event_is_derived (int ev_code)
 
static void event_fatal_error (int ev_code, int papi_ret)
 
static int get_event_index (sample_source_t *self, int event_code)
 
int get_component_event_set (papi_source_info_t *psi, int cidx)
 
int component_add_event (papi_source_info_t *psi, int cidx, int evcode)
 
static bool thread_count_scaling_for_component (int cidx)
 
static void print_desc (char *s)
 
static const char * strip_papi_prefix (const char *str)
 
static void METHOD_FN (init)
 
static void METHOD_FN (thread_init)
 
static void METHOD_FN (thread_init_action)
 
static void METHOD_FN (start)
 
static void METHOD_FN (thread_fini_action)
 
static void METHOD_FN (stop)
 
static void METHOD_FN (shutdown)
 
static bool METHOD_FN (supports_event, const char *ev_str)
 
static void METHOD_FN (process_event_list, int lush_metrics)
 
static void METHOD_FN (gen_event_set, int lush_metrics)
 
static void METHOD_FN (display_events)
 
void hpcrun_disable_papi_cuda (void)
 

Variables

static int papi_unavail = 0
 
static bool disable_papi_cuda = false
 
static int derived [MAX_EVENTS]
 
static int some_overflow
 
__thread bool hpcrun_thread_suppress_sample
 

Macro Definition Documentation

◆ BUFLEN

#define BUFLEN   68

◆ DEFAULT_THRESHOLD

#define DEFAULT_THRESHOLD   2000000L

Definition at line 105 of file papi-c.c.

◆ OVERFLOW_MODE

#define OVERFLOW_MODE   0

Definition at line 103 of file papi-c.c.

◆ ss_cls

#define ss_cls   SS_HARDWARE

Definition at line 799 of file papi-c.c.

◆ ss_name

#define ss_name   papi

Definition at line 798 of file papi-c.c.

◆ ss_sort_order

#define ss_sort_order   70

Definition at line 800 of file papi-c.c.

◆ WEIGHT_METRIC

#define WEIGHT_METRIC   0

Definition at line 104 of file papi-c.c.

Function Documentation

◆ component_add_event()

int component_add_event ( papi_source_info_t psi,
int  cidx,
int  evcode 
)

Definition at line 171 of file papi-c.c.

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

◆ event_fatal_error()

static void event_fatal_error ( int  ev_code,
int  papi_ret 
)
static

Definition at line 840 of file papi-c.c.

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

◆ event_is_derived()

static int event_is_derived ( int  ev_code)
static

Definition at line 820 of file papi-c.c.

Here is the caller graph for this function:

◆ get_component_event_set()

int get_component_event_set ( papi_source_info_t psi,
int  cidx 
)

Definition at line 152 of file papi-c.c.

Here is the caller graph for this function:

◆ get_event_index()

static int get_event_index ( sample_source_t self,
int  event_code 
)
static

Definition at line 137 of file papi-c.c.

Here is the caller graph for this function:

◆ hpcrun_disable_papi_cuda()

void hpcrun_disable_papi_cuda ( void  )

Definition at line 808 of file papi-c.c.

◆ METHOD_FN() [1/11]

static void METHOD_FN ( init  )
static

Definition at line 263 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [2/11]

static void METHOD_FN ( thread_init  )
static

Definition at line 318 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [3/11]

static void METHOD_FN ( thread_init_action  )
static

Definition at line 332 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [4/11]

static void METHOD_FN ( start  )
static

Definition at line 346 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [5/11]

static void METHOD_FN ( thread_fini_action  )
static

Definition at line 403 of file papi-c.c.

◆ METHOD_FN() [6/11]

static void METHOD_FN ( stop  )
static

Definition at line 415 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [7/11]

static void METHOD_FN ( shutdown  )
static

Definition at line 460 of file papi-c.c.

◆ METHOD_FN() [8/11]

static bool METHOD_FN ( supports_event  ,
const char *  ev_str 
)
static

Definition at line 475 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [9/11]

static void METHOD_FN ( process_event_list  ,
int  lush_metrics 
)
static

Definition at line 495 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [10/11]

static void METHOD_FN ( gen_event_set  ,
int  lush_metrics 
)
static

Definition at line 611 of file papi-c.c.

Here is the call graph for this function:

◆ METHOD_FN() [11/11]

static void METHOD_FN ( display_events  )
static

Definition at line 714 of file papi-c.c.

Here is the call graph for this function:

◆ papi_event_handler()

static void papi_event_handler ( int  event_set,
void *  pc,
long long  ovec,
void *  context 
)
static

Definition at line 858 of file papi-c.c.

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

◆ print_desc()

static void print_desc ( char *  s)
static

Definition at line 192 of file papi-c.c.

Here is the caller graph for this function:

◆ strip_papi_prefix()

static const char* strip_papi_prefix ( const char *  str)
static

Definition at line 249 of file papi-c.c.

Here is the caller graph for this function:

◆ thread_count_scaling_for_component()

static bool thread_count_scaling_for_component ( int  cidx)
static

Definition at line 179 of file papi-c.c.

Here is the caller graph for this function:

Variable Documentation

◆ derived

int derived[MAX_EVENTS]
static

Definition at line 232 of file papi-c.c.

◆ disable_papi_cuda

bool disable_papi_cuda = false
static

Definition at line 130 of file papi-c.c.

◆ hpcrun_thread_suppress_sample

__thread bool hpcrun_thread_suppress_sample

Definition at line 193 of file main.c.

◆ papi_unavail

int papi_unavail = 0
static

Definition at line 124 of file papi-c.c.

◆ some_overflow

int some_overflow
static

Definition at line 233 of file papi-c.c.