perfctr-ppc64.h File Reference

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

Go to the source code of this file.

Data Structures

struct  hwd_native_t
struct  ppc64_reg_alloc_t
struct  ppc64_perfctr_control_t
struct  ppc64_perfctr_context_t
struct  ntv_event_t
struct  ntv_event_info_t
struct  event_group_t
struct  ntv_event_group_info_t

Defines

#define MAX_COUNTERS   8
#define NUM_COUNTER_MASKS   MAX_COUNTERS+1
#define PMC1_SEL_MASK   0xFFFFF0FFUL
#define PMC2_SEL_MASK   0xFFFFFFE1UL
#define PMC3_SEL_MASK   0xFFFFFFFF87FFFFFFULL
#define PMC4_SEL_MASK   0xFFFFFFFFFC3FFFFFULL
#define PMC5_SEL_MASK   0xFFFFFFFFFFE1FFFFULL
#define PMC6_SEL_MASK   0xFFFFFFFFFFFF0FFFULL
#define PMC7_SEL_MASK   0xFFFFFFFFFFFFF87FULL
#define PMC8_SEL_MASK   0xFFFFFFFFFFFFFFC3ULL
#define PMC8a_SEL_MASK   0xFFFDFFFFUL
#define HW_OVERFLOW   1
#define PERF_INT_ENABLE   0x0000C000
#define PMC_OVFL   0x80000000
#define PERF_KERNEL   0x40000000
#define PERF_USER   0x20000000
#define PERF_HYPERVISOR   0x00000001
#define PERF_CONTROL_MASK   0xFFFFE001
#define AI_ERROR   "No support for a-mode counters after adding an i-mode counter"
#define VOPEN_ERROR   "vperfctr_open() returned NULL, please run perfex -i to verify your perfctr installation"
#define GOPEN_ERROR   "gperfctr_open() returned NULL"
#define VINFO_ERROR   "vperfctr_info() returned < 0"
#define VCNTRL_ERROR   "vperfctr_control() returned < 0"
#define RCNTRL_ERROR   "rvperfctr_control() returned < 0"
#define GCNTRL_ERROR   "gperfctr_control() returned < 0"
#define FOPEN_ERROR   "fopen(%s) returned NULL"
#define STATE_MAL_ERROR   "Error allocating perfctr structures"
#define MODEL_ERROR   "This is not a PowerPC"
#define EVENT_INFO_FILE_ERROR   "Event info file error"
#define MUTEX_LOCKED   1
#define MUTEX_OPEN   0
#define _papi_hwd_lock(locknum)   do { } while (_papi_hwd_trylock((unsigned int *)(&(lock[(locknum)]))) != MUTEX_OPEN)
#define _papi_hwd_unlock(locknum)
#define hwd_pmc_control   vperfctr_control

Typedefs

typedef ppc64_reg_alloc_t hwd_reg_alloc_t
typedef ppc64_perfctr_control_t hwd_control_state_t
typedef ppc64_perfctr_context_t hwd_context_t

Functions

static unsigned long _papi_hwd_trylock (unsigned int *lock)
int setup_ppc64_native_table (void)
ntv_event_info_tperfctr_get_native_evt_info (void)
ntv_event_group_info_tperfctr_get_native_group_info (void)

Variables

volatile unsigned int lock []

Define Documentation

#define _papi_hwd_lock ( locknum   )     do { } while (_papi_hwd_trylock((unsigned int *)(&(lock[(locknum)]))) != MUTEX_OPEN)

Definition at line 98 of file perfctr-ppc64.h.

#define _papi_hwd_unlock ( locknum   ) 
Value:
do { \
        __asm__ volatile("lwsync": : :"memory"); \
        lock[(locknum)] = MUTEX_OPEN; \
    } while(0)

Definition at line 101 of file perfctr-ppc64.h.

#define AI_ERROR   "No support for a-mode counters after adding an i-mode counter"

Definition at line 62 of file perfctr-ppc64.h.

#define EVENT_INFO_FILE_ERROR   "Event info file error"

Definition at line 72 of file perfctr-ppc64.h.

#define FOPEN_ERROR   "fopen(%s) returned NULL"

Definition at line 69 of file perfctr-ppc64.h.

#define GCNTRL_ERROR   "gperfctr_control() returned < 0"

Definition at line 68 of file perfctr-ppc64.h.

#define GOPEN_ERROR   "gperfctr_open() returned NULL"

Definition at line 64 of file perfctr-ppc64.h.

#define HW_OVERFLOW   1

Definition at line 50 of file perfctr-ppc64.h.

#define hwd_pmc_control   vperfctr_control

Definition at line 162 of file perfctr-ppc64.h.

#define MAX_COUNTERS   8

Definition at line 28 of file perfctr-ppc64.h.

#define MODEL_ERROR   "This is not a PowerPC"

Definition at line 71 of file perfctr-ppc64.h.

#define MUTEX_LOCKED   1

Definition at line 74 of file perfctr-ppc64.h.

#define MUTEX_OPEN   0

Definition at line 75 of file perfctr-ppc64.h.

#define NUM_COUNTER_MASKS   MAX_COUNTERS+1

Definition at line 29 of file perfctr-ppc64.h.

#define PERF_CONTROL_MASK   0xFFFFE001

Definition at line 59 of file perfctr-ppc64.h.

#define PERF_HYPERVISOR   0x00000001

Definition at line 58 of file perfctr-ppc64.h.

#define PERF_INT_ENABLE   0x0000C000

Definition at line 54 of file perfctr-ppc64.h.

#define PERF_KERNEL   0x40000000

Definition at line 56 of file perfctr-ppc64.h.

#define PERF_USER   0x20000000

Definition at line 57 of file perfctr-ppc64.h.

#define PMC1_SEL_MASK   0xFFFFF0FFUL

Definition at line 31 of file perfctr-ppc64.h.

#define PMC2_SEL_MASK   0xFFFFFFE1UL

Definition at line 32 of file perfctr-ppc64.h.

#define PMC3_SEL_MASK   0xFFFFFFFF87FFFFFFULL

Definition at line 33 of file perfctr-ppc64.h.

#define PMC4_SEL_MASK   0xFFFFFFFFFC3FFFFFULL

Definition at line 34 of file perfctr-ppc64.h.

#define PMC5_SEL_MASK   0xFFFFFFFFFFE1FFFFULL

Definition at line 35 of file perfctr-ppc64.h.

#define PMC6_SEL_MASK   0xFFFFFFFFFFFF0FFFULL

Definition at line 36 of file perfctr-ppc64.h.

#define PMC7_SEL_MASK   0xFFFFFFFFFFFFF87FULL

Definition at line 37 of file perfctr-ppc64.h.

#define PMC8_SEL_MASK   0xFFFFFFFFFFFFFFC3ULL

Definition at line 38 of file perfctr-ppc64.h.

#define PMC8a_SEL_MASK   0xFFFDFFFFUL

Definition at line 39 of file perfctr-ppc64.h.

#define PMC_OVFL   0x80000000

Definition at line 55 of file perfctr-ppc64.h.

#define RCNTRL_ERROR   "rvperfctr_control() returned < 0"

Definition at line 67 of file perfctr-ppc64.h.

#define STATE_MAL_ERROR   "Error allocating perfctr structures"

Definition at line 70 of file perfctr-ppc64.h.

#define VCNTRL_ERROR   "vperfctr_control() returned < 0"

Definition at line 66 of file perfctr-ppc64.h.

#define VINFO_ERROR   "vperfctr_info() returned < 0"

Definition at line 65 of file perfctr-ppc64.h.

#define VOPEN_ERROR   "vperfctr_open() returned NULL, please run perfex -i to verify your perfctr installation"

Definition at line 63 of file perfctr-ppc64.h.


Typedef Documentation

Definition at line 161 of file perfctr-ppc64.h.

Definition at line 160 of file perfctr-ppc64.h.

Definition at line 134 of file perfctr-ppc64.h.


Function Documentation

static unsigned long _papi_hwd_trylock ( unsigned int *  lock  )  [inline, static]

Definition at line 83 of file perfctr-ppc64.h.

00084 {
00085     unsigned long tmp, tmp2;
00086     __asm__ volatile ( "              li              %1,%3\n"
00087                        "1:            lwarx           %0,0,%2\n"
00088                        "              cmpwi           0,%0,%4\n"
00089                        "              bne-            2f\n"
00090                        "              stwcx.          %1,0,%2\n"
00091                        "              bne-            1b\n"
00092                        "              isync\n" "2:":"=&r" ( tmp ), "=&r"( tmp2 )
00093                        :"b"( lock ), "i"( MUTEX_LOCKED ), "i"( MUTEX_OPEN )
00094                        :"cr0", "memory" );
00095     return tmp;
00096 }

ntv_event_info_t* perfctr_get_native_evt_info ( void   ) 

Definition at line 483 of file ppc64_events.c.

00484 {
00485     ntv_event_info_t *evt_info = NULL;
00486     FILE *evt_file = open_file( "events" );
00487     if ( evt_file != NULL ) {
00488         evt_info = parse_eventfile( evt_file );
00489     }
00490     return evt_info;
00491 
00492 }

Here is the call graph for this function:

Here is the caller graph for this function:

ntv_event_group_info_t* perfctr_get_native_group_info ( void   ) 

Definition at line 495 of file ppc64_events.c.

00496 {
00497     ntv_event_group_info_t *groups = NULL;
00498     FILE *grp_file = NULL;
00499     if ( ( grp_file = open_file( "groups" ) ) != NULL ) {
00500         groups = parse_groupfile( grp_file );
00501     }
00502     return groups;
00503 }

Here is the call graph for this function:

Here is the caller graph for this function:

int setup_ppc64_native_table ( void   ) 

Variable Documentation

volatile unsigned int lock[]

Definition at line 25 of file aix.c.


Generated on 17 Nov 2016 for PAPI by  doxygen 1.6.1