HPCToolkit
common.c File Reference
#include <stdlib.h>
#include <string.h>
#include "sample_source_obj.h"
#include "common.h"
#include <messages/messages.h>
#include <hpcrun/thread_data.h>
Include dependency graph for common.c:

Go to the source code of this file.

Functions

void CMETHOD_FN (add_event, const char *ev)
 
void CMETHOD_FN (store_event, int event_id, long thresh)
 
int CMETHOD_FN (store_event_and_info, int event_id, long thresh, int metric_id, void *info)
 
void CMETHOD_FN (store_metric_id, int event_idx, int metric_id)
 
char * CMETHOD_FN (get_event_str)
 
bool CMETHOD_FN (started)
 
int hpcrun_event2metric (sample_source_t *ss, int event_idx)
 
void hpcrun_save_papi_error (int error)
 
static void hpcrun_display_papi_error (void)
 
void hpcrun_ssfail_none (void)
 
void hpcrun_ssfail_unknown (char *event)
 
void hpcrun_ssfail_unsupported (char *source, char *event)
 
void hpcrun_ssfail_derived (char *source, char *event)
 
void hpcrun_ssfail_all_derived (char *source)
 
void hpcrun_ssfail_conflict (char *source, char *event)
 
void hpcrun_ssfail_start (char *source)
 

Variables

static char * prefix = "HPCToolkit fatal error"
 
static char * warning = "HPCToolkit warning"
 
static char * hpcrun_L
 
static int papi_error = 0
 

Function Documentation

◆ CMETHOD_FN() [1/6]

void CMETHOD_FN ( add_event  ,
const char *  ev 
)

Definition at line 57 of file common.c.

◆ CMETHOD_FN() [2/6]

void CMETHOD_FN ( store_event  ,
int  event_id,
long  thresh 
)

Definition at line 68 of file common.c.

◆ CMETHOD_FN() [3/6]

int CMETHOD_FN ( store_event_and_info  ,
int  event_id,
long  thresh,
int  metric_id,
void *  info 
)

Definition at line 80 of file common.c.

◆ CMETHOD_FN() [4/6]

void CMETHOD_FN ( store_metric_id  ,
int  event_idx,
int  metric_id 
)

Definition at line 108 of file common.c.

◆ CMETHOD_FN() [5/6]

char* CMETHOD_FN ( get_event_str  )

Definition at line 127 of file common.c.

◆ CMETHOD_FN() [6/6]

bool CMETHOD_FN ( started  )

Definition at line 133 of file common.c.

◆ hpcrun_display_papi_error()

static void hpcrun_display_papi_error ( void  )
static

Definition at line 190 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_event2metric()

int hpcrun_event2metric ( sample_source_t ss,
int  event_idx 
)

Definition at line 143 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_save_papi_error()

void hpcrun_save_papi_error ( int  error)

Definition at line 184 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_ssfail_all_derived()

void hpcrun_ssfail_all_derived ( char *  source)

Definition at line 246 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_ssfail_conflict()

void hpcrun_ssfail_conflict ( char *  source,
char *  event 
)

Definition at line 255 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_ssfail_derived()

void hpcrun_ssfail_derived ( char *  source,
char *  event 
)

Definition at line 238 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_ssfail_none()

void hpcrun_ssfail_none ( void  )

Definition at line 209 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_ssfail_start()

void hpcrun_ssfail_start ( char *  source)

Definition at line 265 of file common.c.

Here is the caller graph for this function:

◆ hpcrun_ssfail_unknown()

void hpcrun_ssfail_unknown ( char *  event)

Definition at line 220 of file common.c.

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

◆ hpcrun_ssfail_unsupported()

void hpcrun_ssfail_unsupported ( char *  source,
char *  event 
)

Definition at line 230 of file common.c.

Here is the caller graph for this function:

Variable Documentation

◆ hpcrun_L

char* hpcrun_L
static
Initial value:
=
"If running a dynamically-linked program with hpcrun, use 'hpcrun -L <program>' for a list of available events.\n\n"
"If running a statically-linked program built with hpclink, set HPCRUN_EVENT_LIST=LIST in your environment and\n"
"run your program to see a list of available events.\n\n"
"Note: Either of the aforementioned methods will exit after listing available events. Arguments to your program\n"
"will be ignored. Thus, an execution to list events can be run on a single core and it will execute for only a few\n"
"seconds."

Definition at line 166 of file common.c.

◆ papi_error

int papi_error = 0
static

Definition at line 173 of file common.c.

◆ prefix

char* prefix = "HPCToolkit fatal error"
static

Definition at line 164 of file common.c.

◆ warning

char* warning = "HPCToolkit warning"
static

Definition at line 165 of file common.c.