|
PAPI 7.1.0.0
|


Go to the source code of this file.
Data Structures | |
| struct | pfmlib_regmask_t |
| struct | pfmlib_event_t |
| struct | pfmlib_reg_t |
| struct | pfmlib_input_param_t |
| struct | pfmlib_output_param_t |
| struct | pfmlib_options_t |
Macros | |
| #define | PFMLIB_VERSION (3 << 16 | 10) |
| #define | PFMLIB_MAJ_VERSION(v) ((v)>>16) |
| #define | PFMLIB_MIN_VERSION(v) ((v) & 0xffff) |
| #define | PFMLIB_MAX_PMCS 512 /* maximum number of PMCS supported by the library */ |
| #define | PFMLIB_MAX_PMDS 512 /* maximum number of PMDS supported by the library */ |
| #define | PFM_PLM0 0x1 /* priv level 0 */ |
| #define | PFM_PLM1 0x2 /* priv level 1 */ |
| #define | PFM_PLM2 0x4 /* priv level 2 */ |
| #define | PFM_PLM3 0x8 /* priv level 3 */ |
| #define | PFMLIB_REG_MAX PFMLIB_MAX_PMDS |
| #define | __PFMLIB_REG_BV_BITS (sizeof(pfmlib_regmask_bits_t)<<3) |
| #define | PFMLIB_BVSIZE(x) (((x)+(__PFMLIB_REG_BV_BITS)-1) / __PFMLIB_REG_BV_BITS) |
| #define | PFMLIB_REG_BV PFMLIB_BVSIZE(PFMLIB_REG_MAX) |
| #define | PFMLIB_MAX_MASKS_PER_EVENT 48 /* maximum number of unit masks per event */ |
| #define | PFMLIB_PFP_SYSTEMWIDE 0x1 /* indicate monitors will be used in a system-wide session */ |
| #define | PFMLIB_NO_PMU -1 /* PMU unused (forced) */ |
| #define | PFMLIB_UNKNOWN_PMU 0 /* type not yet known (dynamic) */ |
| #define | PFMLIB_GEN_IA64_PMU 1 /* Intel IA-64 architected PMU */ |
| #define | PFMLIB_ITANIUM_PMU 2 /* Intel Itanium */ |
| #define | PFMLIB_ITANIUM2_PMU 3 /* Intel Itanium 2 */ |
| #define | PFMLIB_MONTECITO_PMU 4 /* Intel Dual-Core Itanium 2 9000 */ |
| #define | PFMLIB_AMD64_PMU 16 /* AMD AMD64 (K7, K8, Families 10h, 15h) */ |
| #define | PFMLIB_GEN_IA32_PMU 63 /* Intel architectural PMU for X86 */ |
| #define | PFMLIB_I386_P6_PMU 32 /* Intel PIII (P6 core) */ |
| #define | PFMLIB_PENTIUM4_PMU 33 /* Intel Pentium4/Xeon/EM64T */ |
| #define | PFMLIB_COREDUO_PMU 34 /* Intel Core Duo/Core Solo */ |
| #define | PFMLIB_I386_PM_PMU 35 /* Intel Pentium M */ |
| #define | PFMLIB_CORE_PMU 36 /* obsolete, use PFMLIB_INTEL_CORE_PMU */ |
| #define | PFMLIB_INTEL_CORE_PMU 36 /* Intel Core */ |
| #define | PFMLIB_INTEL_PPRO_PMU 37 /* Intel Pentium Pro */ |
| #define | PFMLIB_INTEL_PII_PMU 38 /* Intel Pentium II */ |
| #define | PFMLIB_INTEL_ATOM_PMU 39 /* Intel Atom */ |
| #define | PFMLIB_INTEL_NHM_PMU 40 /* Intel Nehalem */ |
| #define | PFMLIB_INTEL_WSM_PMU 41 /* Intel Westmere */ |
| #define | PFMLIB_MIPS_20KC_PMU 64 /* MIPS 20KC */ |
| #define | PFMLIB_MIPS_24K_PMU 65 /* MIPS 24K */ |
| #define | PFMLIB_MIPS_25KF_PMU 66 /* MIPS 25KF */ |
| #define | PFMLIB_MIPS_34K_PMU 67 /* MIPS 34K */ |
| #define | PFMLIB_MIPS_5KC_PMU 68 /* MIPS 5KC */ |
| #define | PFMLIB_MIPS_74K_PMU 69 /* MIPS 74K */ |
| #define | PFMLIB_MIPS_R10000_PMU 70 /* MIPS R10000 */ |
| #define | PFMLIB_MIPS_R12000_PMU 71 /* MIPS R12000 */ |
| #define | PFMLIB_MIPS_RM7000_PMU 72 /* MIPS RM7000 */ |
| #define | PFMLIB_MIPS_RM9000_PMU 73 /* MIPS RM9000 */ |
| #define | PFMLIB_MIPS_SB1_PMU 74 /* MIPS SB1/SB1A */ |
| #define | PFMLIB_MIPS_VR5432_PMU 75 /* MIPS VR5432 */ |
| #define | PFMLIB_MIPS_VR5500_PMU 76 /* MIPS VR5500 */ |
| #define | PFMLIB_MIPS_ICE9A_PMU 77 /* SiCortex ICE9A */ |
| #define | PFMLIB_MIPS_ICE9B_PMU 78 /* SiCortex ICE9B */ |
| #define | PFMLIB_POWERPC_PMU 90 /* POWERPC */ |
| #define | PFMLIB_CRAYX2_PMU 96 /* Cray X2 */ |
| #define | PFMLIB_CELL_PMU 100 /* CELL */ |
| #define | PFMLIB_PPC970_PMU 110 /* IBM PowerPC 970(FX,GX) */ |
| #define | PFMLIB_PPC970MP_PMU 111 /* IBM PowerPC 970MP */ |
| #define | PFMLIB_POWER3_PMU 112 /* IBM POWER3 */ |
| #define | PFMLIB_POWER4_PMU 113 /* IBM POWER4 */ |
| #define | PFMLIB_POWER5_PMU 114 /* IBM POWER5 */ |
| #define | PFMLIB_POWER5p_PMU 115 /* IBM POWER5+ */ |
| #define | PFMLIB_POWER6_PMU 116 /* IBM POWER6 */ |
| #define | PFMLIB_POWER7_PMU 117 /* IBM POWER7 */ |
| #define | PFMLIB_SPARC_ULTRA12_PMU 130 /* UltraSPARC I, II, IIi, and IIe */ |
| #define | PFMLIB_SPARC_ULTRA3_PMU 131 /* UltraSPARC III */ |
| #define | PFMLIB_SPARC_ULTRA3I_PMU 132 /* UltraSPARC IIIi and IIIi+ */ |
| #define | PFMLIB_SPARC_ULTRA3PLUS_PMU 133 /* UltraSPARC III+ and IV */ |
| #define | PFMLIB_SPARC_ULTRA4PLUS_PMU 134 /* UltraSPARC IV+ */ |
| #define | PFMLIB_SPARC_NIAGARA1_PMU 135 /* Niagara-1 */ |
| #define | PFMLIB_SPARC_NIAGARA2_PMU 136 /* Niagara-2 */ |
| #define | PFMLIB_SUCCESS 0 /* success */ |
| #define | PFMLIB_ERR_NOTSUPP -1 /* function not supported */ |
| #define | PFMLIB_ERR_INVAL -2 /* invalid parameters */ |
| #define | PFMLIB_ERR_NOINIT -3 /* library was not initialized */ |
| #define | PFMLIB_ERR_NOTFOUND -4 /* event not found */ |
| #define | PFMLIB_ERR_NOASSIGN -5 /* cannot assign events to counters */ |
| #define | PFMLIB_ERR_FULL -6 /* buffer is full or too small */ |
| #define | PFMLIB_ERR_EVTMANY -7 /* event used more than once */ |
| #define | PFMLIB_ERR_MAGIC -8 /* invalid library magic number */ |
| #define | PFMLIB_ERR_FEATCOMB -9 /* invalid combination of features */ |
| #define | PFMLIB_ERR_EVTSET -10 /* incompatible event sets */ |
| #define | PFMLIB_ERR_EVTINCOMP -11 /* incompatible event combination */ |
| #define | PFMLIB_ERR_TOOMANY -12 /* too many events or unit masks */ |
| #define | PFMLIB_ERR_IRRTOOBIG -13 /* code range too big */ |
| #define | PFMLIB_ERR_IRREMPTY -14 /* empty code range */ |
| #define | PFMLIB_ERR_IRRINVAL -15 /* invalid code range */ |
| #define | PFMLIB_ERR_IRRTOOMANY -16 /* too many code ranges */ |
| #define | PFMLIB_ERR_DRRINVAL -17 /* invalid data range */ |
| #define | PFMLIB_ERR_DRRTOOMANY -18 /* too many data ranges */ |
| #define | PFMLIB_ERR_BADHOST -19 /* not supported by host CPU */ |
| #define | PFMLIB_ERR_IRRALIGN -20 /* bad alignment for code range */ |
| #define | PFMLIB_ERR_IRRFLAGS -21 /* code range missing flags */ |
| #define | PFMLIB_ERR_UMASK -22 /* invalid or missing unit mask */ |
| #define | PFMLIB_ERR_NOMEM -23 /* out of memory */ |
| #define | __PFMLIB_REGMASK_EL(g) ((g)/__PFMLIB_REG_BV_BITS) |
| #define | __PFMLIB_REGMASK_MASK(g) (((pfmlib_regmask_bits_t)1) << ((g) % __PFMLIB_REG_BV_BITS)) |
Typedefs | |
| typedef unsigned long | pfmlib_regmask_bits_t |
| typedef int | pfm_err_t |
| #define __PFMLIB_REG_BV_BITS (sizeof(pfmlib_regmask_bits_t)<<3) |
| #define __PFMLIB_REGMASK_EL | ( | g | ) | ((g)/__PFMLIB_REG_BV_BITS) |
| #define __PFMLIB_REGMASK_MASK | ( | g | ) | (((pfmlib_regmask_bits_t)1) << ((g) % __PFMLIB_REG_BV_BITS)) |
| #define PFMLIB_AMD64_PMU 16 /* AMD AMD64 (K7, K8, Families 10h, 15h) */ |
| #define PFMLIB_BVSIZE | ( | x | ) | (((x)+(__PFMLIB_REG_BV_BITS)-1) / __PFMLIB_REG_BV_BITS) |
| #define PFMLIB_CORE_PMU 36 /* obsolete, use PFMLIB_INTEL_CORE_PMU */ |
| #define PFMLIB_COREDUO_PMU 34 /* Intel Core Duo/Core Solo */ |
| #define PFMLIB_ERR_BADHOST -19 /* not supported by host CPU */ |
| #define PFMLIB_ERR_DRRTOOMANY -18 /* too many data ranges */ |
| #define PFMLIB_ERR_EVTINCOMP -11 /* incompatible event combination */ |
| #define PFMLIB_ERR_EVTMANY -7 /* event used more than once */ |
| #define PFMLIB_ERR_EVTSET -10 /* incompatible event sets */ |
| #define PFMLIB_ERR_FEATCOMB -9 /* invalid combination of features */ |
| #define PFMLIB_ERR_FULL -6 /* buffer is full or too small */ |
| #define PFMLIB_ERR_IRRALIGN -20 /* bad alignment for code range */ |
| #define PFMLIB_ERR_IRRFLAGS -21 /* code range missing flags */ |
| #define PFMLIB_ERR_IRRTOOMANY -16 /* too many code ranges */ |
| #define PFMLIB_ERR_MAGIC -8 /* invalid library magic number */ |
| #define PFMLIB_ERR_NOASSIGN -5 /* cannot assign events to counters */ |
| #define PFMLIB_ERR_NOINIT -3 /* library was not initialized */ |
| #define PFMLIB_ERR_TOOMANY -12 /* too many events or unit masks */ |
| #define PFMLIB_ERR_UMASK -22 /* invalid or missing unit mask */ |
| #define PFMLIB_GEN_IA32_PMU 63 /* Intel architectural PMU for X86 */ |
| #define PFMLIB_GEN_IA64_PMU 1 /* Intel IA-64 architected PMU */ |
| #define PFMLIB_MAX_MASKS_PER_EVENT 48 /* maximum number of unit masks per event */ |
| #define PFMLIB_MAX_PMCS 512 /* maximum number of PMCS supported by the library */ |
| #define PFMLIB_MAX_PMDS 512 /* maximum number of PMDS supported by the library */ |
| #define PFMLIB_MONTECITO_PMU 4 /* Intel Dual-Core Itanium 2 9000 */ |
| #define PFMLIB_PENTIUM4_PMU 33 /* Intel Pentium4/Xeon/EM64T */ |
| #define PFMLIB_PFP_SYSTEMWIDE 0x1 /* indicate monitors will be used in a system-wide session */ |
| #define PFMLIB_REG_BV PFMLIB_BVSIZE(PFMLIB_REG_MAX) |
| #define PFMLIB_REG_MAX PFMLIB_MAX_PMDS |
| #define PFMLIB_SPARC_ULTRA12_PMU 130 /* UltraSPARC I, II, IIi, and IIe */ |
| #define PFMLIB_SPARC_ULTRA3I_PMU 132 /* UltraSPARC IIIi and IIIi+ */ |
| #define PFMLIB_SPARC_ULTRA3PLUS_PMU 133 /* UltraSPARC III+ and IV */ |
| #define PFMLIB_SPARC_ULTRA4PLUS_PMU 134 /* UltraSPARC IV+ */ |
| #define PFMLIB_UNKNOWN_PMU 0 /* type not yet known (dynamic) */ |
| typedef unsigned long pfmlib_regmask_bits_t |
| pfm_err_t pfm_dispatch_events | ( | pfmlib_input_param_t * | p, |
| void * | model_in, | ||
| pfmlib_output_param_t * | q, | ||
| void * | model_out | ||
| ) |
Definition at line 721 of file pfmlib_common.c.


Definition at line 388 of file pfmlib_common.c.


Definition at line 351 of file pfmlib_common.c.


Definition at line 416 of file pfmlib_common.c.
Definition at line 310 of file pfmlib_common.c.

Definition at line 473 of file pfmlib_common.c.

| pfm_err_t pfm_find_full_event | ( | const char * | str, |
| pfmlib_event_t * | e | ||
| ) |
Definition at line 1081 of file pfmlib_common.c.


Definition at line 294 of file pfmlib_common.c.
| pfm_err_t pfm_get_cycle_event | ( | pfmlib_event_t * | e | ) |
Definition at line 943 of file pfmlib_common.c.

Definition at line 598 of file pfmlib_common.c.

Definition at line 609 of file pfmlib_common.c.

| pfm_err_t pfm_get_event_counters | ( | unsigned int | idx, |
| pfmlib_regmask_t * | counters | ||
| ) |
Definition at line 619 of file pfmlib_common.c.

Definition at line 978 of file pfmlib_common.c.

Definition at line 1009 of file pfmlib_common.c.

| pfm_err_t pfm_get_event_mask_description | ( | unsigned int | event_idx, |
| unsigned int | mask_idx, | ||
| char ** | desc | ||
| ) |
Definition at line 992 of file pfmlib_common.c.

| pfm_err_t pfm_get_event_mask_name | ( | unsigned int | event_idx, |
| unsigned int | mask_idx, | ||
| char * | name, | ||
| size_t | maxlen | ||
| ) |
Definition at line 631 of file pfmlib_common.c.

Definition at line 564 of file pfmlib_common.c.

| pfm_err_t pfm_get_full_event_name | ( | pfmlib_event_t * | e, |
| char * | name, | ||
| size_t | maxlen | ||
| ) |
Definition at line 1026 of file pfmlib_common.c.


Definition at line 845 of file pfmlib_common.c.
| pfm_err_t pfm_get_impl_counters | ( | pfmlib_regmask_t * | impl_counters | ) |
Definition at line 832 of file pfmlib_common.c.

| pfm_err_t pfm_get_impl_pmcs | ( | pfmlib_regmask_t * | impl_pmcs | ) |
Definition at line 806 of file pfmlib_common.c.
| pfm_err_t pfm_get_impl_pmds | ( | pfmlib_regmask_t * | impl_pmds | ) |
Definition at line 819 of file pfmlib_common.c.
| pfm_err_t pfm_get_inst_retired_event | ( | pfmlib_event_t * | e | ) |
Definition at line 962 of file pfmlib_common.c.

Definition at line 903 of file pfmlib_common.c.


Definition at line 770 of file pfmlib_common.c.

Definition at line 682 of file pfmlib_common.c.


Definition at line 670 of file pfmlib_common.c.

Definition at line 782 of file pfmlib_common.c.
Definition at line 794 of file pfmlib_common.c.
Definition at line 251 of file pfmlib_common.c.

Definition at line 212 of file pfmlib_common.c.
Definition at line 265 of file pfmlib_common.c.

Definition at line 895 of file pfmlib_common.c.

| pfm_err_t pfm_initialize | ( | void | ) |
Definition at line 144 of file pfmlib_common.c.


Definition at line 280 of file pfmlib_common.c.
Definition at line 233 of file pfmlib_common.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| pfm_err_t pfm_set_options | ( | pfmlib_options_t * | opt | ) |
Definition at line 194 of file pfmlib_common.c.

| char * pfm_strerror | ( | int | code | ) |
Definition at line 887 of file pfmlib_common.c.
