HPCToolkit
generic.c File Reference
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ucontext.h>
#include <pthread.h>
#include <stdbool.h>
#include <monitor.h>
#include "simple_oo.h"
#include "sample_source_obj.h"
#include "common.h"
#include "ss-errno.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 <utilities/tokenize.h>
#include <utilities/arch/context-pc.h>
#include <messages/messages.h>
#include <lush/lush-backtrace.h>
#include <lib/prof-lean/hpcrun-fmt.h>
#include "ss_obj.h"
Include dependency graph for generic.c:

Go to the source code of this file.

Classes

struct  event_info
 

Macros

#define ss_name   generic
 
#define ss_cls   SS_HARDWARE
 

Functions

static int generic_signal_handler (int sig, siginfo_t *siginfo, void *context)
 
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 generic_special_metric_update_proc (int metric_id, cct_metric_data_t *loc, cct_metric_data_t datum)
 

Variables

static struct SOME_STRUCT ss_specific_data
 
static int n_events = 0
 
static const int MAX_EVENTS = SAMPLE_SOURCE_SPECIFIC
 
static struct event_info local_event [MAX_EVENTS]
 
static const long DEFAULT_THRESHOLD = 1000000L
 
int metrics [MAX_EVENTS][MAX_METRICS]
 

Macro Definition Documentation

◆ ss_cls

#define ss_cls   SS_HARDWARE

Definition at line 460 of file generic.c.

◆ ss_name

#define ss_name   generic

Definition at line 459 of file generic.c.

Function Documentation

◆ generic_signal_handler()

static int generic_signal_handler ( int  sig,
siginfo_t *  siginfo,
void *  context 
)
static

Definition at line 480 of file generic.c.

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

◆ generic_special_metric_update_proc()

void generic_special_metric_update_proc ( int  metric_id,
cct_metric_data_t loc,
cct_metric_data_t  datum 
)

Definition at line 556 of file generic.c.

◆ METHOD_FN() [1/11]

static void METHOD_FN ( init  )
static

Definition at line 168 of file generic.c.

◆ METHOD_FN() [2/11]

static void METHOD_FN ( thread_init  )
static

Definition at line 190 of file generic.c.

◆ METHOD_FN() [3/11]

static void METHOD_FN ( thread_init_action  )
static

Definition at line 202 of file generic.c.

◆ METHOD_FN() [4/11]

static void METHOD_FN ( start  )
static

Definition at line 207 of file generic.c.

Here is the call graph for this function:

◆ METHOD_FN() [5/11]

static void METHOD_FN ( thread_fini_action  )
static

Definition at line 255 of file generic.c.

◆ METHOD_FN() [6/11]

static void METHOD_FN ( stop  )
static

Definition at line 260 of file generic.c.

Here is the call graph for this function:

◆ METHOD_FN() [7/11]

static void METHOD_FN ( shutdown  )
static

Definition at line 289 of file generic.c.

◆ METHOD_FN() [8/11]

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

Definition at line 305 of file generic.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 321 of file generic.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 405 of file generic.c.

Here is the call graph for this function:

◆ METHOD_FN() [11/11]

static void METHOD_FN ( display_events  )
static

Definition at line 429 of file generic.c.

Variable Documentation

◆ DEFAULT_THRESHOLD

const long DEFAULT_THRESHOLD = 1000000L
static

Definition at line 132 of file generic.c.

◆ local_event

struct event_info local_event[MAX_EVENTS]
static

Definition at line 131 of file generic.c.

◆ MAX_EVENTS

const int MAX_EVENTS = SAMPLE_SOURCE_SPECIFIC
static

Definition at line 130 of file generic.c.

◆ metrics

int metrics[MAX_EVENTS][MAX_METRICS]

Definition at line 147 of file generic.c.

◆ n_events

int n_events = 0
static

Definition at line 129 of file generic.c.

◆ ss_specific_data

struct SOME_STRUCT ss_specific_data
static

Definition at line 106 of file generic.c.