PAPI 7.1.0.0
Loading...
Searching...
No Matches
Gamum.c File Reference
Include dependency graph for Gamum.c:

Go to the source code of this file.

Functions

papi_handle_t papi_sde_hook_list_events (papi_sde_fptr_struct_t *fptr_struct)
 
void gamum_init_ (void)
 
void gamum_unreg_ (void)
 
void gamum_do_work_ (void)
 
static papi_handle_t gamum_papi_sde_hook_list_events (papi_sde_fptr_struct_t *fptr_struct)
 

Variables

long long int gamum_cnt_i1
 
static double cnt_d1
 
static double cnt_d2
 
static double cnt_d3
 
static double cnt_d4
 
static double cnt_d5
 
static long long int cnt_i2
 
static long long int cnt_i3
 
static double cnt_rm1
 
static double cnt_rm2
 
static papi_handle_t handle
 
static void * cntr_handle
 
static const char * event_names [2]
 

Function Documentation

◆ gamum_do_work_()

void gamum_do_work_ ( void  )

Definition at line 74 of file Gamum.c.

74 {
75 cnt_d1 += 0.1;
76 cnt_d2 += 0.111;
77 cnt_d3 += 0.2;
78 cnt_d4 += 0.222;
79 cnt_d5 += 0.3;
80 gamum_cnt_i1 += 6;
81 cnt_i2 += 101;
82 cnt_i3 += 33;
85}
static long long int cnt_i3
Definition: Gamum.c:19
static void * cntr_handle
Definition: Gamum.c:22
static double cnt_d1
Definition: Gamum.c:18
static double cnt_d5
Definition: Gamum.c:18
static long long int cnt_i2
Definition: Gamum.c:19
static double cnt_d3
Definition: Gamum.c:18
static double cnt_d4
Definition: Gamum.c:18
static papi_handle_t handle
Definition: Gamum.c:21
long long int gamum_cnt_i1
Definition: Gamum.c:14
static double cnt_d2
Definition: Gamum.c:18
void * papi_sde_get_counter_handle(void *handle, const char *event_name)
Definition: sde_lib.c:1016
int papi_sde_inc_counter(papi_handle_t cntr_handle, long long int increment)
Definition: sde_lib.c:637
Here is the call graph for this function:

◆ gamum_init_()

void gamum_init_ ( void  )

Definition at line 33 of file Gamum.c.

33 {
34 cnt_d1 = cnt_d2 = cnt_d3 = cnt_d4 = cnt_d5 = 1;
35 gamum_cnt_i1 = cnt_i2 = 0;
36 papi_sde_fptr_struct_t fptr_struct;
37
38 POPULATE_SDE_FPTR_STRUCT( fptr_struct );
39 (void)gamum_papi_sde_hook_list_events(&fptr_struct);
40
41 return;
42}
static papi_handle_t gamum_papi_sde_hook_list_events(papi_sde_fptr_struct_t *fptr_struct)
Definition: Gamum.c:48
#define POPULATE_SDE_FPTR_STRUCT(_A_)
Definition: sde_lib.h:148
Here is the call graph for this function:

◆ gamum_papi_sde_hook_list_events()

papi_handle_t gamum_papi_sde_hook_list_events ( papi_sde_fptr_struct_t fptr_struct)
static

Definition at line 48 of file Gamum.c.

48 {
49 handle = fptr_struct->init("Gamum");
52 fptr_struct->add_counter_to_group(handle, "ev1", "group0", PAPI_SDE_SUM);
56 fptr_struct->add_counter_to_group(handle, "ev4", "group0", PAPI_SDE_SUM);
61
62 fptr_struct->create_counter(handle, "papi_counter", PAPI_SDE_RO|PAPI_SDE_INSTANT, &cntr_handle );
63
65
66 return handle;
67}
static double cnt_rm2
Definition: Gamum.c:20
static double cnt_rm1
Definition: Gamum.c:20
static const char * event_names[2]
Definition: Gamum.c:27
#define PAPI_SDE_double
Definition: sde_lib.h:30
#define PAPI_SDE_long_long
Definition: sde_lib.h:28
#define PAPI_SDE_RO
Definition: sde_lib.h:23
#define PAPI_SDE_INSTANT
Definition: sde_lib.h:26
#define PAPI_SDE_SUM
Definition: sde_lib.h:33
#define PAPI_SDE_DELTA
Definition: sde_lib.h:25
papi_handle_t(* init)(const char *lib_name)
Definition: sde_lib.h:103
int(* register_counter)(papi_handle_t handle, const char *event_name, int mode, int type, void *counter)
Definition: sde_lib.h:105
int(* create_counter)(papi_handle_t handle, const char *event_name, int cntr_type, void **cntr_handle)
Definition: sde_lib.h:110
int(* add_counter_to_group)(papi_handle_t handle, const char *event_name, const char *group_name, uint32_t group_flags)
Definition: sde_lib.h:109
Here is the caller graph for this function:

◆ gamum_unreg_()

void gamum_unreg_ ( void  )

Definition at line 69 of file Gamum.c.

69 {
72}
int papi_sde_unregister_counter(papi_handle_t handle, const char *event_name)
Definition: sde_lib.c:342
Here is the call graph for this function:

◆ papi_sde_hook_list_events()

papi_handle_t papi_sde_hook_list_events ( papi_sde_fptr_struct_t fptr_struct)

Definition at line 44 of file Gamum.c.

44 {
45 return gamum_papi_sde_hook_list_events(fptr_struct);
46}
Here is the call graph for this function:

Variable Documentation

◆ cnt_d1

double cnt_d1
static

Definition at line 18 of file Gamum.c.

◆ cnt_d2

double cnt_d2
static

Definition at line 18 of file Gamum.c.

◆ cnt_d3

double cnt_d3
static

Definition at line 18 of file Gamum.c.

◆ cnt_d4

double cnt_d4
static

Definition at line 18 of file Gamum.c.

◆ cnt_d5

double cnt_d5
static

Definition at line 18 of file Gamum.c.

◆ cnt_i2

long long int cnt_i2
static

Definition at line 19 of file Gamum.c.

◆ cnt_i3

long long int cnt_i3
static

Definition at line 19 of file Gamum.c.

◆ cnt_rm1

double cnt_rm1
static

Definition at line 20 of file Gamum.c.

◆ cnt_rm2

double cnt_rm2
static

Definition at line 20 of file Gamum.c.

◆ cntr_handle

void* cntr_handle
static

Definition at line 22 of file Gamum.c.

◆ event_names

const char* event_names[2]
static
Initial value:
= {
"event_with_characters____ __up______to_______60_bytes",
"event_with_very_long_name_which_is_meant_to_exceed_128_bytes_or_in_other_words_the_size_of_two_cache_lines_so_we_see_if_it_makes_a_difference_in_performance"
}

Definition at line 27 of file Gamum.c.

◆ gamum_cnt_i1

long long int gamum_cnt_i1

Definition at line 14 of file Gamum.c.

◆ handle

papi_handle_t handle
static

Definition at line 21 of file Gamum.c.