Blame src/components/bgpm/CNKunit/linux-CNKunit.h

Packit 577717
/****************************/
Packit 577717
/* THIS IS OPEN SOURCE CODE */
Packit 577717
/****************************/
Packit 577717
Packit 577717
/** 
Packit 577717
 * @file    linux-CNKunit.h
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 / CNKunit component 
Packit 577717
 * 
Packit 577717
 * Tested version of bgpm (early access)
Packit 577717
 *
Packit 577717
 * @brief
Packit 577717
 *  This file has 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
#ifndef _PAPI_CNKUNIT_H
Packit 577717
#define _PAPI_CNKUNIT_H
Packit 577717
Packit 577717
#include "papi.h"
Packit 577717
#include "papi_internal.h"
Packit 577717
#include "papi_vector.h"
Packit 577717
#include "papi_memory.h"
Packit 577717
#include "extras.h"
Packit 577717
#include "../../../linux-bgq-common.h"
Packit 577717
Packit 577717
Packit 577717
/*************************  DEFINES SECTION  ***********************************
Packit 577717
 *******************************************************************************/
Packit 577717
Packit 577717
/* this number assumes that there will never be more events than indicated */
Packit 577717
#define CNKUNIT_MAX_COUNTERS PEVT_CNKUNIT_LAST_EVENT
Packit 577717
#define OFFSET ( PEVT_NWUNIT_LAST_EVENT + 1 )
Packit 577717
Packit 577717
Packit 577717
/** Structure that stores private information of each event */
Packit 577717
typedef struct CNKUNIT_register
Packit 577717
{
Packit 577717
	unsigned int selector;
Packit 577717
	/* Signifies which counter slot is being used */
Packit 577717
	/* Indexed from 1 as 0 has a special meaning  */
Packit 577717
} CNKUNIT_register_t;
Packit 577717
Packit 577717
Packit 577717
typedef struct CNKUNIT_reg_alloc
Packit 577717
{
Packit 577717
	CNKUNIT_register_t ra_bits;
Packit 577717
} CNKUNIT_reg_alloc_t;
Packit 577717
Packit 577717
Packit 577717
typedef struct CNKUNIT_control_state
Packit 577717
{
Packit 577717
	int EventGroup;
Packit 577717
	long long counts[CNKUNIT_MAX_COUNTERS];
Packit 577717
} CNKUNIT_control_state_t;
Packit 577717
Packit 577717
Packit 577717
typedef struct CNKUNIT_context
Packit 577717
{
Packit 577717
	CNKUNIT_control_state_t state;
Packit 577717
} CNKUNIT_context_t;
Packit 577717
Packit 577717
Packit 577717
#endif /* _PAPI_CNKUNIT_H */