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 | NWUNIT_init_thread (hwd_context_t *ctx) |
| |
| int | NWUNIT_init_component (int cidx) |
| |
| int | NWUNIT_init_control_state (hwd_control_state_t *ptr) |
| |
| int | NWUNIT_start (hwd_context_t *ctx, hwd_control_state_t *ptr) |
| |
| int | NWUNIT_stop (hwd_context_t *ctx, hwd_control_state_t *ptr) |
| |
| int | NWUNIT_read (hwd_context_t *ctx, hwd_control_state_t *ptr, long_long **events, int flags) |
| |
| int | NWUNIT_shutdown_thread (hwd_context_t *ctx) |
| |
| int | NWUNIT_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option) |
| |
| int | NWUNIT_update_control_state (hwd_control_state_t *ptr, NativeInfo_t *native, int count, hwd_context_t *ctx) |
| |
| int | NWUNIT_set_domain (hwd_control_state_t *cntrl, int domain) |
| |
| int | NWUNIT_reset (hwd_context_t *ctx, hwd_control_state_t *ptr) |
| |
| int | NWUNIT_cleanup_eventset (hwd_control_state_t *ctrl) |
| |
| int | NWUNIT_ntv_enum_events (unsigned int *EventCode, int modifier) |
| |
| int | NWUNIT_ntv_name_to_code (const char *name, unsigned int *event_code) |
| |
| int | NWUNIT_ntv_code_to_name (unsigned int EventCode, char *name, int len) |
| |
| int | NWUNIT_ntv_code_to_descr (unsigned int EventCode, char *name, int len) |
| |
| int | NWUNIT_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 / NWunit component
Tested version of bgpm (early access)
Definition in file linux-NWunit.c.
◆ NWUNIT_cleanup_eventset()
Definition at line 310 of file linux-NWunit.c.
313 printf(
"NWUNIT_cleanup_eventset\n" );
int _common_deleteRecreate(int *EventGroup_ptr)
◆ NWUNIT_ctl()
◆ NWUNIT_init_component()
| int NWUNIT_init_component |
( |
int |
cidx | ) |
|
Definition at line 49 of file linux-NWunit.c.
52 printf(
"NWUNIT_init_component\n" );
57 printf(
"NWUNIT_init_component cidx = %d\n",
cidx );
PAPI_component_info_t cmp_info
papi_vector_t _NWunit_vector
◆ NWUNIT_init_control_state()
Definition at line 69 of file linux-NWunit.c.
72 printf(
"NWUNIT_init_control_state\n" );
78 this_state->
EventGroup = Bgpm_CreateEventSet();
int _check_BGPM_error(int err, char *bgpmfunc)
◆ NWUNIT_init_thread()
Definition at line 33 of file linux-NWunit.c.
36 printf(
"NWUNIT_init_thread\n" );
◆ NWUNIT_ntv_code_to_bits()
| int NWUNIT_ntv_code_to_bits |
( |
unsigned int |
EventCode, |
|
|
hwd_register_t * |
bits |
|
) |
| |
Definition at line 447 of file linux-NWunit.c.
450 printf(
"NWUNIT_ntv_code_to_bits\n" );
◆ NWUNIT_ntv_code_to_descr()
| int NWUNIT_ntv_code_to_descr |
( |
unsigned int |
EventCode, |
|
|
char * |
name, |
|
|
int |
len |
|
) |
| |
Definition at line 426 of file linux-NWunit.c.
433 index = ( EventCode ) +
OFFSET;
435 retval = Bgpm_GetLongDesc( index,
name, &len );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ NWUNIT_ntv_code_to_name()
| int NWUNIT_ntv_code_to_name |
( |
unsigned int |
EventCode, |
|
|
char * |
name, |
|
|
int |
len |
|
) |
| |
Definition at line 397 of file linux-NWunit.c.
404 index = ( EventCode ) +
OFFSET;
409 strncpy(
name, Bgpm_GetEventIdLabel( index ), len );
411 if (
name == NULL ) {
413 printf (
"Error: ret value is NULL for BGPM API function Bgpm_GetEventIdLabel.\n" );
◆ NWUNIT_ntv_enum_events()
| int NWUNIT_ntv_enum_events |
( |
unsigned int * |
EventCode, |
|
|
int |
modifier |
|
) |
| |
Definition at line 333 of file linux-NWunit.c.
337 switch ( modifier ) {
346 int index = ( *EventCode ) +
OFFSET;
349 *EventCode = *EventCode + 1;
#define NWUNIT_MAX_EVENTS
◆ NWUNIT_ntv_name_to_code()
| int NWUNIT_ntv_name_to_code |
( |
const char * |
name, |
|
|
unsigned int * |
event_code |
|
) |
| |
Definition at line 367 of file linux-NWunit.c.
370 printf(
"NWUNIT_ntv_name_to_code\n" );
375 ret = Bgpm_GetEventIdFromLabel (
name );
379 printf (
"Error: ret value is %d for BGPM API function '%s'.\n",
380 ret,
"Bgpm_GetEventIdFromLabel" );
#define NWUNIT_MAX_EVENTS
◆ NWUNIT_read()
Definition at line 137 of file linux-NWunit.c.
141 printf(
"NWUNIT_read\n" );
148 numEvts = Bgpm_NumEvents( this_state->
EventGroup );
149 if ( numEvts == 0 ) {
151 printf (
"Error: ret value is %d for BGPM API function Bgpm_NumEvents.\n", numEvts );
156 for (
i = 0;
i < numEvts;
i++ )
char events[MAX_EVENTS][BUFSIZ]
long_long _common_getEventValue(unsigned event_id, int EventGroup)
long long counts[NWUNIT_MAX_COUNTERS]
◆ NWUNIT_reset()
Definition at line 279 of file linux-NWunit.c.
282 printf(
"NWUNIT_reset\n" );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ NWUNIT_set_domain()
◆ NWUNIT_shutdown_thread()
Definition at line 169 of file linux-NWunit.c.
172 printf(
"NWUNIT_shutdown_thread\n" );
◆ NWUNIT_start()
Definition at line 90 of file linux-NWunit.c.
93 printf(
"NWUNIT_start\n" );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ NWUNIT_stop()
Definition at line 116 of file linux-NWunit.c.
119 printf(
"NWUNIT_stop\n" );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ NWUNIT_update_control_state()
Definition at line 205 of file linux-NWunit.c.
210 printf(
"NWUNIT_update_control_state: count = %d\n",
count );
227 printf(
"NWUNIT_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)
◆ _NWunit_vector