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

NAME

6       libpfm_perf_event_raw - support for perf_events raw events syntax
7

SYNOPSIS

9       #include <perfmon/pfmlib.h>
10
11       PMU name: perf_raw
12       PMU desc: Raw perf_events event syntax
13
14

DESCRIPTION

16       The  library  supports a pseudo PMU model to allow raw encodings of PMU
17       events for the Linux perf_events kernel interface.
18
19       With this PMU, it is possible to provide the raw  hexadecimal  encoding
20       of any hardware event for any PMU models. The raw encoding is passed as
21       is to the kernel. All events are encoded  as  PERF_TYPE_RAW.  As  such,
22       perf_events  generic  events,  such  as cycles, instructions, cannot be
23       encoded by this PMU.
24
25       The syntax is very simple: rX. X is the hexadecimal  64-bit  value  for
26       the  event.  It may include event filters on some PMU models. The hexa‐
27       decimal number is passed without the 0x prefix, e.g., r01c4.
28
29       The library's standard perf_events attributes are supported by this PMU
30       model.   They  are  separated  with  colons  as  is  customary with the
31       library.
32
33

MODIFIERS

35       The following modifiers are supported by this PMU model:
36
37       u      Measure at user level which includes privilege levels 1,  2,  3.
38              This corresponds to PFM_PLM3.  This is a boolean modifier.
39
40       k      Measure  at  kernel level which includes privilege level 0. This
41              corresponds to PFM_PLM0.  This is a boolean modifier.
42
43       h      Measure at the hypervisor level. This corresponds  to  PFM_PLMH.
44              This is a boolean modifier
45
46       mg     Measure guest execution only. This is a boolean modifier
47
48       mh     Measure host execution only. This is a boolean modifier
49
50       period Specify the the sampling period value. Value can be expressed in
51              decimal or hexadecimal.  Value is 64-bit wide.  This  option  is
52              mutually  exclusive  with  freq.  The period is expressed in the
53              unit of the event. There is no default value.
54
55       freq   Specify the the sampling frequency value. Value can be expressed
56              in  decimal  or hexadecimal.  Value is 64-bit wide. This options
57              is mutually exclusive with period. The  value  is  expressed  in
58              Hertz.  For  instance,  freq=100, means that the event should be
59              sampled 100 times per second on average.  There  is  no  default
60              value.
61
62       excl   The associated event is the only event measured on the PMU. This
63              applies only to hardware events. This attribute  requires  admin
64              privileges. Default is off.
65
66       precise
67              Enables precise sampling mode. This option is only valid on sam‐
68              pling events. This is an integer value. It can have the  follow‐
69              ing values: 1 enable precise sampling, 2 enable precise sampling
70              and eliminate skid. Not all events necessarily  support  precise
71              mode,  this is dependent on the underlying PMU. Eliminating skid
72              is a best effort feature. It may not work for all samples.
73
74       cpu    This integer option  is  used  with  system-wide  events,  i.e.,
75              events  attached  to a CPU instead of a thread. The value desig‐
76              nate the CPU to attach the event to. It is up to the  caller  of
77              the  library  to use the cpu field in the library event encoding
78              argument to create the event. No verification on the validity of
79              the  CPU  number is made by the library. Default value is -1 for
80              this field.
81
82       pinned This boolean option  is  used  with  system-wide  events,  i.e.,
83              events  attached  to a CPU instead of a thread. If set, then the
84              event is marked as pinned. That means it needs to remain on  the
85              counters  at all time, i.e., it cannot be multiplexed. There can
86              only be as many pinned events as there  are  counters,  yet  the
87              library  does not check for that, the perf_event subsystem does.
88              The default value for this field is false, i.e.,  the  event  is
89              not pinned.
90
91

AUTHORS

93       Stephane Eranian <eranian@gmail.com>
94
95
96
97                                February, 2014                       LIBPFM(3)
Impressum