36 printf(
"NWUNIT_init_thread\n" );
52 printf(
"NWUNIT_init_component\n" );
57 printf(
"NWUNIT_init_component cidx = %d\n",
cidx );
72 printf(
"NWUNIT_init_control_state\n" );
78 this_state->
EventGroup = Bgpm_CreateEventSet();
93 printf(
"NWUNIT_start\n" );
119 printf(
"NWUNIT_stop\n" );
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++ )
172 printf(
"NWUNIT_shutdown_thread\n" );
188 printf(
"NWUNIT_ctl\n" );
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 );
254 printf(
"NWUNIT_set_domain\n" );
282 printf(
"NWUNIT_reset\n" );
313 printf(
"NWUNIT_cleanup_eventset\n" );
337 switch ( modifier ) {
346 int index = ( *EventCode ) +
OFFSET;
349 *EventCode = *EventCode + 1;
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" );
387 *event_code = ( ret -
OFFSET ) ;
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" );
433 index = ( EventCode ) +
OFFSET;
435 retval = Bgpm_GetLongDesc( index,
name, &len );
450 printf(
"NWUNIT_ntv_code_to_bits\n" );
464 .
name =
"bgpm/NWUnit",
465 .short_name =
"NWUnit",
466 .description =
"Blue Gene/Q NWUnit component",
478 .kernel_multiplex = 0,
481 .fast_real_timer = 0,
482 .fast_virtual_timer = 0,
484 .attach_must_ptrace = 0,
char events[MAX_EVENTS][BUFSIZ]
int NWUNIT_stop(hwd_context_t *ctx, hwd_control_state_t *ptr)
int NWUNIT_reset(hwd_context_t *ctx, hwd_control_state_t *ptr)
papi_vector_t _NWunit_vector
int NWUNIT_update_control_state(hwd_control_state_t *ptr, NativeInfo_t *native, int count, hwd_context_t *ctx)
int NWUNIT_init_component(int cidx)
int NWUNIT_ntv_code_to_bits(unsigned int EventCode, hwd_register_t *bits)
int NWUNIT_cleanup_eventset(hwd_control_state_t *ctrl)
int NWUNIT_ntv_code_to_name(unsigned int EventCode, char *name, int len)
int NWUNIT_set_domain(hwd_control_state_t *cntrl, int domain)
int NWUNIT_init_control_state(hwd_control_state_t *ptr)
int NWUNIT_read(hwd_context_t *ctx, hwd_control_state_t *ptr, long_long **events, int flags)
int NWUNIT_ctl(hwd_context_t *ctx, int code, _papi_int_option_t *option)
int NWUNIT_start(hwd_context_t *ctx, hwd_control_state_t *ptr)
int NWUNIT_shutdown_thread(hwd_context_t *ctx)
int NWUNIT_ntv_enum_events(unsigned int *EventCode, int modifier)
int NWUNIT_init_thread(hwd_context_t *ctx)
int NWUNIT_ntv_code_to_descr(unsigned int EventCode, char *name, int len)
int NWUNIT_ntv_name_to_code(const char *name, unsigned int *event_code)
This file has the source code for a component that enables PAPI-C to access hardware monitoring count...
#define NWUNIT_MAX_EVENTS
#define NWUNIT_MAX_COUNTERS
int _common_deleteRecreate(int *EventGroup_ptr)
long_long _common_getEventValue(unsigned event_id, int EventGroup)
int _check_BGPM_error(int err, char *bgpmfunc)
long long counts[NWUNIT_MAX_COUNTERS]
char name[PAPI_MAX_STR_LEN]
PAPI_component_info_t cmp_info