33 sprintf( buffer,
"Error: ret value is %d for BGPM API function '%s'.",
52 retval = Bgpm_ReadEvent( EventGroup, event_id, &value );
67 printf(
_AT_ " _common_deleteRecreate: *EventGroup_ptr=%d\n", *EventGroup_ptr);
72 retval = Bgpm_DeleteEventSet( *EventGroup_ptr );
77 *EventGroup_ptr = Bgpm_CreateEventSet();
82 printf(
_AT_ " _common_deleteRecreate: *EventGroup_ptr=%d\n", *EventGroup_ptr);
95 printf(
"_common_rebuildEventgroup\n" );
101 retval = Bgpm_AddEvent( *EventGroup_ptr, EventGroup_local[
i] );
106 printf(
"_common_rebuildEventgroup: After emptying EventGroup, event re-added: %d\n",
107 EventGroup_local[
i] );
127 uint64_t threshold_for_bgpm;
131 threshold_for_bgpm = BGPM_PERIOD2THRES(
threshold );
134 printf(
"_common_set_overflow_BGPM\n");
137 int numEvts = Bgpm_NumEvents( EventGroup );
138 for (
i = 0;
i < numEvts;
i++ ) {
139 printf(
"_common_set_overflow_BGPM: %d = %s\n",
i, Bgpm_GetEventLabel( EventGroup,
i) );
144 retval = Bgpm_SetOverflow( EventGroup,
146 threshold_for_bgpm );
150 retval = Bgpm_SetEventUser1( EventGroup,
157 retval = Bgpm_SetOverflowHandler( EventGroup,
int _common_set_overflow_BGPM(int EventGroup, int evt_idx, int threshold, void(*handler)(int, uint64_t, uint64_t, const ucontext_t *))
int _common_deleteRecreate(int *EventGroup_ptr)
int _common_rebuildEventgroup(int count, int *EventGroup_local, int *EventGroup_ptr)
long_long _common_getEventValue(unsigned event_id, int EventGroup)
int _check_BGPM_error(int err, char *bgpmfunc)
This file is part of the source code for a component that enables PAPI-C to access hardware monitorin...
void handler(int EventSet, void *address, long long overflow_vector, void *context)