PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
linux-bgq.h
Go to the documentation of this file.
1 /****************************/
2 /* THIS IS OPEN SOURCE CODE */
3 /****************************/
4 
22 #ifndef _LINUX_BGQ_H
23 #define _LINUX_BGQ_H
24 
25 #include <stdlib.h>
26 #include <stdio.h>
27 #include <string.h>
28 #include <unistd.h>
29 #include <sys/profil.h>
30 #include <assert.h>
31 #include <limits.h>
32 #include <signal.h>
33 #include <errno.h>
34 #include <sys/ucontext.h>
35 #include <stdarg.h>
36 #include <ctype.h>
37 //#include <pthread.h>
38 
39 #include "linux-bgq-common.h"
40 /* Header required to obtain BGQ personality */
41 #include "process_impl.h"
42 #include "linux-context.h"
43 
44 /* this number assumes that there will never be more events than indicated */
45 #define BGQ_PUNIT_MAX_COUNTERS PEVT_PUNIT_LAST_EVENT
46 #define MAX_COUNTER_TERMS BGQ_PUNIT_MAX_COUNTERS
47 // keep a large enough gap between actual BGPM events and our local opcode events
48 #define OPCODE_BUF ( MAX_COUNTERS + MAX_COUNTERS )
49 
50 
51 #include "papi.h"
52 #include "papi_preset.h"
53 
54 
55 
56 typedef struct
57 {
58  int preset; /* Preset code */
59  int derived; /* Derived code */
60  char *( findme[MAX_COUNTER_TERMS] ); /* Strings to look for, more than 1 means derived */
61  char *operation; /* PostFix operations between terms */
62  char *note; /* In case a note is included with a preset */
64 
65 
66 // Context structure not used...
67 typedef struct bgq_context
68 {
69  int reserved;
71 
72 typedef struct bgq_overflow
73 {
74  int threshold;
77 
78 // Control state structure... Holds local copy of read counters...
79 typedef struct bgq_control_state
80 {
82  int EventGroup_local[512];
83  int count;
85  int muxOn; // multiplexing on or off flag
86  int overflow; // overflow enable
88  bgq_overflow_t overflow_list[512];
89  int bgpm_eventset_applied; // BGPM eventGroup applied yes or no flag
91 
92 // Register allocation structure
93 typedef struct bgq_reg_alloc
94 {
95  //_papi_hwd_bgq_native_event_id_t id;
97 
98 // Register structure not used...
99 typedef struct bgq_register
100 {
101  /* This is used by the framework.It likes it to be !=0 to do something */
102  unsigned int selector;
103  /* This is the information needed to locate a BGPM / Punit event */
104  unsigned eventID;
106 
108 typedef struct bgq_native_event_entry
109 {
112  char description[PAPI_2MAX_STR_LEN];
114 
115 /* Override void* definitions from PAPI framework layer */
116 /* with typedefs to conform to PAPI component layer code. */
117 #undef hwd_reg_alloc_t
118 #undef hwd_register_t
119 #undef hwd_control_state_t
120 #undef hwd_context_t
121 
126 
127 extern void _papi_hwd_lock( int );
128 extern void _papi_hwd_unlock( int );
129 
130 /* Signal handling functions */
131 //#undef hwd_siginfo_t
132 //#undef hwd_ucontext_t
133 //typedef int hwd_siginfo_t;
134 //typedef ucontext_t hwd_ucontext_t;
135 
136 #endif
Definition: linux-bgq.h:56
#define hwd_control_state_t
#define hwd_reg_alloc_t
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
Return codes and api definitions.
char * note
Definition: linux-bgq.h:62
#define PAPI_2MAX_STR_LEN
Definition: papi.h:464
#define MAX_COUNTER_TERMS
Definition: linux-bgq.h:46
#define hwd_context_t
char * operation
Definition: linux-bgq.h:61
#define _papi_hwd_unlock(lck)
Definition: aix-lock.h:11
unsigned int selector
Definition: linux-bgq.h:102
int derived
Definition: linux-bgq.h:59
This file is part of the source code for a component that enables PAPI-C to access hardware monitorin...
bgq_register_t resources
Definition: linux-bgq.h:110
char * name
Definition: iozone.c:23648
#define long_long
Definition: papi.h:549
#define BGQ_PUNIT_MAX_COUNTERS
Definition: linux-bgq.h:45
unsigned eventID
Definition: linux-bgq.h:104
#define _papi_hwd_lock(lck)
Definition: aix-lock.h:6
#define hwd_register_t
Definition: linux-bgq.h:108
int preset
Definition: linux-bgq.h:58