PAPI 7.1.0.0
Loading...
Searching...
No Matches
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 UPC_P_NUM_COUNTERS
46#define BGQ_PUNIT_MAX_EVENTS PEVT_PUNIT_LAST_EVENT
47#define MAX_COUNTER_TERMS BGQ_PUNIT_MAX_COUNTERS
48// keep a large enough gap between actual BGPM events and our local opcode events
49#define OPCODE_BUF ( MAX_COUNTERS + MAX_COUNTERS )
50
51
52#include "papi.h"
53#include "papi_preset.h"
54
55
56
57typedef struct
58{
59 int preset; /* Preset code */
60 int derived; /* Derived code */
61 char *( findme[MAX_COUNTER_TERMS] ); /* Strings to look for, more than 1 means derived */
62 char *operation; /* PostFix operations between terms */
63 char *note; /* In case a note is included with a preset */
65
66
67// Context structure not used...
68typedef struct bgq_context
69{
72
73typedef struct bgq_overflow
74{
78
79// Control state structure... Holds local copy of read counters...
80typedef struct bgq_control_state
81{
83 int EventGroup_local[512];
84 int count;
86 int muxOn; // multiplexing on or off flag
87 int overflow; // overflow enable
89 bgq_overflow_t overflow_list[512];
90 int bgpm_eventset_applied; // BGPM eventGroup applied yes or no flag
92
93// Register allocation structure
94typedef struct bgq_reg_alloc
95{
96 //_papi_hwd_bgq_native_event_id_t id;
98
99// Register structure not used...
100typedef struct bgq_register
101{
102 /* This is used by the framework.It likes it to be !=0 to do something */
103 unsigned int selector;
104 /* This is the information needed to locate a BGPM / Punit event */
105 unsigned eventID;
107
109typedef struct bgq_native_event_entry
110{
113 char description[PAPI_2MAX_STR_LEN];
115
116/* Override void* definitions from PAPI framework layer */
117/* with typedefs to conform to PAPI component layer code. */
118#undef hwd_reg_alloc_t
119#undef hwd_register_t
120#undef hwd_control_state_t
121#undef hwd_context_t
122
127
128extern void _papi_hwd_lock( int );
129extern void _papi_hwd_unlock( int );
130
131/* Signal handling functions */
132//#undef hwd_siginfo_t
133//#undef hwd_ucontext_t
134//typedef int hwd_siginfo_t;
135//typedef ucontext_t hwd_ucontext_t;
136
137#endif
#define _papi_hwd_unlock(lck)
Definition: aix-lock.h:11
#define _papi_hwd_lock(lck)
Definition: aix-lock.h:6
#define PAPI_MAX_STR_LEN
Definition: f90papi.h:77
#define PAPI_2MAX_STR_LEN
Definition: f90papi.h:180
This file is part of the source code for a component that enables PAPI-C to access hardware monitorin...
#define BGQ_PUNIT_MAX_COUNTERS
Definition: linux-bgq.h:45
bgq_context_t hwd_context_t
Definition: linux-bgq.h:126
bgq_control_state_t hwd_control_state_t
Definition: linux-bgq.h:125
bgq_reg_alloc_t hwd_reg_alloc_t
Definition: linux-bgq.h:123
bgq_register_t hwd_register_t
Definition: linux-bgq.h:124
#define MAX_COUNTER_TERMS
Definition: linux-bgq.h:47
Return codes and api definitions.
#define long_long
Definition: papi.h:559
const char * name
Definition: rocs.c:225
Definition: linux-bgq.h:110
bgq_register_t resources
Definition: linux-bgq.h:111
Definition: linux-bgq.h:58
int derived
Definition: linux-bgq.h:60
int preset
Definition: linux-bgq.h:59
char * operation
Definition: linux-bgq.h:62
char * note
Definition: linux-bgq.h:63
unsigned eventID
Definition: linux-bgq.h:105
unsigned int selector
Definition: linux-bgq.h:103