Go to the documentation of this file.
14 #include <sys/types.h>
21 # include <perfmon/perfmon_ia64.h>
32 #if defined( __powerpc__ ) || defined( __cell__ )
33 # include <perfmon/perfmon_powerpc.h>
37 # include <perfmon/perfmon_sparc.h>
41 # include <perfmon/perfmon_mips64.h>
45 # include <perfmon/perfmon_crayx2.h>
48 #define PFM_MAX_PMCS PFM_ARCH_MAX_PMCS
49 #define PFM_MAX_PMDS PFM_ARCH_MAX_PMDS
55 # define PFM_BPL ( sizeof( uint64_t ) << 3 )
56 # define PFM_BVSIZE( x ) ( ( ( x ) + PFM_BPL - 1 ) / PFM_BPL )
57 # define PFM_PMD_BV PFM_BVSIZE( PFM_MAX_PMDS )
58 # define PFM_PMC_BV PFM_BVSIZE( PFM_MAX_PMCS )
78 uint64_t sif_reserved[4];
90 #define PFM_FL_NOTIFY_BLOCK 0x01
91 #define PFM_FL_SYSTEM_WIDE 0x02
92 #define PFM_FL_SMPL_FMT 0x04
93 #define PFM_FL_OVFL_NO_MSG 0x80
112 #define PFM_REGFL_OVFL_NOTIFY 0x1
113 #define PFM_REGFL_RANDOM 0x2
114 #define PFM_REGFL_NO_EMUL64 0x4
134 uint64_t reg_reserved[8];
142 #define PFM_RW_PMD_ATTR 3
147 #define PFM_NO_TARGET -1
152 #define PFM_ST_START 0x1
153 #define PFM_ST_STOP 0x2
154 #define PFM_ST_RESTART 0x3
156 #ifndef PFMLIB_OLD_PFMV2
162 uint64_t reserved[6];
173 uint64_t set_reserved3[4];
180 #define PFM_SETFL_OVFL_SWITCH 0x01
181 #define PFM_SETFL_TIME_SWITCH 0x02
183 #ifndef PFMLIB_OLD_PFMV2
210 #define PFM_MSG_OVFL 1
211 #define PFM_MSG_END 2
213 #define PFM_VERSION_MAJOR( x ) ( ( ( x ) >> 16 ) & 0xffff )
214 #define PFM_VERSION_MINOR( x ) ( (x)&0xffff )
os_err_t pfm_read(int fd, int flags, int type, void *reg, size_t n)
uint64_t reg_smpl_eventid
os_err_t pfm_create_sets(int fd, int flags, pfarg_set_desc_t *s, size_t sz)
os_err_t pfm_attach(int fd, int flags, int target)
os_err_t pfm_getinfo_sets(int fd, int flags, pfarg_set_info_t *s, size_t sz)
os_err_t pfm_create(int flags, pfarg_sinfo_t *sif,...)
os_err_t pfm_set_state(int fd, int flags, int state)
pfarg_ovfl_msg_t pfm_ovfl_msg
os_err_t pfm_write(int fd, int flags, int type, void *reg, size_t n)