|
PAPI
5.3.0.0
|


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_t * | perfctr_get_native_evt_info (void) |
| ntv_event_group_info_t * | perfctr_get_native_group_info (void) |
Variables | |
| volatile unsigned int | lock [] |
| #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 | ) |
do { \ __asm__ volatile("lwsync": : :"memory"); \ lock[(locknum)] = MUTEX_OPEN; \ } while(0)
Definition at line 101 of file perfctr-ppc64.h.
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 ppc64_perfctr_context_t hwd_context_t |
Definition at line 161 of file perfctr-ppc64.h.
Definition at line 160 of file perfctr-ppc64.h.
| typedef ppc64_reg_alloc_t hwd_reg_alloc_t |
Definition at line 134 of file perfctr-ppc64.h.
| static unsigned long _papi_hwd_trylock | ( | unsigned int * | lock | ) | [inline, static] |
Definition at line 83 of file perfctr-ppc64.h.
{
unsigned long tmp, tmp2;
__asm__ volatile ( " li %1,%3\n"
"1: lwarx %0,0,%2\n"
" cmpwi 0,%0,%4\n"
" bne- 2f\n"
" stwcx. %1,0,%2\n"
" bne- 1b\n"
" isync\n" "2:":"=&r" ( tmp ), "=&r"( tmp2 )
:"b"( lock ), "i"( MUTEX_LOCKED ), "i"( MUTEX_OPEN )
:"cr0", "memory" );
return tmp;
}
| ntv_event_info_t* perfctr_get_native_evt_info | ( | void | ) |
Definition at line 483 of file ppc64_events.c.
{
ntv_event_info_t *evt_info = NULL;
FILE *evt_file = open_file( "events" );
if ( evt_file != NULL ) {
evt_info = parse_eventfile( evt_file );
}
return evt_info;
}


Definition at line 495 of file ppc64_events.c.
{
ntv_event_group_info_t *groups = NULL;
FILE *grp_file = NULL;
if ( ( grp_file = open_file( "groups" ) ) != NULL ) {
groups = parse_groupfile( grp_file );
}
return groups;
}


| int setup_ppc64_native_table | ( | void | ) |