PAPI  5.0.1.0
linux-bgp.h
Go to the documentation of this file.
00001 #ifndef _LINUX_BGP_H
00002 #define _LINUX_BGP_H
00003 
00004 #include <stdlib.h>
00005 #include <stdio.h>
00006 #include <string.h>
00007 #include <unistd.h>
00008 #include <sys/profil.h>
00009 #include <assert.h>
00010 #include <limits.h>
00011 #include <signal.h>
00012 #include <errno.h>
00013 #include <sys/ucontext.h>
00014 #include <spi/bgp_SPI.h>
00015 
00016 #include <stdarg.h>
00017 #include <ctype.h>
00018 
00019 #define MAX_COUNTERS BGP_UPC_MAX_MONITORED_EVENTS
00020 #define MAX_COUNTER_TERMS MAX_COUNTERS
00021 
00022 #include "papi.h"
00023 #include "papi_preset.h"
00024 #include "papi_defines.h"
00025 #include "linux-bgp-native-events.h"
00026 
00027 // Context structure not used...
00028 typedef struct bgp_context
00029 {
00030     int reserved;
00031 } bgp_context_t;
00032 
00033 // Control state structure...  Holds local copy of read counters...
00034 typedef struct bgp_control_state
00035 {
00036     long_long counters[BGP_UPC_MAX_MONITORED_EVENTS];
00037 } bgp_control_state_t;
00038 
00039 // Register allocation structure
00040 typedef struct bgp_reg_alloc
00041 {
00042     _papi_hwd_bgp_native_event_id_t id;
00043 } bgp_reg_alloc_t;
00044 
00045 // Register structure not used...
00046 typedef struct bgp_register
00047 {
00048     int reserved;
00049 } bgp_register_t;
00050 
00051 /* Override void* definitions from PAPI framework layer */
00052 /* with typedefs to conform to PAPI component layer code. */
00053 #undef  hwd_reg_alloc_t
00054 #undef  hwd_register_t
00055 #undef  hwd_control_state_t
00056 #undef  hwd_context_t
00057 
00058 typedef bgp_reg_alloc_t hwd_reg_alloc_t;
00059 typedef bgp_register_t hwd_register_t;
00060 typedef bgp_control_state_t hwd_control_state_t;
00061 typedef bgp_context_t hwd_context_t;
00062 
00063 extern void _papi_hwd_lock( int );
00064 extern void _papi_hwd_unlock( int );
00065 
00066 #include "linux-bgp-context.h"
00067 
00068 extern hwi_search_t *preset_search_map;
00069 
00070 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines