Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012
Classes | Defines | Typedefs | Functions

pfmlib.h File Reference

#include <stdio.h>
#include <inttypes.h>
#include <perfmon/pfmlib_os.h>
#include <perfmon/pfmlib_comp.h>
Include dependency graph for pfmlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Defines

#define PFMLIB_VERSION   (3 << 16 | 9)
#define PFMLIB_MAJ_VERSION(v)   ((v)>>16)
#define PFMLIB_MIN_VERSION(v)   ((v) & 0xffff)
#define PFMLIB_MAX_PMCS   512
#define PFMLIB_MAX_PMDS   512
#define PFM_PLM0   0x1
#define PFM_PLM1   0x2
#define PFM_PLM2   0x4
#define PFM_PLM3   0x8
#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
#define PFMLIB_PFP_SYSTEMWIDE   0x1
#define PFMLIB_NO_PMU   -1
#define PFMLIB_UNKNOWN_PMU   0
#define PFMLIB_GEN_IA64_PMU   1
#define PFMLIB_ITANIUM_PMU   2
#define PFMLIB_ITANIUM2_PMU   3
#define PFMLIB_MONTECITO_PMU   4
#define PFMLIB_AMD64_PMU   16
#define PFMLIB_GEN_IA32_PMU   63
#define PFMLIB_I386_P6_PMU   32
#define PFMLIB_PENTIUM4_PMU   33
#define PFMLIB_COREDUO_PMU   34
#define PFMLIB_I386_PM_PMU   35
#define PFMLIB_CORE_PMU   36
#define PFMLIB_INTEL_CORE_PMU   36
#define PFMLIB_INTEL_PPRO_PMU   37
#define PFMLIB_INTEL_PII_PMU   38
#define PFMLIB_INTEL_ATOM_PMU   39
#define PFMLIB_INTEL_NHM_PMU   40
#define PFMLIB_INTEL_WSM_PMU   41
#define PFMLIB_MIPS_20KC_PMU   64
#define PFMLIB_MIPS_24K_PMU   65
#define PFMLIB_MIPS_25KF_PMU   66
#define PFMLIB_MIPS_34K_PMU   67
#define PFMLIB_MIPS_5KC_PMU   68
#define PFMLIB_MIPS_74K_PMU   69
#define PFMLIB_MIPS_R10000_PMU   70
#define PFMLIB_MIPS_R12000_PMU   71
#define PFMLIB_MIPS_RM7000_PMU   72
#define PFMLIB_MIPS_RM9000_PMU   73
#define PFMLIB_MIPS_SB1_PMU   74
#define PFMLIB_MIPS_VR5432_PMU   75
#define PFMLIB_MIPS_VR5500_PMU   76
#define PFMLIB_MIPS_ICE9A_PMU   77
#define PFMLIB_MIPS_ICE9B_PMU   78
#define PFMLIB_POWERPC_PMU   90
#define PFMLIB_CRAYX2_PMU   96
#define PFMLIB_CELL_PMU   100
#define PFMLIB_PPC970_PMU   110
#define PFMLIB_PPC970MP_PMU   111
#define PFMLIB_POWER3_PMU   112
#define PFMLIB_POWER4_PMU   113
#define PFMLIB_POWER5_PMU   114
#define PFMLIB_POWER5p_PMU   115
#define PFMLIB_POWER6_PMU   116
#define PFMLIB_POWER7_PMU   117
#define PFMLIB_SPARC_ULTRA12_PMU   130
#define PFMLIB_SPARC_ULTRA3_PMU   131
#define PFMLIB_SPARC_ULTRA3I_PMU   132
#define PFMLIB_SPARC_ULTRA3PLUS_PMU   133
#define PFMLIB_SPARC_ULTRA4PLUS_PMU   134
#define PFMLIB_SPARC_NIAGARA1_PMU   135
#define PFMLIB_SPARC_NIAGARA2_PMU   136
#define PFMLIB_SUCCESS   0
#define PFMLIB_ERR_NOTSUPP   -1
#define PFMLIB_ERR_INVAL   -2
#define PFMLIB_ERR_NOINIT   -3
#define PFMLIB_ERR_NOTFOUND   -4
#define PFMLIB_ERR_NOASSIGN   -5
#define PFMLIB_ERR_FULL   -6
#define PFMLIB_ERR_EVTMANY   -7
#define PFMLIB_ERR_MAGIC   -8
#define PFMLIB_ERR_FEATCOMB   -9
#define PFMLIB_ERR_EVTSET   -10
#define PFMLIB_ERR_EVTINCOMP   -11
#define PFMLIB_ERR_TOOMANY   -12
#define PFMLIB_ERR_IRRTOOBIG   -13
#define PFMLIB_ERR_IRREMPTY   -14
#define PFMLIB_ERR_IRRINVAL   -15
#define PFMLIB_ERR_IRRTOOMANY   -16
#define PFMLIB_ERR_DRRINVAL   -17
#define PFMLIB_ERR_DRRTOOMANY   -18
#define PFMLIB_ERR_BADHOST   -19
#define PFMLIB_ERR_IRRALIGN   -20
#define PFMLIB_ERR_IRRFLAGS   -21
#define PFMLIB_ERR_UMASK   -22
#define PFMLIB_ERR_NOMEM   -23
#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

Functions

pfm_err_t pfm_set_options (pfmlib_options_t *opt)
pfm_err_t pfm_initialize (void)
pfm_err_t pfm_list_supported_pmus (int(*pf)(const char *fmt,...))
pfm_err_t pfm_get_pmu_name (char *name, int maxlen)
pfm_err_t pfm_get_pmu_type (int *type)
pfm_err_t pfm_get_pmu_name_bytype (int type, char *name, size_t maxlen)
pfm_err_t pfm_is_pmu_supported (int type)
pfm_err_t pfm_force_pmu (int type)
pfm_err_t pfm_find_event (const char *str, unsigned int *idx)
pfm_err_t pfm_find_event_byname (const char *name, unsigned int *idx)
pfm_err_t pfm_find_event_bycode (int code, unsigned int *idx)
pfm_err_t pfm_find_event_bycode_next (int code, unsigned int start, unsigned int *next)
pfm_err_t pfm_find_event_mask (unsigned int event_idx, const char *str, unsigned int *mask_idx)
pfm_err_t pfm_find_full_event (const char *str, pfmlib_event_t *e)
pfm_err_t pfm_get_max_event_name_len (size_t *len)
pfm_err_t pfm_get_num_events (unsigned int *count)
pfm_err_t pfm_get_num_event_masks (unsigned int event_idx, unsigned int *count)
pfm_err_t pfm_get_event_name (unsigned int idx, char *name, size_t maxlen)
pfm_err_t pfm_get_full_event_name (pfmlib_event_t *e, char *name, size_t maxlen)
pfm_err_t pfm_get_event_code (unsigned int idx, int *code)
pfm_err_t pfm_get_event_mask_code (unsigned int idx, unsigned int mask_idx, unsigned int *code)
pfm_err_t pfm_get_event_counters (unsigned int idx, pfmlib_regmask_t *counters)
pfm_err_t pfm_get_event_description (unsigned int idx, char **str)
pfm_err_t pfm_get_event_code_counter (unsigned int idx, unsigned int cnt, int *code)
pfm_err_t pfm_get_event_mask_name (unsigned int event_idx, unsigned int mask_idx, char *name, size_t maxlen)
pfm_err_t pfm_get_event_mask_description (unsigned int event_idx, unsigned int mask_idx, char **desc)
pfm_err_t pfm_dispatch_events (pfmlib_input_param_t *p, void *model_in, pfmlib_output_param_t *q, void *model_out)
pfm_err_t pfm_get_impl_pmcs (pfmlib_regmask_t *impl_pmcs)
pfm_err_t pfm_get_impl_pmds (pfmlib_regmask_t *impl_pmds)
pfm_err_t pfm_get_impl_counters (pfmlib_regmask_t *impl_counters)
pfm_err_t pfm_get_num_pmds (unsigned int *num)
pfm_err_t pfm_get_num_pmcs (unsigned int *num)
pfm_err_t pfm_get_num_counters (unsigned int *num)
pfm_err_t pfm_get_hw_counter_width (unsigned int *width)
pfm_err_t pfm_get_version (unsigned int *version)
char * pfm_strerror (int code)
pfm_err_t pfm_get_cycle_event (pfmlib_event_t *e)
pfm_err_t pfm_get_inst_retired_event (pfmlib_event_t *e)
static int pfm_regmask_isset (pfmlib_regmask_t *h, unsigned int b)
static int pfm_regmask_set (pfmlib_regmask_t *h, unsigned int b)
static int pfm_regmask_clr (pfmlib_regmask_t *h, unsigned int b)
static int pfm_regmask_weight (pfmlib_regmask_t *h, unsigned int *w)
static int pfm_regmask_eq (pfmlib_regmask_t *h1, pfmlib_regmask_t *h2)
static int pfm_regmask_and (pfmlib_regmask_t *dst, pfmlib_regmask_t *h1, pfmlib_regmask_t *h2)
static int pfm_regmask_andnot (pfmlib_regmask_t *dst, pfmlib_regmask_t *h1, pfmlib_regmask_t *h2)
static int pfm_regmask_or (pfmlib_regmask_t *dst, pfmlib_regmask_t *h1, pfmlib_regmask_t *h2)
static int pfm_regmask_copy (pfmlib_regmask_t *dst, pfmlib_regmask_t *src)
static int pfm_regmask_not (pfmlib_regmask_t *dst)

Define Documentation

#define __PFMLIB_REG_BV_BITS   (sizeof(pfmlib_regmask_bits_t)<<3)

Definition at line 70 of file pfmlib.h.

#define __PFMLIB_REGMASK_EL (   g )    ((g)/__PFMLIB_REG_BV_BITS)

Definition at line 309 of file pfmlib.h.

#define __PFMLIB_REGMASK_MASK (   g )    (((pfmlib_regmask_bits_t)1) << ((g) % __PFMLIB_REG_BV_BITS))

Definition at line 310 of file pfmlib.h.

#define PFM_PLM0   0x1

Definition at line 50 of file pfmlib.h.

#define PFM_PLM1   0x2

Definition at line 51 of file pfmlib.h.

#define PFM_PLM2   0x4

Definition at line 52 of file pfmlib.h.

#define PFM_PLM3   0x8

Definition at line 53 of file pfmlib.h.

#define PFMLIB_AMD64_PMU   16

Definition at line 227 of file pfmlib.h.

#define PFMLIB_BVSIZE (   x )    (((x)+(__PFMLIB_REG_BV_BITS)-1) / __PFMLIB_REG_BV_BITS)

Definition at line 71 of file pfmlib.h.

#define PFMLIB_CELL_PMU   100

Definition at line 261 of file pfmlib.h.

#define PFMLIB_CORE_PMU   36

Definition at line 233 of file pfmlib.h.

#define PFMLIB_COREDUO_PMU   34

Definition at line 231 of file pfmlib.h.

#define PFMLIB_CRAYX2_PMU   96

Definition at line 259 of file pfmlib.h.

#define PFMLIB_ERR_BADHOST   -19

Definition at line 303 of file pfmlib.h.

#define PFMLIB_ERR_DRRINVAL   -17

Definition at line 301 of file pfmlib.h.

#define PFMLIB_ERR_DRRTOOMANY   -18

Definition at line 302 of file pfmlib.h.

#define PFMLIB_ERR_EVTINCOMP   -11

Definition at line 294 of file pfmlib.h.

#define PFMLIB_ERR_EVTMANY   -7

Definition at line 290 of file pfmlib.h.

#define PFMLIB_ERR_EVTSET   -10

Definition at line 293 of file pfmlib.h.

#define PFMLIB_ERR_FEATCOMB   -9

Definition at line 292 of file pfmlib.h.

#define PFMLIB_ERR_FULL   -6

Definition at line 289 of file pfmlib.h.

#define PFMLIB_ERR_INVAL   -2

Definition at line 285 of file pfmlib.h.

#define PFMLIB_ERR_IRRALIGN   -20

Definition at line 304 of file pfmlib.h.

#define PFMLIB_ERR_IRREMPTY   -14

Definition at line 298 of file pfmlib.h.

#define PFMLIB_ERR_IRRFLAGS   -21

Definition at line 305 of file pfmlib.h.

#define PFMLIB_ERR_IRRINVAL   -15

Definition at line 299 of file pfmlib.h.

#define PFMLIB_ERR_IRRTOOBIG   -13

Definition at line 297 of file pfmlib.h.

#define PFMLIB_ERR_IRRTOOMANY   -16

Definition at line 300 of file pfmlib.h.

#define PFMLIB_ERR_MAGIC   -8

Definition at line 291 of file pfmlib.h.

#define PFMLIB_ERR_NOASSIGN   -5

Definition at line 288 of file pfmlib.h.

#define PFMLIB_ERR_NOINIT   -3

Definition at line 286 of file pfmlib.h.

#define PFMLIB_ERR_NOMEM   -23

Definition at line 307 of file pfmlib.h.

#define PFMLIB_ERR_NOTFOUND   -4

Definition at line 287 of file pfmlib.h.

#define PFMLIB_ERR_NOTSUPP   -1

Definition at line 284 of file pfmlib.h.

#define PFMLIB_ERR_TOOMANY   -12

Definition at line 295 of file pfmlib.h.

#define PFMLIB_ERR_UMASK   -22

Definition at line 306 of file pfmlib.h.

#define PFMLIB_GEN_IA32_PMU   63

Definition at line 228 of file pfmlib.h.

#define PFMLIB_GEN_IA64_PMU   1

Definition at line 223 of file pfmlib.h.

#define PFMLIB_I386_P6_PMU   32

Definition at line 229 of file pfmlib.h.

#define PFMLIB_I386_PM_PMU   35

Definition at line 232 of file pfmlib.h.

#define PFMLIB_INTEL_ATOM_PMU   39

Definition at line 237 of file pfmlib.h.

#define PFMLIB_INTEL_CORE_PMU   36

Definition at line 234 of file pfmlib.h.

#define PFMLIB_INTEL_NHM_PMU   40

Definition at line 238 of file pfmlib.h.

#define PFMLIB_INTEL_PII_PMU   38

Definition at line 236 of file pfmlib.h.

#define PFMLIB_INTEL_PPRO_PMU   37

Definition at line 235 of file pfmlib.h.

#define PFMLIB_INTEL_WSM_PMU   41

Definition at line 239 of file pfmlib.h.

#define PFMLIB_ITANIUM2_PMU   3

Definition at line 225 of file pfmlib.h.

#define PFMLIB_ITANIUM_PMU   2

Definition at line 224 of file pfmlib.h.

#define PFMLIB_MAJ_VERSION (   v )    ((v)>>16)

Definition at line 35 of file pfmlib.h.

#define PFMLIB_MAX_MASKS_PER_EVENT   48

Definition at line 80 of file pfmlib.h.

#define PFMLIB_MAX_PMCS   512

Definition at line 41 of file pfmlib.h.

#define PFMLIB_MAX_PMDS   512

Definition at line 42 of file pfmlib.h.

#define PFMLIB_MIN_VERSION (   v )    ((v) & 0xffff)

Definition at line 36 of file pfmlib.h.

#define PFMLIB_MIPS_20KC_PMU   64

Definition at line 241 of file pfmlib.h.

#define PFMLIB_MIPS_24K_PMU   65

Definition at line 242 of file pfmlib.h.

#define PFMLIB_MIPS_25KF_PMU   66

Definition at line 243 of file pfmlib.h.

#define PFMLIB_MIPS_34K_PMU   67

Definition at line 244 of file pfmlib.h.

#define PFMLIB_MIPS_5KC_PMU   68

Definition at line 245 of file pfmlib.h.

#define PFMLIB_MIPS_74K_PMU   69

Definition at line 246 of file pfmlib.h.

#define PFMLIB_MIPS_ICE9A_PMU   77

Definition at line 254 of file pfmlib.h.

#define PFMLIB_MIPS_ICE9B_PMU   78

Definition at line 255 of file pfmlib.h.

#define PFMLIB_MIPS_R10000_PMU   70

Definition at line 247 of file pfmlib.h.

#define PFMLIB_MIPS_R12000_PMU   71

Definition at line 248 of file pfmlib.h.

#define PFMLIB_MIPS_RM7000_PMU   72

Definition at line 249 of file pfmlib.h.

#define PFMLIB_MIPS_RM9000_PMU   73

Definition at line 250 of file pfmlib.h.

#define PFMLIB_MIPS_SB1_PMU   74

Definition at line 251 of file pfmlib.h.

#define PFMLIB_MIPS_VR5432_PMU   75

Definition at line 252 of file pfmlib.h.

#define PFMLIB_MIPS_VR5500_PMU   76

Definition at line 253 of file pfmlib.h.

#define PFMLIB_MONTECITO_PMU   4

Definition at line 226 of file pfmlib.h.

#define PFMLIB_NO_PMU   -1

Definition at line 221 of file pfmlib.h.

#define PFMLIB_PENTIUM4_PMU   33

Definition at line 230 of file pfmlib.h.

#define PFMLIB_PFP_SYSTEMWIDE   0x1

Definition at line 121 of file pfmlib.h.

#define PFMLIB_POWER3_PMU   112

Definition at line 265 of file pfmlib.h.

#define PFMLIB_POWER4_PMU   113

Definition at line 266 of file pfmlib.h.

#define PFMLIB_POWER5_PMU   114

Definition at line 267 of file pfmlib.h.

#define PFMLIB_POWER5p_PMU   115

Definition at line 268 of file pfmlib.h.

#define PFMLIB_POWER6_PMU   116

Definition at line 269 of file pfmlib.h.

#define PFMLIB_POWER7_PMU   117

Definition at line 270 of file pfmlib.h.

#define PFMLIB_POWERPC_PMU   90

Definition at line 257 of file pfmlib.h.

#define PFMLIB_PPC970_PMU   110

Definition at line 263 of file pfmlib.h.

#define PFMLIB_PPC970MP_PMU   111

Definition at line 264 of file pfmlib.h.

#define PFMLIB_REG_BV   PFMLIB_BVSIZE(PFMLIB_REG_MAX)

Definition at line 72 of file pfmlib.h.

#define PFMLIB_REG_MAX   PFMLIB_MAX_PMDS

Definition at line 66 of file pfmlib.h.

#define PFMLIB_SPARC_NIAGARA1_PMU   135

Definition at line 277 of file pfmlib.h.

#define PFMLIB_SPARC_NIAGARA2_PMU   136

Definition at line 278 of file pfmlib.h.

#define PFMLIB_SPARC_ULTRA12_PMU   130

Definition at line 272 of file pfmlib.h.

#define PFMLIB_SPARC_ULTRA3_PMU   131

Definition at line 273 of file pfmlib.h.

#define PFMLIB_SPARC_ULTRA3I_PMU   132

Definition at line 274 of file pfmlib.h.

#define PFMLIB_SPARC_ULTRA3PLUS_PMU   133

Definition at line 275 of file pfmlib.h.

#define PFMLIB_SPARC_ULTRA4PLUS_PMU   134

Definition at line 276 of file pfmlib.h.

#define PFMLIB_SUCCESS   0

Definition at line 283 of file pfmlib.h.

#define PFMLIB_UNKNOWN_PMU   0

Definition at line 222 of file pfmlib.h.

#define PFMLIB_VERSION   (3 << 16 | 9)

Definition at line 34 of file pfmlib.h.


Typedef Documentation

typedef int pfm_err_t

Definition at line 151 of file pfmlib.h.

typedef unsigned long pfmlib_regmask_bits_t

Definition at line 58 of file pfmlib.h.


Function Documentation

pfm_err_t pfm_dispatch_events ( pfmlib_input_param_t p,
void *  model_in,
pfmlib_output_param_t q,
void *  model_out 
)
pfm_err_t pfm_find_event ( const char *  str,
unsigned int *  idx 
)
pfm_err_t pfm_find_event_bycode ( int  code,
unsigned int *  idx 
)
pfm_err_t pfm_find_event_bycode_next ( int  code,
unsigned int  start,
unsigned int *  next 
)
pfm_err_t pfm_find_event_byname ( const char *  name,
unsigned int *  idx 
)
pfm_err_t pfm_find_event_mask ( unsigned int  event_idx,
const char *  str,
unsigned int *  mask_idx 
)
pfm_err_t pfm_find_full_event ( const char *  str,
pfmlib_event_t e 
)
pfm_err_t pfm_force_pmu ( int  type )
pfm_err_t pfm_get_cycle_event ( pfmlib_event_t e )
pfm_err_t pfm_get_event_code ( unsigned int  idx,
int *  code 
)
pfm_err_t pfm_get_event_code_counter ( unsigned int  idx,
unsigned int  cnt,
int *  code 
)
pfm_err_t pfm_get_event_counters ( unsigned int  idx,
pfmlib_regmask_t counters 
)
pfm_err_t pfm_get_event_description ( unsigned int  idx,
char **  str 
)
pfm_err_t pfm_get_event_mask_code ( unsigned int  idx,
unsigned int  mask_idx,
unsigned int *  code 
)
pfm_err_t pfm_get_event_mask_description ( unsigned int  event_idx,
unsigned int  mask_idx,
char **  desc 
)
pfm_err_t pfm_get_event_mask_name ( unsigned int  event_idx,
unsigned int  mask_idx,
char *  name,
size_t  maxlen 
)
pfm_err_t pfm_get_event_name ( unsigned int  idx,
char *  name,
size_t  maxlen 
)
pfm_err_t pfm_get_full_event_name ( pfmlib_event_t e,
char *  name,
size_t  maxlen 
)
pfm_err_t pfm_get_hw_counter_width ( unsigned int *  width )
pfm_err_t pfm_get_impl_counters ( pfmlib_regmask_t impl_counters )
pfm_err_t pfm_get_impl_pmcs ( pfmlib_regmask_t impl_pmcs )
pfm_err_t pfm_get_impl_pmds ( pfmlib_regmask_t impl_pmds )
pfm_err_t pfm_get_inst_retired_event ( pfmlib_event_t e )
pfm_err_t pfm_get_max_event_name_len ( size_t len )
pfm_err_t pfm_get_num_counters ( unsigned int *  num )
pfm_err_t pfm_get_num_event_masks ( unsigned int  event_idx,
unsigned int *  count 
)
pfm_err_t pfm_get_num_events ( unsigned int *  count )
pfm_err_t pfm_get_num_pmcs ( unsigned int *  num )
pfm_err_t pfm_get_num_pmds ( unsigned int *  num )
pfm_err_t pfm_get_pmu_name ( char *  name,
int  maxlen 
)
pfm_err_t pfm_get_pmu_name_bytype ( int  type,
char *  name,
size_t  maxlen 
)
pfm_err_t pfm_get_pmu_type ( int *  type )
pfm_err_t pfm_get_version ( unsigned int *  version )
pfm_err_t pfm_initialize ( void   )
pfm_err_t pfm_is_pmu_supported ( int  type )
pfm_err_t pfm_list_supported_pmus ( int(*)(const char *fmt,...)  pf )
static int pfm_regmask_and ( pfmlib_regmask_t dst,
pfmlib_regmask_t h1,
pfmlib_regmask_t h2 
) [inline, static]

Definition at line 373 of file pfmlib.h.

{
        unsigned int pos;
        if (dst == NULL || h1 == NULL || h2 == NULL)
                return PFMLIB_ERR_INVAL;

        for (pos = 0; pos < PFMLIB_REG_BV; pos++) {
                dst->bits[pos] = h1->bits[pos] & h2->bits[pos];
        }
        return PFMLIB_SUCCESS;
}
static int pfm_regmask_andnot ( pfmlib_regmask_t dst,
pfmlib_regmask_t h1,
pfmlib_regmask_t h2 
) [inline, static]

Definition at line 386 of file pfmlib.h.

{
        unsigned int pos;
        if (dst == NULL || h1 == NULL || h2 == NULL)
                return PFMLIB_ERR_INVAL;

        for (pos = 0; pos < PFMLIB_REG_BV; pos++) {
                dst->bits[pos] = h1->bits[pos] & ~h2->bits[pos];
        }
        return PFMLIB_SUCCESS;
}
static int pfm_regmask_clr ( pfmlib_regmask_t h,
unsigned int  b 
) [inline, static]

Definition at line 332 of file pfmlib.h.

{
        if (h == NULL || b >= PFMLIB_REG_MAX)
                return PFMLIB_ERR_INVAL;

        h->bits[__PFMLIB_REGMASK_EL(b)] &= ~ __PFMLIB_REGMASK_MASK(b);

        return PFMLIB_SUCCESS;
}
static int pfm_regmask_copy ( pfmlib_regmask_t dst,
pfmlib_regmask_t src 
) [inline, static]

Definition at line 412 of file pfmlib.h.

{
        unsigned int pos;
        if (dst == NULL || src == NULL)
                return PFMLIB_ERR_INVAL;

        for (pos = 0; pos < PFMLIB_REG_BV; pos++) {
                dst->bits[pos] = src->bits[pos];
        }
        return PFMLIB_SUCCESS;
}
static int pfm_regmask_eq ( pfmlib_regmask_t h1,
pfmlib_regmask_t h2 
) [inline, static]

Definition at line 359 of file pfmlib.h.

{
        unsigned int pos;

        if (h1 == NULL || h2 == NULL)
                return 0;

        for (pos = 0; pos < PFMLIB_REG_BV; pos++) {
                if (h1->bits[pos] != h2->bits[pos]) return 0;
        }
        return 1;
}
static int pfm_regmask_isset ( pfmlib_regmask_t h,
unsigned int  b 
) [inline, static]

Definition at line 313 of file pfmlib.h.

{
        if (b >= PFMLIB_REG_MAX)
                return 0;
        return (h->bits[__PFMLIB_REGMASK_EL(b)] & __PFMLIB_REGMASK_MASK(b)) != 0;
}
static int pfm_regmask_not ( pfmlib_regmask_t dst ) [inline, static]

Definition at line 424 of file pfmlib.h.

{
        unsigned int pos;
        if (dst == NULL)
                return PFMLIB_ERR_INVAL;

        for (pos = 0; pos < PFMLIB_REG_BV; pos++) {
                dst->bits[pos] = ~dst->bits[pos];
        }
        return PFMLIB_SUCCESS;
}
static int pfm_regmask_or ( pfmlib_regmask_t dst,
pfmlib_regmask_t h1,
pfmlib_regmask_t h2 
) [inline, static]

Definition at line 399 of file pfmlib.h.

{
        unsigned int pos;
        if (dst == NULL || h1 == NULL || h2 == NULL)
                return PFMLIB_ERR_INVAL;

        for (pos = 0; pos < PFMLIB_REG_BV; pos++) {
                dst->bits[pos] = h1->bits[pos] | h2->bits[pos];
        }
        return PFMLIB_SUCCESS;
}
static int pfm_regmask_set ( pfmlib_regmask_t h,
unsigned int  b 
) [inline, static]

Definition at line 321 of file pfmlib.h.

static int pfm_regmask_weight ( pfmlib_regmask_t h,
unsigned int *  w 
) [inline, static]

Definition at line 343 of file pfmlib.h.

{
        unsigned int pos;
        unsigned int weight = 0;

        if (h == NULL || w == NULL)
                return PFMLIB_ERR_INVAL;

        for (pos = 0; pos < PFMLIB_REG_BV; pos++) {
                weight += (unsigned int)pfmlib_popcnt(h->bits[pos]);
        }
        *w = weight;
        return PFMLIB_SUCCESS;
}
pfm_err_t pfm_set_options ( pfmlib_options_t opt )
char* pfm_strerror ( int  code )
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:33 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004