PAPI 7.1.0.0
Loading...
Searching...
No Matches
linux-bgq.h File Reference

This file has the source code for a component that enables PAPI-C to access hardware monitoring counters for BG/Q through the BGPM library. More...

Include dependency graph for linux-bgq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bgq_preset_search_entry_t
 
struct  bgq_context_t
 
struct  bgq_overflow_t
 
struct  bgq_control_state_t
 
struct  bgq_reg_alloc_t
 
struct  bgq_register_t
 
struct  bgq_native_event_entry_t
 

Macros

#define BGQ_PUNIT_MAX_COUNTERS   UPC_P_NUM_COUNTERS
 
#define BGQ_PUNIT_MAX_EVENTS   PEVT_PUNIT_LAST_EVENT
 
#define MAX_COUNTER_TERMS   BGQ_PUNIT_MAX_COUNTERS
 
#define OPCODE_BUF   ( MAX_COUNTERS + MAX_COUNTERS )
 

Typedefs

typedef bgq_reg_alloc_t hwd_reg_alloc_t
 
typedef bgq_register_t hwd_register_t
 
typedef bgq_control_state_t hwd_control_state_t
 
typedef bgq_context_t hwd_context_t
 

Functions

void _papi_hwd_lock (int)
 
void _papi_hwd_unlock (int)
 

Detailed Description

CVS: $Id$

Author
Heike Jagode jagod.nosp@m.e@ee.nosp@m.cs.ut.nosp@m.k.ed.nosp@m.u Mods: < your name here > < your email address > Blue Gene/Q CPU component: BGPM / Punit

Tested version of bgpm (early access)

Definition in file linux-bgq.h.

Macro Definition Documentation

◆ BGQ_PUNIT_MAX_COUNTERS

#define BGQ_PUNIT_MAX_COUNTERS   UPC_P_NUM_COUNTERS

Definition at line 45 of file linux-bgq.h.

◆ BGQ_PUNIT_MAX_EVENTS

#define BGQ_PUNIT_MAX_EVENTS   PEVT_PUNIT_LAST_EVENT

Definition at line 46 of file linux-bgq.h.

◆ MAX_COUNTER_TERMS

#define MAX_COUNTER_TERMS   BGQ_PUNIT_MAX_COUNTERS

Definition at line 47 of file linux-bgq.h.

◆ OPCODE_BUF

#define OPCODE_BUF   ( MAX_COUNTERS + MAX_COUNTERS )

Definition at line 49 of file linux-bgq.h.

Typedef Documentation

◆ hwd_context_t

Definition at line 126 of file linux-bgq.h.

◆ hwd_control_state_t

Definition at line 125 of file linux-bgq.h.

◆ hwd_reg_alloc_t

Definition at line 123 of file linux-bgq.h.

◆ hwd_register_t

Definition at line 124 of file linux-bgq.h.

Function Documentation

◆ _papi_hwd_lock()

void _papi_hwd_lock ( int  lock)

Definition at line 93 of file linux-bgq.c.

94{
95#ifdef DEBUG_BGQ
96 printf( _AT_ " _papi_hwd_lock %d\n", lock);
97#endif
98 assert( lock < PAPI_MAX_LOCK );
99#if 1
100 UPC_Lock( &thdLocks[lock] );
101#else
102 pthread_mutex_lock( &thdLocks[lock] );
103#endif
104
105#ifdef DEBUG_BGQ
106 printf( _AT_ " _papi_hwd_lock got lock %d\n", lock );
107#endif
108
109 return;
110}
atomic_p lock[]
Definition: aix.c:25
#define _AT_
UPC_Lock_t thdLocks[PAPI_MAX_LOCK]
Definition: linux-bgq.c:52
#define PAPI_MAX_LOCK
Definition: papi_lock.h:18

◆ _papi_hwd_unlock()

void _papi_hwd_unlock ( int  lock)

Definition at line 116 of file linux-bgq.c.

117{
118#ifdef DEBUG_BGQ
119 printf( _AT_ " _papi_hwd_unlock %d\n", lock );
120#endif
121 assert( lock < PAPI_MAX_LOCK );
122#if 1
123 UPC_Unlock( &thdLocks[lock] );
124#else
125 pthread_mutex_unlock( &thdLocks[lock] );
126#endif
127
128 return;
129}