HPCToolkit
gpu_blame.c File Reference
#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdbool.h>
#include <signal.h>
#include <sys/time.h>
#include <ucontext.h>
#include <dlfcn.h>
#include <monitor.h>
#include "sample_source_obj.h"
#include "common.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 <hpcrun/trace.h>
#include <lush/lush-backtrace.h>
#include <messages/messages.h>
#include <utilities/tokenize.h>
#include <utilities/arch/context-pc.h>
#include <unwind/common/unwind.h>
#include <lib/support-lean/timer.h>
#include <lib/prof-lean/spinlock.h>
#include <lib/prof-lean/atomic.h>
#include <lib/prof-lean/splay-macros.h>
#include "blame-shift/blame-shift.h"
#include "ss_obj.h"
Include dependency graph for gpu_blame.c:

Go to the source code of this file.

Macros

#define Cuda_RTcall(fn)   cudaRuntimeFunctionPointer[fn ## Enum].fn ## Real
 -*-Mode: C++;-*- // technically C99 More...
 
#define Cuda_Dcall(fn)   cuDriverFunctionPointer[fn ## Enum].fn ## Real
 
#define ss_name   cpu_gpu_idle
 
#define ss_cls   SS_HARDWARE
 

Functions

void hpcrun_set_gpu_proxy_present ()
 
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)
 

Variables

int g_cpu_gpu_proxy_count = 0
 
bool g_cpu_gpu_enabled = false
 
int cpu_idle_metric_id
 
int gpu_time_metric_id
 
int cpu_idle_cause_metric_id
 
int gpu_idle_metric_id
 
int gpu_overload_potential_metric_id
 
int stream_special_metric_id
 
int h_to_d_data_xfer_metric_id
 
int d_to_h_data_xfer_metric_id
 
int h_to_h_data_xfer_metric_id
 
int d_to_d_data_xfer_metric_id
 
int uva_data_xfer_metric_id
 
uint64_t g_active_threads
 
static bs_fn_entry_t bs_entry = {}
 

Macro Definition Documentation

◆ Cuda_Dcall

#define Cuda_Dcall (   fn)    cuDriverFunctionPointer[fn ## Enum].fn ## Real

Definition at line 109 of file gpu_blame.c.

◆ Cuda_RTcall

#define Cuda_RTcall (   fn)    cudaRuntimeFunctionPointer[fn ## Enum].fn ## Real

-*-Mode: C++;-*- // technically C99

Definition at line 108 of file gpu_blame.c.

◆ ss_cls

#define ss_cls   SS_HARDWARE

Definition at line 276 of file gpu_blame.c.

◆ ss_name

#define ss_name   cpu_gpu_idle

Definition at line 275 of file gpu_blame.c.

Function Documentation

◆ hpcrun_set_gpu_proxy_present()

void hpcrun_set_gpu_proxy_present ( )

Definition at line 138 of file gpu_blame.c.

◆ METHOD_FN() [1/11]

static void METHOD_FN ( init  )
static

Definition at line 144 of file gpu_blame.c.

◆ METHOD_FN() [2/11]

static void METHOD_FN ( thread_init  )
static

Definition at line 153 of file gpu_blame.c.

◆ METHOD_FN() [3/11]

static void METHOD_FN ( thread_init_action  )
static

Definition at line 159 of file gpu_blame.c.

◆ METHOD_FN() [4/11]

static void METHOD_FN ( start  )
static

Definition at line 165 of file gpu_blame.c.

Here is the call graph for this function:

◆ METHOD_FN() [5/11]

static void METHOD_FN ( thread_fini_action  )
static

Definition at line 176 of file gpu_blame.c.

◆ METHOD_FN() [6/11]

static void METHOD_FN ( stop  )
static

Definition at line 182 of file gpu_blame.c.

◆ METHOD_FN() [7/11]

static void METHOD_FN ( shutdown  )
static

Definition at line 188 of file gpu_blame.c.

◆ METHOD_FN() [8/11]

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

Definition at line 195 of file gpu_blame.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 202 of file gpu_blame.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 255 of file gpu_blame.c.

◆ METHOD_FN() [11/11]

static void METHOD_FN ( display_events  )
static

Definition at line 260 of file gpu_blame.c.

Variable Documentation

◆ bs_entry

bs_fn_entry_t bs_entry = {}
static

Definition at line 134 of file gpu_blame.c.

◆ cpu_idle_cause_metric_id

int cpu_idle_cause_metric_id

Definition at line 120 of file gpu_blame.c.

◆ cpu_idle_metric_id

int cpu_idle_metric_id

Definition at line 118 of file gpu_blame.c.

◆ d_to_d_data_xfer_metric_id

int d_to_d_data_xfer_metric_id

Definition at line 127 of file gpu_blame.c.

◆ d_to_h_data_xfer_metric_id

int d_to_h_data_xfer_metric_id

Definition at line 125 of file gpu_blame.c.

◆ g_active_threads

uint64_t g_active_threads

Definition at line 131 of file gpu_blame.c.

◆ g_cpu_gpu_enabled

bool g_cpu_gpu_enabled = false

Definition at line 114 of file gpu_blame.c.

◆ g_cpu_gpu_proxy_count

int g_cpu_gpu_proxy_count = 0

Definition at line 113 of file gpu_blame.c.

◆ gpu_idle_metric_id

int gpu_idle_metric_id

Definition at line 121 of file gpu_blame.c.

◆ gpu_overload_potential_metric_id

int gpu_overload_potential_metric_id

Definition at line 122 of file gpu_blame.c.

◆ gpu_time_metric_id

int gpu_time_metric_id

Definition at line 119 of file gpu_blame.c.

◆ h_to_d_data_xfer_metric_id

int h_to_d_data_xfer_metric_id

Definition at line 124 of file gpu_blame.c.

◆ h_to_h_data_xfer_metric_id

int h_to_h_data_xfer_metric_id

Definition at line 126 of file gpu_blame.c.

◆ stream_special_metric_id

int stream_special_metric_id

Definition at line 123 of file gpu_blame.c.

◆ uva_data_xfer_metric_id

int uva_data_xfer_metric_id

Definition at line 128 of file gpu_blame.c.