HPCToolkit
upc.c File Reference
#include <sys/types.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <spi/UPC.h>
#include <spi/UPC_Events.h>
#include <spi/kernel_interface.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_event.h>
#include <hpcrun/sample_sources_registered.h>
#include <hpcrun/thread_data.h>
#include <utilities/tokenize.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 upc.c:

Go to the source code of this file.

Macros

#define DEFAULT_THRESHOLD   1000000L
 
#define EVENT_NAME_SIZE   (BGP_UPC_MAXIMUM_LENGTH_EVENT_NAME + 50)
 
#define ss_name   upc
 
#define ss_cls   SS_HARDWARE
 

Functions

static int bgp_event_name_to_code (const char *name)
 
static char * trim_event_desc (char *desc)
 
static int hpcrun_upc_handler (int sig, siginfo_t *info, void *context)
 
static void METHOD_FN (init)
 
static void METHOD_FN (thread_init)
 
static void METHOD_FN (thread_init_action)
 
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 (start)
 
static void METHOD_FN (thread_fini_action)
 
static void METHOD_FN (stop)
 
static void METHOD_FN (shutdown)
 
static void METHOD_FN (display_events)
 

Variables

__thread bool hpcrun_thread_suppress_sample
 
static sample_source_tmyself = NULL
 

Macro Definition Documentation

◆ DEFAULT_THRESHOLD

#define DEFAULT_THRESHOLD   1000000L

Definition at line 131 of file upc.c.

◆ EVENT_NAME_SIZE

#define EVENT_NAME_SIZE   (BGP_UPC_MAXIMUM_LENGTH_EVENT_NAME + 50)

Definition at line 144 of file upc.c.

◆ ss_cls

#define ss_cls   SS_HARDWARE

Definition at line 446 of file upc.c.

◆ ss_name

#define ss_name   upc

Definition at line 445 of file upc.c.

Function Documentation

◆ bgp_event_name_to_code()

static int bgp_event_name_to_code ( const char *  name)
static

Definition at line 146 of file upc.c.

Here is the caller graph for this function:

◆ hpcrun_upc_handler()

static int hpcrun_upc_handler ( int  sig,
siginfo_t *  info,
void *  context 
)
static

Definition at line 188 of file upc.c.

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

◆ METHOD_FN() [1/11]

static void METHOD_FN ( init  )
static

Definition at line 244 of file upc.c.

◆ METHOD_FN() [2/11]

static void METHOD_FN ( thread_init  )
static

Definition at line 255 of file upc.c.

◆ METHOD_FN() [3/11]

static void METHOD_FN ( thread_init_action  )
static

Definition at line 260 of file upc.c.

◆ METHOD_FN() [4/11]

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

Definition at line 266 of file upc.c.

Here is the call graph for this function:

◆ METHOD_FN() [5/11]

static void METHOD_FN ( process_event_list  ,
int  lush_metrics 
)
static

Definition at line 280 of file upc.c.

Here is the call graph for this function:

◆ METHOD_FN() [6/11]

static void METHOD_FN ( gen_event_set  ,
int  lush_metrics 
)
static

Definition at line 321 of file upc.c.

Here is the call graph for this function:

◆ METHOD_FN() [7/11]

static void METHOD_FN ( start  )
static

Definition at line 362 of file upc.c.

◆ METHOD_FN() [8/11]

static void METHOD_FN ( thread_fini_action  )
static

Definition at line 375 of file upc.c.

◆ METHOD_FN() [9/11]

static void METHOD_FN ( stop  )
static

Definition at line 380 of file upc.c.

◆ METHOD_FN() [10/11]

static void METHOD_FN ( shutdown  )
static

Definition at line 391 of file upc.c.

◆ METHOD_FN() [11/11]

static void METHOD_FN ( display_events  )
static

Definition at line 402 of file upc.c.

Here is the call graph for this function:

◆ trim_event_desc()

static char* trim_event_desc ( char *  desc)
static

Definition at line 169 of file upc.c.

Here is the caller graph for this function:

Variable Documentation

◆ hpcrun_thread_suppress_sample

__thread bool hpcrun_thread_suppress_sample

Definition at line 193 of file main.c.

◆ myself

sample_source_t* myself = NULL
static

Definition at line 129 of file upc.c.