PAPI  5.3.0.0
linux-bgq-common.h
Go to the documentation of this file.
00001 /****************************/
00002 /* THIS IS OPEN SOURCE CODE */
00003 /****************************/
00004 
00021 #include "papi.h"
00022 /* Header required by BGPM */
00023 #include "bgpm/include/bgpm.h"
00024 
00025 extern int _papi_hwi_publish_error( char *error );
00026 
00027 // Define gymnastics to create a compile time AT string.
00028 #define STRINGIFY(x) #x
00029 #define TOSTRING(x) STRINGIFY(x)
00030 #define _AT_ __FILE__ ":" TOSTRING(__LINE__)
00031 
00032 /* return EXIT_FAILURE;  \*/
00033 
00034 #define MAX_COUNTERS ( PEVT_LAST_EVENT + 1 )
00035 //#define DEBUG_BGQ
00036 
00037 
00038 /*************************  COMMON PROTOTYPES  *********************************
00039  *******************************************************************************/
00040 
00041 /* common prototypes for BGQ sustrate and BGPM components */
00042 int         _check_BGPM_error( int err, char* bgpmfunc );
00043 long_long   _common_getEventValue( unsigned event_id, int EventGroup );
00044 int         _common_deleteRecreate( int *EventGroup_ptr );
00045 int         _common_rebuildEventgroup( int count, int *EventGroup_local, int *EventGroup_ptr );
00046 int         _common_set_overflow_BGPM( int EventGroup, 
00047                                        int evt_idx,
00048                                        int threshold, 
00049                                        void (*handler)(int, uint64_t, uint64_t, const ucontext_t *) );
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines