|
Packit |
577717 |
#ifndef PPC64_EVENTS_H_
|
|
Packit |
577717 |
#define PPC64_EVENTS_H_
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* File: ppc64_events.h
|
|
Packit |
577717 |
* CVS:
|
|
Packit |
577717 |
* Author: Maynard Johnson
|
|
Packit |
577717 |
* maynardj@us.ibm.com
|
|
Packit |
577717 |
* Mods: <your name here>
|
|
Packit |
577717 |
* <your email address>
|
|
Packit |
577717 |
*
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#ifdef ARCH_EVTS
|
|
Packit |
577717 |
#include ARCH_EVTS
|
|
Packit |
577717 |
#else
|
|
Packit |
577717 |
#define GROUP_INTS 8
|
|
Packit |
577717 |
#if defined(_POWER5)
|
|
Packit |
577717 |
#define PAPI_MAX_NATIVE_EVENTS 512
|
|
Packit |
577717 |
#elif defined(_POWER6)
|
|
Packit |
577717 |
#define PAPI_MAX_NATIVE_EVENTS 1024
|
|
Packit |
577717 |
#else
|
|
Packit |
577717 |
#define PAPI_MAX_NATIVE_EVENTS 1024
|
|
Packit |
577717 |
#endif
|
|
Packit |
577717 |
#define MAX_GROUPS (GROUP_INTS * 32)
|
|
Packit |
577717 |
#endif
|
|
Packit |
577717 |
|
|
Packit |
577717 |
typedef struct PPC64_register
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* indicate which counters this event can live on */
|
|
Packit |
577717 |
unsigned int selector;
|
|
Packit |
577717 |
/* Buffers containing counter cmds for each possible metric */
|
|
Packit |
577717 |
int counter_cmd[MAX_COUNTERS];
|
|
Packit |
577717 |
/* which group this event belongs */
|
|
Packit |
577717 |
unsigned int group[GROUP_INTS];
|
|
Packit |
577717 |
} PPC64_register_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Override void* definitions from PAPI framework layer */
|
|
Packit |
577717 |
/* with typedefs to conform to PAPI component layer code. */
|
|
Packit |
577717 |
#undef hwd_register_t
|
|
Packit |
577717 |
typedef PPC64_register_t hwd_register_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
typedef struct PPC64_groups
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
#ifdef __perfctr__
|
|
Packit |
577717 |
unsigned int mmcr0;
|
|
Packit |
577717 |
unsigned int mmcr1L;
|
|
Packit |
577717 |
unsigned int mmcr1U;
|
|
Packit |
577717 |
unsigned int mmcra;
|
|
Packit |
577717 |
unsigned int counter_cmd[MAX_COUNTERS];
|
|
Packit |
577717 |
#else
|
|
Packit |
577717 |
/* Buffer containing counter cmds for this group */
|
|
Packit |
577717 |
unsigned int counter_cmd[MAX_COUNTERS];
|
|
Packit |
577717 |
#endif
|
|
Packit |
577717 |
} PPC64_groups_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
typedef PPC64_groups_t hwd_groups_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
typedef struct native_event_entry
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* description of the resources required by this native event */
|
|
Packit |
577717 |
hwd_register_t resources;
|
|
Packit |
577717 |
/* If it exists, then this is the name of this event */
|
|
Packit |
577717 |
char *name;
|
|
Packit |
577717 |
/* If it exists, then this is the description of this event */
|
|
Packit |
577717 |
char *description;
|
|
Packit |
577717 |
} native_event_entry_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
typedef struct PPC64_native_map
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* native event name */
|
|
Packit |
577717 |
char *name;
|
|
Packit |
577717 |
/* real index in the native table */
|
|
Packit |
577717 |
int index;
|
|
Packit |
577717 |
} PPC64_native_map_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
extern native_event_entry_t native_table[PAPI_MAX_NATIVE_EVENTS];
|
|
Packit |
577717 |
#ifndef __perfctr__
|
|
Packit |
577717 |
extern hwd_pminfo_t pminfo;
|
|
Packit |
577717 |
extern pm_groups_info_t pmgroups;
|
|
Packit |
577717 |
#endif
|
|
Packit |
577717 |
extern PPC64_native_map_t native_name_map[PAPI_MAX_NATIVE_EVENTS];
|
|
Packit |
577717 |
extern hwd_groups_t group_map[MAX_GROUPS];
|
|
Packit |
577717 |
|
|
Packit |
577717 |
int check_native_name( );
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#endif /*PPC64_EVENTS_H_ */
|