This file has the source code for a component that enables PAPI-C to access hardware monitoring counters for BG/Q through the bgpm library.
More...
Go to the source code of this file.
|
| int | CNKUNIT_init_thread (hwd_context_t *ctx) |
| |
| int | CNKUNIT_init_component (int cidx) |
| |
| int | CNKUNIT_init_control_state (hwd_control_state_t *ptr) |
| |
| int | CNKUNIT_start (hwd_context_t *ctx, hwd_control_state_t *ptr) |
| |
| int | CNKUNIT_stop (hwd_context_t *ctx, hwd_control_state_t *ptr) |
| |
| int | CNKUNIT_read (hwd_context_t *ctx, hwd_control_state_t *ptr, long_long **events, int flags) |
| |
| int | CNKUNIT_shutdown_thread (hwd_context_t *ctx) |
| |
| int | CNKUNIT_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option) |
| |
| int | CNKUNIT_update_control_state (hwd_control_state_t *ptr, NativeInfo_t *native, int count, hwd_context_t *ctx) |
| |
| int | CNKUNIT_set_domain (hwd_control_state_t *cntrl, int domain) |
| |
| int | CNKUNIT_reset (hwd_context_t *ctx, hwd_control_state_t *ptr) |
| |
| int | CNKUNIT_cleanup_eventset (hwd_control_state_t *ctrl) |
| |
| int | CNKUNIT_ntv_enum_events (unsigned int *EventCode, int modifier) |
| |
| int | CNKUNIT_ntv_name_to_code (const char *name, unsigned int *event_code) |
| |
| int | CNKUNIT_ntv_code_to_name (unsigned int EventCode, char *name, int len) |
| |
| int | CNKUNIT_ntv_code_to_descr (unsigned int EventCode, char *name, int len) |
| |
| int | CNKUNIT_ntv_code_to_bits (unsigned int EventCode, hwd_register_t *bits) |
| |
- Author
- Heike Jagode jagod.nosp@m.e@ee.nosp@m.cs.ut.nosp@m.k.ed.nosp@m.u Mods: < your name here > < your email address > BGPM / CNKunit component
Tested version of bgpm (early access)
Definition in file linux-CNKunit.c.
◆ CNKUNIT_cleanup_eventset()
Definition at line 307 of file linux-CNKunit.c.
310 printf(
"CNKUNIT_cleanup_eventset\n" );
int _common_deleteRecreate(int *EventGroup_ptr)
◆ CNKUNIT_ctl()
◆ CNKUNIT_init_component()
| int CNKUNIT_init_component |
( |
int |
cidx | ) |
|
Definition at line 49 of file linux-CNKunit.c.
52 printf(
"CNKUNIT_init_component\n" );
57 printf(
"CNKUNIT_init_component cidx = %d\n",
cidx );
PAPI_component_info_t cmp_info
papi_vector_t _CNKunit_vector
◆ CNKUNIT_init_control_state()
Definition at line 69 of file linux-CNKunit.c.
72 printf(
"CNKUNIT_init_control_state\n" );
78 this_state->
EventGroup = Bgpm_CreateEventSet();
int _check_BGPM_error(int err, char *bgpmfunc)
◆ CNKUNIT_init_thread()
◆ CNKUNIT_ntv_code_to_bits()
| int CNKUNIT_ntv_code_to_bits |
( |
unsigned int |
EventCode, |
|
|
hwd_register_t * |
bits |
|
) |
| |
Definition at line 447 of file linux-CNKunit.c.
450 printf(
"CNKUNIT_ntv_code_to_bits\n" );
◆ CNKUNIT_ntv_code_to_descr()
| int CNKUNIT_ntv_code_to_descr |
( |
unsigned int |
EventCode, |
|
|
char * |
name, |
|
|
int |
len |
|
) |
| |
Definition at line 426 of file linux-CNKunit.c.
433 index = ( EventCode ) +
OFFSET;
435 retval = Bgpm_GetLongDesc( index,
name, &len );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ CNKUNIT_ntv_code_to_name()
| int CNKUNIT_ntv_code_to_name |
( |
unsigned int |
EventCode, |
|
|
char * |
name, |
|
|
int |
len |
|
) |
| |
Definition at line 396 of file linux-CNKunit.c.
403 index = ( EventCode ) +
OFFSET;
408 strncpy(
name, Bgpm_GetEventIdLabel( index ), len );
411 if (
name == NULL ) {
413 printf (
"Error: ret value is NULL for BGPM API function Bgpm_GetEventIdLabel.\n" );
◆ CNKUNIT_ntv_enum_events()
| int CNKUNIT_ntv_enum_events |
( |
unsigned int * |
EventCode, |
|
|
int |
modifier |
|
) |
| |
Definition at line 330 of file linux-CNKunit.c.
336 switch ( modifier ) {
345 int index = ( *EventCode ) +
OFFSET;
348 *EventCode = *EventCode + 1;
#define CNKUNIT_MAX_COUNTERS
◆ CNKUNIT_ntv_name_to_code()
| int CNKUNIT_ntv_name_to_code |
( |
const char * |
name, |
|
|
unsigned int * |
event_code |
|
) |
| |
Definition at line 366 of file linux-CNKunit.c.
369 printf(
"CNKUNIT_ntv_name_to_code\n" );
374 ret = Bgpm_GetEventIdFromLabel (
name );
378 printf (
"Error: ret value is %d for BGPM API function '%s'.\n",
379 ret,
"Bgpm_GetEventIdFromLabel" );
#define CNKUNIT_MAX_COUNTERS
◆ CNKUNIT_read()
Definition at line 138 of file linux-CNKunit.c.
142 printf(
"CNKUNIT_read\n" );
149 numEvts = Bgpm_NumEvents( this_state->
EventGroup );
150 if ( numEvts == 0 ) {
152 printf (
"Error: ret value is %d for BGPM API function Bgpm_NumEvents.\n", numEvts );
157 for (
i = 0;
i < numEvts;
i++ )
char events[MAX_EVENTS][BUFSIZ]
long long counts[CNKUNIT_MAX_COUNTERS]
long_long _common_getEventValue(unsigned event_id, int EventGroup)
◆ CNKUNIT_reset()
Definition at line 276 of file linux-CNKunit.c.
279 printf(
"CNKUNIT_reset\n" );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ CNKUNIT_set_domain()
◆ CNKUNIT_shutdown_thread()
Definition at line 170 of file linux-CNKunit.c.
173 printf(
"CNKUNIT_shutdown_thread\n" );
◆ CNKUNIT_start()
Definition at line 90 of file linux-CNKunit.c.
93 printf(
"CNKUNIT_start\n" );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ CNKUNIT_stop()
Definition at line 117 of file linux-CNKunit.c.
120 printf(
"CNKUNIT_stop\n" );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ CNKUNIT_update_control_state()
Definition at line 202 of file linux-CNKunit.c.
207 printf(
"CNKUNIT_update_control_state: count = %d\n",
count );
224 printf(
"CNKUNIT_update_control_state: ADD event: i = %d, index = %d\n",
i, index );
int _common_deleteRecreate(int *EventGroup_ptr)
int _check_BGPM_error(int err, char *bgpmfunc)
◆ _CNKunit_vector