1LIBPFM(3)                  Linux Programmer's Manual                 LIBPFM(3)
2
3
4

NAME

6       pfm_regmask_set,     pfm_regmask_isset,    pfm_regmask_clr,    pfm_reg‐
7       mask_weight, pfm_regmask_eq, pfm_regmask_and, pfm_regmask_or,  pfm_reg‐
8       mask_copy - operations on pfmlib_regmask_t bitmasks
9

SYNOPSIS

11       #include <perfmon/pfmlib.h>
12
13       int pfm_regmask_isset(pfmlib_regmask_t *mask,  unsigned int b);
14       int pfm_regmask_set(pfmlib_regmask_t *mask,  unsigned int b);
15       int pfm_regmask_clr(pfmlib_regmask_t *mask,  unsigned int b);
16       int pfm_regmask_weight(pfmlib_regmask_t *mask, unsigned int *w);
17       int pfm_regmask_eq(pfmlib_regmask_t *mask1, pfmlib_regmask_t *mask2);
18       int pfm_regmask_and(pfmlib_regmask_t *dest, pfmlib_regmask_t *m1, pmlib_regmask_t *m2);
19       int pfm_regmask_or(pfmlib_regmask_t *dest, pfmlib_regmask_t *m1, pmlib_regmask_t *m2);
20       int pfm_regmask_copy(pfmlib_regmask_t *dest, pfmlib_regmask_t *src);
21
22

DESCRIPTION

24       This  set  of  function is used to operate of the pfmlib_regmask_t bit‐
25       masks that are returned by certain  functions  or  passed  to  pfm_dis‐
26       patch_events.
27
28       To  ensure  portability, it is important that applications use only the
29       functions specified here to access te bitmasks. It is strongly discour‐
30       aged to access the internal fields of the pfm_regmask_t structure.
31
32       The pfm_regmask_set function is used to set bit b in the bitmask mask.
33
34       The  pfm_regmask_clr  function  is  used  to clear bit b in the bitmask
35       mask.
36
37       The pfm_regmask_isset function returns a non-zero value if b is set  in
38       the bitmask mask.
39
40       The  pfm_regmask_weight function returns in w the number of bits set in
41       the bitmask mask.
42
43       The pfm_regmask_eq function returns a non-zero value  if  the  bitmasks
44       mask1 and mask2 are identical.
45
46       The  pfm_regmask_and function returns in bitmask dest the result of the
47       logical AND operation between bitmask m1 and bitmask m2.
48
49       The pfm_regmask_or function returns in bitmask dest the result  of  the
50       logical OR operation between bitmask m1 and bitmask m2.
51
52       The pfm_regmask_copy function copies bitmask src into bitmask dest.
53
54

RETURN

56       The  function returns whether or not it was successful.  A return value
57       of PFMLIB_SUCCESS indicates success, otherwise the value is  the  error
58       code.
59

ERRORS

61       PFMLIB_ERR_INVAL the bit b exceeds the limit supported by the library
62

AUTHOR

64       Stephane Eranian <eranian@hpl.hp.com>
65
66                                   Apr, 2006                         LIBPFM(3)
Impressum