PAPI  5.3.0.0
linux-L2unit.h
Go to the documentation of this file.
00001 /****************************/
00002 /* THIS IS OPEN SOURCE CODE */
00003 /****************************/
00004 
00020 #ifndef _PAPI_L2UNIT_H
00021 #define _PAPI_L2UNIT_H
00022 
00023 #include "papi.h"
00024 #include "papi_internal.h"
00025 #include "papi_vector.h"
00026 #include "papi_memory.h"
00027 #include "extras.h"
00028 #include "../../../linux-bgq-common.h"
00029 
00030 
00031 /*************************  DEFINES SECTION  ***********************************
00032  *******************************************************************************/
00033 
00034 /* this number assumes that there will never be more events than indicated */
00035 #define L2UNIT_MAX_COUNTERS PEVT_L2UNIT_LAST_EVENT
00036 #define OFFSET ( PEVT_PUNIT_LAST_EVENT + 1 )
00037 
00038 /* Stores private information for each event */
00039 typedef struct L2UNIT_register
00040 {
00041     unsigned int selector;
00042     /* Signifies which counter slot is being used */
00043     /* Indexed from 1 as 0 has a special meaning  */
00044 } L2UNIT_register_t;
00045 
00046 
00047 /* Used when doing register allocation */
00048 typedef struct L2UNIT_reg_alloc
00049 {
00050     L2UNIT_register_t ra_bits;
00051 } L2UNIT_reg_alloc_t;
00052 
00053 typedef struct L2UNIT_overflow
00054 {
00055     int threshold;
00056     int EventIndex;
00057 } L2UNIT_overflow_t;
00058 
00059 /* Holds control flags */
00060 typedef struct L2UNIT_control_state
00061 {
00062     int EventGroup;
00063     int EventGroup_local[512];
00064     int count;
00065     long long counters[L2UNIT_MAX_COUNTERS];
00066     int overflow;               // overflow enable
00067     int overflow_count;
00068     L2UNIT_overflow_t overflow_list[512];
00069     int bgpm_eventset_applied;  // BGPM eventGroup applied yes or no flag
00070 } L2UNIT_control_state_t;
00071 
00072 
00073 /* Holds per-thread information */
00074 typedef struct L2UNIT_context
00075 {
00076     L2UNIT_control_state_t state;
00077 } L2UNIT_context_t;
00078 
00079 
00080 #endif /* _PAPI_L2UNIT_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines