Blame src/linux-bgq-common.h

Packit 577717
/****************************/
Packit 577717
/* THIS IS OPEN SOURCE CODE */
Packit 577717
/****************************/
Packit 577717
Packit 577717
/** 
Packit 577717
 * @file    linux-bgq-common.h
Packit 577717
 * CVS:     $Id$
Packit 577717
 * @author  Heike Jagode
Packit 577717
 *          jagode@eecs.utk.edu
Packit 577717
 * Mods:	< your name here >
Packit 577717
 *			< your email address >
Packit 577717
 * BGPM component 
Packit 577717
 * 
Packit 577717
 * Tested version of bgpm (early access)
Packit 577717
 *
Packit 577717
 * @brief
Packit 577717
 *  This file is part of the source code for a component that enables PAPI-C to 
Packit 577717
 *  access hardware monitoring counters for BG/Q through the bgpm library.
Packit 577717
 */
Packit 577717
Packit 577717
#include "papi.h"
Packit 577717
/* Header required by BGPM */
Packit 577717
#include "bgpm/include/bgpm.h"
Packit 577717
Packit 577717
extern int _papi_hwi_publish_error( char *error );
Packit 577717
Packit 577717
// Define gymnastics to create a compile time AT string.
Packit 577717
#define STRINGIFY(x) #x
Packit 577717
#define TOSTRING(x) STRINGIFY(x)
Packit 577717
#define _AT_ __FILE__ ":" TOSTRING(__LINE__)
Packit 577717
Packit 577717
/* return EXIT_FAILURE;  \*/
Packit 577717
Packit 577717
#define MAX_COUNTERS ( PEVT_LAST_EVENT + 1 )
Packit 577717
//#define DEBUG_BGQ
Packit 577717
Packit 577717
Packit 577717
/*************************  COMMON PROTOTYPES  *********************************
Packit 577717
 *******************************************************************************/
Packit 577717
Packit 577717
/* common prototypes for BGQ sustrate and BGPM components */
Packit 577717
int         _check_BGPM_error( int err, char* bgpmfunc );
Packit 577717
long_long	_common_getEventValue( unsigned event_id, int EventGroup );
Packit 577717
int 		_common_deleteRecreate( int *EventGroup_ptr );
Packit 577717
int 		_common_rebuildEventgroup( int count, int *EventGroup_local, int *EventGroup_ptr );
Packit 577717
int 		_common_set_overflow_BGPM( int EventGroup, 
Packit 577717
									   int evt_idx,
Packit 577717
									   int threshold, 
Packit 577717
									   void (*handler)(int, uint64_t, uint64_t, const ucontext_t *) );