36 printf(
"CNKUNIT_init_thread\n" );
52 printf(
"CNKUNIT_init_component\n" );
57 printf(
"CNKUNIT_init_component cidx = %d\n",
cidx );
72 printf(
"CNKUNIT_init_control_state\n" );
78 this_state->
EventGroup = Bgpm_CreateEventSet();
93 printf(
"CNKUNIT_start\n" );
120 printf(
"CNKUNIT_stop\n" );
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++ )
173 printf(
"CNKUNIT_shutdown_thread\n" );
188 printf(
"CNKUNIT_ctl\n" );
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 );
251 printf(
"CNKUNIT_set_domain\n" );
279 printf(
"CNKUNIT_reset\n" );
310 printf(
"CNKUNIT_cleanup_eventset\n" );
336 switch ( modifier ) {
345 int index = ( *EventCode ) +
OFFSET;
348 *EventCode = *EventCode + 1;
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" );
386 *event_code = ( ret -
OFFSET ) ;
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" );
433 index = ( EventCode ) +
OFFSET;
435 retval = Bgpm_GetLongDesc( index,
name, &len );
450 printf(
"CNKUNIT_ntv_code_to_bits\n" );
464 .
name =
"bgpm/CNKUnit",
465 .short_name =
"CNKUnit",
466 .description =
"Blue Gene/Q CNKUnit 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 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_init_thread(hwd_context_t *ctx)
int CNKUNIT_ctl(hwd_context_t *ctx, int code, _papi_int_option_t *option)
papi_vector_t _CNKunit_vector
int CNKUNIT_set_domain(hwd_control_state_t *cntrl, int domain)
int CNKUNIT_update_control_state(hwd_control_state_t *ptr, NativeInfo_t *native, int count, hwd_context_t *ctx)
int CNKUNIT_stop(hwd_context_t *ctx, hwd_control_state_t *ptr)
int CNKUNIT_ntv_code_to_descr(unsigned int EventCode, char *name, int len)
int CNKUNIT_start(hwd_context_t *ctx, hwd_control_state_t *ptr)
int CNKUNIT_shutdown_thread(hwd_context_t *ctx)
int CNKUNIT_init_control_state(hwd_control_state_t *ptr)
int CNKUNIT_cleanup_eventset(hwd_control_state_t *ctrl)
int CNKUNIT_reset(hwd_context_t *ctx, hwd_control_state_t *ptr)
int CNKUNIT_init_component(int cidx)
int CNKUNIT_ntv_code_to_bits(unsigned int EventCode, hwd_register_t *bits)
int CNKUNIT_read(hwd_context_t *ctx, hwd_control_state_t *ptr, long_long **events, int flags)
int CNKUNIT_ntv_enum_events(unsigned int *EventCode, int modifier)
This file has the source code for a component that enables PAPI-C to access hardware monitoring count...
#define CNKUNIT_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[CNKUNIT_MAX_COUNTERS]
char name[PAPI_MAX_STR_LEN]
PAPI_component_info_t cmp_info