This file is part of 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 | _check_BGPM_error (int err, char *bgpmfunc) |
| |
| long_long | _common_getEventValue (unsigned event_id, int EventGroup) |
| |
| int | _common_deleteRecreate (int *EventGroup_ptr) |
| |
| int | _common_rebuildEventgroup (int count, int *EventGroup_local, int *EventGroup_ptr) |
| |
| int | _common_set_overflow_BGPM (int EventGroup, int evt_idx, int threshold, void(*handler)(int, uint64_t, uint64_t, const ucontext_t *)) |
| |
CVS: $Id$
- 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 component
Tested version of bgpm (early access)
Definition in file linux-bgq-common.c.
◆ _check_BGPM_error()
| int _check_BGPM_error |
( |
int |
err, |
|
|
char * |
bgpmfunc |
|
) |
| |
Definition at line 27 of file linux-bgq-common.c.
33 sprintf(
buffer,
"Error: ret value is %d for BGPM API function '%s'.",
int _papi_hwi_publish_error(char *error)
◆ _common_deleteRecreate()
| int _common_deleteRecreate |
( |
int * |
EventGroup_ptr | ) |
|
Definition at line 64 of file linux-bgq-common.c.
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);
int _check_BGPM_error(int err, char *bgpmfunc)
◆ _common_getEventValue()
| long_long _common_getEventValue |
( |
unsigned |
event_id, |
|
|
int |
EventGroup |
|
) |
| |
Definition at line 47 of file linux-bgq-common.c.
52 retval = Bgpm_ReadEvent( EventGroup, event_id, &value );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ _common_rebuildEventgroup()
| int _common_rebuildEventgroup |
( |
int |
count, |
|
|
int * |
EventGroup_local, |
|
|
int * |
EventGroup_ptr |
|
) |
| |
Definition at line 92 of file linux-bgq-common.c.
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] );
int _check_BGPM_error(int err, char *bgpmfunc)
◆ _common_set_overflow_BGPM()
| int _common_set_overflow_BGPM |
( |
int |
EventGroup, |
|
|
int |
evt_idx, |
|
|
int |
threshold, |
|
|
void(*)(int, uint64_t, uint64_t, const ucontext_t *) |
handler |
|
) |
| |
Definition at line 121 of file linux-bgq-common.c.
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 _check_BGPM_error(int err, char *bgpmfunc)
void handler(int EventSet, void *address, long long overflow_vector, void *context)