HPCToolkit
cuda.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 <pthread.h>
#include <cuda.h>
#include <cupti.h>
#include <monitor.h>
#include "simple_oo.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/sample_sources_registered.h>
#include <hpcrun/sample_event.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 cuda.c:

Go to the source code of this file.

Macros

#define OVERFLOW_MODE   0
 
#define NO_THRESHOLD   1L
 
#define PAPI_CUDA_COMPONENT_ID   1
 
#define CUPTI_LAUNCH_CALLBACK_DEPTH   7
 
#define CUDA_PREFIX   "CUDA."
 
#define ss_name   cuda
 
#define ss_cls   SS_HARDWARE
 

Functions

static void hpcrun_cuda_kernel_callback (void *userdata, CUpti_CallbackDomain domain, CUpti_CallbackId cbid, const CUpti_CallbackData *cbInfo)
 
static void check_cupti_error (int err, char *cuptifunc)
 
static void event_fatal_error (int ev_code, int papi_ret)
 
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)
 

Macro Definition Documentation

◆ CUDA_PREFIX

#define CUDA_PREFIX   "CUDA."

Definition at line 269 of file cuda.c.

◆ CUPTI_LAUNCH_CALLBACK_DEPTH

#define CUPTI_LAUNCH_CALLBACK_DEPTH   7

Definition at line 107 of file cuda.c.

◆ NO_THRESHOLD

#define NO_THRESHOLD   1L

Definition at line 104 of file cuda.c.

◆ OVERFLOW_MODE

#define OVERFLOW_MODE   0

Definition at line 103 of file cuda.c.

◆ PAPI_CUDA_COMPONENT_ID

#define PAPI_CUDA_COMPONENT_ID   1

Definition at line 106 of file cuda.c.

◆ ss_cls

#define ss_cls   SS_HARDWARE

Definition at line 422 of file cuda.c.

◆ ss_name

#define ss_name   cuda

Definition at line 421 of file cuda.c.

Function Documentation

◆ check_cupti_error()

static void check_cupti_error ( int  err,
char *  cuptifunc 
)
static

Definition at line 447 of file cuda.c.

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 431 of file cuda.c.

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

◆ hpcrun_cuda_kernel_callback()

void CUPTIAPI hpcrun_cuda_kernel_callback ( void *  userdata,
CUpti_CallbackDomain  domain,
CUpti_CallbackId  cbid,
const CUpti_CallbackData *  cbInfo 
)
static

Definition at line 460 of file cuda.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 129 of file cuda.c.

◆ METHOD_FN() [2/11]

static void METHOD_FN ( thread_init  )
static

Definition at line 153 of file cuda.c.

Here is the call graph for this function:

◆ METHOD_FN() [3/11]

static void METHOD_FN ( thread_init_action  )
static

Definition at line 165 of file cuda.c.

Here is the call graph for this function:

◆ METHOD_FN() [4/11]

static void METHOD_FN ( start  )
static

Definition at line 177 of file cuda.c.

Here is the call graph for this function:

◆ METHOD_FN() [5/11]

static void METHOD_FN ( thread_fini_action  )
static

Definition at line 197 of file cuda.c.

◆ METHOD_FN() [6/11]

static void METHOD_FN ( stop  )
static

Definition at line 208 of file cuda.c.

◆ METHOD_FN() [7/11]

static void METHOD_FN ( shutdown  )
static

Definition at line 232 of file cuda.c.

◆ METHOD_FN() [8/11]

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

Definition at line 274 of file cuda.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 295 of file cuda.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 345 of file cuda.c.

Here is the call graph for this function:

◆ METHOD_FN() [11/11]

static void METHOD_FN ( display_events  )
static

Definition at line 378 of file cuda.c.