Blame src/libpfm4/docs/man3/libpfm_perf_event_raw.3

Packit 577717
.TH LIBPFM 3  "February, 2014" "" "Linux Programmer's Manual"
Packit 577717
.SH NAME
Packit 577717
libpfm_perf_event_raw - support for perf_events raw events syntax
Packit 577717
.SH SYNOPSIS
Packit 577717
.nf
Packit 577717
.B #include <perfmon/pfmlib.h>
Packit 577717
.sp
Packit 577717
.B PMU name: perf_raw
Packit 577717
.B PMU desc: Raw perf_events event syntax
Packit 577717
.sp
Packit 577717
.SH DESCRIPTION
Packit 577717
The library supports a pseudo PMU model to allow raw encodings of PMU events
Packit 577717
for the Linux perf_events kernel interface.
Packit 577717
Packit 577717
With this PMU, it is possible to provide the raw hexadecimal encoding of any
Packit 577717
hardware event for any PMU models. The raw encoding is passed as is to the
Packit 577717
kernel. All events are encoded as \fBPERF_TYPE_RAW\fR. As such, perf_events
Packit 577717
generic events, such as cycles, instructions, cannot be encoded by this
Packit 577717
PMU.
Packit 577717
Packit 577717
The syntax is very simple: rX. X is the hexadecimal 64-bit value for the event.
Packit 577717
It may include event filters on some PMU models. The hexadecimal number is passed
Packit 577717
without the 0x prefix, e.g., r01c4.
Packit 577717
Packit 577717
The library's standard perf_events attributes are supported by this PMU model.
Packit 577717
They are separated with colons as is customary with the library.
Packit 577717
Packit 577717
.SH MODIFIERS
Packit 577717
The following modifiers are supported by this PMU model:
Packit 577717
.TP
Packit 577717
.B u
Packit 577717
Measure at user level which includes privilege levels 1, 2, 3. This corresponds to \fBPFM_PLM3\fR.
Packit 577717
This is a boolean modifier.
Packit 577717
.TP
Packit 577717
.B k
Packit 577717
Measure at kernel level which includes privilege level 0. This corresponds to \fBPFM_PLM0\fR.
Packit 577717
This is a boolean modifier.
Packit 577717
.TP
Packit 577717
.B h
Packit 577717
Measure at the hypervisor level. This corresponds to \fBPFM_PLMH\fR.
Packit 577717
This is a boolean modifier
Packit 577717
.TP
Packit 577717
.B mg 
Packit 577717
Measure guest execution only. This is a boolean modifier
Packit 577717
.TP
Packit 577717
.B mh
Packit 577717
Measure host execution only. This is a boolean modifier
Packit 577717
.TP
Packit 577717
.B period
Packit 577717
Specify the the sampling period value. Value can be expressed in decimal or hexadecimal.
Packit 577717
Value is 64-bit wide. This option is mutually exclusive with
Packit 577717
\fBfreq\fR. The period is expressed in the unit of the event. There is no default value.
Packit 577717
.TP
Packit 577717
.B freq
Packit 577717
Specify the the sampling frequency value. Value can be expressed in decimal or hexadecimal.
Packit 577717
Value is 64-bit wide. This options is mutually exclusive with
Packit 577717
\fBperiod\fR. The value is expressed in Hertz. For instance, freq=100, means that the
Packit 577717
event should be sampled 100 times per second on average. There is no default value.
Packit 577717
.TP
Packit 577717
.B excl
Packit 577717
The associated event is the only event measured on the PMU. This applies only to hardware
Packit 577717
events. This attribute requires admin privileges. Default is off.
Packit 577717
.TP
Packit 577717
.B precise
Packit 577717
Enables precise sampling mode. This option is only valid on sampling events. This is an
Packit 577717
integer value. It can have the following values: 1 enable precise sampling, 2 enable precise
Packit 577717
sampling and eliminate skid. Not all events necessarily support precise mode, this is dependent
Packit 577717
on the underlying PMU. Eliminating skid is a best effort feature. It may not work for all
Packit 577717
samples.
Packit 577717
.TP
Packit 577717
.B cpu
Packit 577717
This integer option is used with system-wide events, i.e., events attached to a CPU instead of
Packit 577717
a thread. The value designate the CPU to attach the event to. It is up to the caller of the library
Packit 577717
to use the cpu field in the library event encoding argument to create the event. No verification on
Packit 577717
the validity of the CPU number is made by the library. Default value is -1 for this field.
Packit 577717
.TP
Packit 577717
.B pinned
Packit 577717
This boolean option is used with system-wide events, i.e., events attached to a CPU instead of
Packit 577717
a thread. If set, then the event is marked as pinned. That means it needs to remain on the counters
Packit 577717
at all time, i.e., it cannot be multiplexed. There can only be as many pinned events as there are
Packit 577717
counters, yet the library does not check for that, the perf_event subsystem does. The default value
Packit 577717
for this field is false, i.e., the event is not pinned.
Packit 577717
Packit 577717
.SH AUTHORS
Packit 577717
.nf
Packit 577717
Stephane Eranian <eranian@gmail.com>
Packit 577717
.if
Packit 577717
.PP