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

Packit Service a1973e
/****************************/
Packit Service a1973e
/* THIS IS OPEN SOURCE CODE */
Packit Service a1973e
/****************************/
Packit Service a1973e
Packit Service a1973e
/** 
Packit Service a1973e
 * @file    linux-CNKunit.h
Packit Service a1973e
 * @author  Heike Jagode
Packit Service a1973e
 *          jagode@eecs.utk.edu
Packit Service a1973e
 * Mods:	< your name here >
Packit Service a1973e
 *			< your email address >
Packit Service a1973e
 * BGPM / CNKunit component 
Packit Service a1973e
 * 
Packit Service a1973e
 * Tested version of bgpm (early access)
Packit Service a1973e
 *
Packit Service a1973e
 * @brief
Packit Service a1973e
 *  This file has the source code for a component that enables PAPI-C to 
Packit Service a1973e
 *  access hardware monitoring counters for BG/Q through the bgpm library.
Packit Service a1973e
 */
Packit Service a1973e
Packit Service a1973e
#ifndef _PAPI_CNKUNIT_H
Packit Service a1973e
#define _PAPI_CNKUNIT_H
Packit Service a1973e
Packit Service a1973e
#include "papi.h"
Packit Service a1973e
#include "papi_internal.h"
Packit Service a1973e
#include "papi_vector.h"
Packit Service a1973e
#include "papi_memory.h"
Packit Service a1973e
#include "extras.h"
Packit Service a1973e
#include "../../../linux-bgq-common.h"
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
/*************************  DEFINES SECTION  ***********************************
Packit Service a1973e
 *******************************************************************************/
Packit Service a1973e
Packit Service a1973e
/* this number assumes that there will never be more events than indicated */
Packit Service a1973e
#define CNKUNIT_MAX_COUNTERS PEVT_CNKUNIT_LAST_EVENT
Packit Service a1973e
#define OFFSET ( PEVT_NWUNIT_LAST_EVENT + 1 )
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
/** Structure that stores private information of each event */
Packit Service a1973e
typedef struct CNKUNIT_register
Packit Service a1973e
{
Packit Service a1973e
	unsigned int selector;
Packit Service a1973e
	/* Signifies which counter slot is being used */
Packit Service a1973e
	/* Indexed from 1 as 0 has a special meaning  */
Packit Service a1973e
} CNKUNIT_register_t;
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
typedef struct CNKUNIT_reg_alloc
Packit Service a1973e
{
Packit Service a1973e
	CNKUNIT_register_t ra_bits;
Packit Service a1973e
} CNKUNIT_reg_alloc_t;
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
typedef struct CNKUNIT_control_state
Packit Service a1973e
{
Packit Service a1973e
	int EventGroup;
Packit Service a1973e
	long long counts[CNKUNIT_MAX_COUNTERS];
Packit Service a1973e
} CNKUNIT_control_state_t;
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
typedef struct CNKUNIT_context
Packit Service a1973e
{
Packit Service a1973e
	CNKUNIT_control_state_t state;
Packit Service a1973e
} CNKUNIT_context_t;
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
#endif /* _PAPI_CNKUNIT_H */