perf_event_open.2: Add some kernel version numbers to various fields and constants

And add some commit hashes in the page source.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-01-22 08:25:40 +01:00
parent 3117263f1d
commit 60dafbc123
1 changed files with 32 additions and 7 deletions

View File

@ -132,7 +132,8 @@ The
.I flags
argument is formed by ORing together zero or more of the following values:
.TP
.BR PERF_FLAG_FD_CLOEXEC " (since Linux 3.14)."
.BR PERF_FLAG_FD_CLOEXEC " (since Linux 3.14)"
.\" commit a21b0b354d4ac39be691f51c53562e2c24443d9e
This flag enables the close-on-exec flag for the created
event file descriptor,
so that the file descriptor is automatically closed on
@ -162,6 +163,7 @@ be included in the mmap buffer of the event specified by
.IR group_fd .
.TP
.BR PERF_FLAG_PID_CGROUP " (since Linux 2.6.39)"
.\" commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25
This flag activates per-container system-wide monitoring.
A container
is an abstraction that isolates a set of resources for finer-grained
@ -293,6 +295,7 @@ This indicates a "raw" implementation-specific event in the
.IR config " field."
.TP
.BR PERF_TYPE_BREAKPOINT " (since Linux 2.6.33)"
.\" commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e
This indicates a hardware breakpoint as provided by the CPU.
Breakpoints can be read/write accesses to an address as well as
execution of an instruction address.
@ -415,6 +418,7 @@ Stalled cycles during issue.
Stalled cycles during retirement.
.TP
.BR PERF_COUNT_HW_REF_CPU_CYCLES " (since Linux 3.3)"
.\" commit c37e17497e01fc0f5d2d6feb5723b210b3ab8890
Total cycles; not affected by CPU frequency scaling.
.RE
.IP
@ -455,18 +459,21 @@ This counts the number of major page faults.
These required disk I/O to handle.
.TP
.BR PERF_COUNT_SW_ALIGNMENT_FAULTS " (since Linux 2.6.33)"
.\" commit f7d7986060b2890fc26db6ab5203efbd33aa2497
This counts the number of alignment faults.
These happen when unaligned memory accesses happen; the kernel
can handle these but it reduces performance.
This happens only on some architectures (never on x86).
.TP
.BR PERF_COUNT_SW_EMULATION_FAULTS " (since Linux 2.6.33)"
.\" commit f7d7986060b2890fc26db6ab5203efbd33aa2497
This counts the number of emulation faults.
The kernel sometimes traps on unimplemented instructions
and emulates them for user space.
This can negatively impact performance.
.TP
.BR PERF_COUNT_SW_DUMMY " (since Linux 3.12)"
.\" commit fa0097ee690693006ab1aea6c01ad3c851b65c77
This is a placeholder event that counts nothing.
Informational sample record types such as mmap or comm
must be associated with an active event.
@ -659,6 +666,7 @@ Records additional data, if applicable.
Usually returned by tracepoint events.
.TP
.BR PERF_SAMPLE_BRANCH_STACK " (since Linux 3.4)"
.\" commit bce38cd53e5ddba9cb6d708c4ef3d04a4016ec7e
This provides a record of recent branches, as provided
by CPU branch sampling hardware (such as Intel Last Branch Record).
Not all hardware supports this feature.
@ -668,25 +676,30 @@ See the
field for how to filter which branches are reported.
.TP
.BR PERF_SAMPLE_REGS_USER " (since Linux 3.7)"
.\" commit 4018994f3d8785275ef0e7391b75c3462c029e56
Records the current user-level CPU register state
(the values in the process before the kernel was called).
.TP
.BR PERF_SAMPLE_STACK_USER " (since Linux 3.7)"
.\" commit c5ebcedb566ef17bda7b02686e0d658a7bb42ee7
Records the user level stack, allowing stack unwinding.
.TP
.BR PERF_SAMPLE_WEIGHT " (since Linux 3.10)"
.\" commit c3feedf2aaf9ac8bad6f19f5d21e4ee0b4b87e9c
Records a hardware provided weight value that expresses how
costly the sampled event was.
This allows the hardware to highlight expensive events in
a profile.
.TP
.BR PERF_SAMPLE_DATA_SRC " (since Linux 3.10)"
.\" commit d6be9ad6c960f43800a6f118932bc8a5a4eadcd1
Records the data source: where in the memory hierarchy
the data associated with the sampled instruction came from.
This is only available if the underlying hardware
supports this feature.
.TP
.BR PERF_SAMPLE_IDENTIFIER " (since Linux 3.12)"
.\" commit ff3d527cebc1fa3707c617bfe9e74f53fcfb0955
Places the
.B SAMPLE_ID
value in a fixed position in the record,
@ -715,7 +728,8 @@ it means having duplicate
.B SAMPLE_ID
values in records.
.TP
.BR PERF_SAMPLE_TRANSACTION " (Since Linux 3.13)"
.BR PERF_SAMPLE_TRANSACTION " (since Linux 3.13)"
.\" commit fdfbbd07e91f8fe387140776f3fd94605f0c89e5
Records reasons for transactional memory abort events
(for example, from Intel TSX transactional memory support).
@ -1141,15 +1155,19 @@ Any return branch.
Indirect calls.
.TP
.BR PERF_SAMPLE_BRANCH_COND " (since Linux 3.16)"
.\" commit bac52139f0b7ab31330e98fd87fc5a2664951050
Conditional branches.
.TP
.BR PERF_SAMPLE_BRANCH_ABORT_TX " (since Linux 3.11)"
.\" commit 135c5612c460f89657c4698fe2ea753f6f667963
Transactional memory aborts.
.TP
.BR PERF_SAMPLE_BRANCH_IN_TX " (since Linux 3.11)"
.\" commit 135c5612c460f89657c4698fe2ea753f6f667963
Branch in transactional memory transaction.
.TP
.BR PERF_SAMPLE_BRANCH_NO_TX " (since Linux 3.11)"
.\" commit 135c5612c460f89657c4698fe2ea753f6f667963
Branch not in transactional memory transaction.
.RE
@ -1564,21 +1582,25 @@ Sample happened in user code.
.B PERF_RECORD_MISC_HYPERVISOR
Sample happened in the hypervisor.
.TP
.B PERF_RECORD_MISC_GUEST_KERNEL
.BR PERF_RECORD_MISC_GUEST_KERNEL " (since Linux2.6.35)"
.\" commit 39447b386c846bbf1c56f6403c5282837486200f
Sample happened in the guest kernel.
.TP
.B PERF_RECORD_MISC_GUEST_USER
.B PERF_RECORD_MISC_GUEST_USER " (since Linux2.6.35)"
.\" commit 39447b386c846bbf1c56f6403c5282837486200f
Sample happened in guest user code.
.RE
.RS
In addition, one of the following bits can be set:
.TP
.B PERF_RECORD_MISC_MMAP_DATA
.BR PERF_RECORD_MISC_MMAP_DATA " (since Linux 3.10)"
.\" commit 2fe85427e3bf65d791700d065132772fc26e4d75
This is set when the mapping is not executable;
otherwise the mapping is executable.
.TP
.B PERF_RECORD_MISC_COMM_EXEC
.BR PERF_RECORD_MISC_COMM_EXEC " (since Linux 3.16)"
.\" commit 82b897782d10fcc4930c9d4a15b175348fdd2871
This is set for a
.B PERF_RECORD_COMM
record on kernels more recent than Linux 3.16
@ -1597,7 +1619,8 @@ to the actual instruction that triggered the event.
See also
.IR perf_event_attr.precise_ip .
.TP
.B PERF_RECORD_MISC_EXT_RESERVED
.BR PERF_RECORD_MISC_EXT_RESERVED " (since Linux 2.6.35)"
.\" commit 1676b8a077c352085d52578fb4f29350b58b6e74
This indicates there is extended data available (currently not used).
.RE
.TP
@ -2388,11 +2411,13 @@ The argument specifies the desired file descriptor, or \-1 if
output should be ignored.
.TP
.BR PERF_EVENT_IOC_SET_FILTER " (since Linux 2.6.33)"
.\" commit 6fb2915df7f0747d9044da9dbff5b46dc2e20830
This adds an ftrace filter to this event.
The argument is a pointer to the desired ftrace filter.
.TP
.BR PERF_EVENT_IOC_ID " (since Linux 3.12)"
.\" commit cf4957f17f2a89984915ea808876d9c82225b862
This returns the event ID value for the given event file descriptor.
The argument is a pointer to a 64-bit unsigned integer