perf_event_open.2: Reorder text describing fields of 'perf_event_header' structure

Place the fields with the shorter descriptions first, to make the
information easier to read.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2013-09-13 08:59:43 +02:00
parent 2b538c3e53
commit 4047bc6cfb
1 changed files with 57 additions and 56 deletions

View File

@ -1302,7 +1302,7 @@ an event took place (TID, TIME, ID, CPU, STREAM_ID) described in
below, it will be stashed just after the
.I perf_event_header
and the fields already present for the existing
fields, i.e., at the end of the payload.
fields, that is, at the end of the payload.
That way a newer perf.data
file will be supported by older perf tools, with these new optional
fields being ignored.
@ -1322,6 +1322,60 @@ struct perf_event_header {
Below, we describe the
.I perf_event_header
fields in more detail.
For ease of reading,
the fields with shorter descriptions are presented first.
.TP
.I size
This indicates the size of the record.
.TP
.I misc
The
.I misc
field contains additional information about the sample.
The CPU mode can be determined from this value by masking with
.B PERF_RECORD_MISC_CPUMODE_MASK
and looking for one of the following (note these are not
bit masks, only one can be set at a time):
.RS
.TP
.B PERF_RECORD_MISC_CPUMODE_UNKNOWN
Unknown CPU mode.
.TP
.B PERF_RECORD_MISC_KERNEL
Sample happened in the kernel.
.TP
.B PERF_RECORD_MISC_USER
Sample happened in user code.
.TP
.B PERF_RECORD_MISC_HYPERVISOR
Sample happened in the hypervisor.
.TP
.B PERF_RECORD_MISC_GUEST_KERNEL
Sample happened in the guest kernel.
.TP
.B PERF_RECORD_MISC_GUEST_USER
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
This is set when the mapping is not executable;
otherwise the mapping is executable.
.TP
.B PERF_RECORD_MISC_EXACT_IP
This indicates that the content of
.B PERF_SAMPLE_IP
points
to the actual instruction that triggered the event.
See also
.IR perf_event_attr.precise_ip .
.TP
.B PERF_RECORD_MISC_EXT_RESERVED
This indicates there is extended data available (currently not used).
.RE
.TP
.I type
The
@ -1475,8 +1529,8 @@ struct {
u64 data_src; /* if PERF_SAMPLE_DATA_SRC */
};
.fi
.RS
.TP
.RS 4
.TP 4
.I ip
If
.B PERF_SAMPLE_IP
@ -1802,59 +1856,6 @@ OS fault handler
.RE
.RE
.RE
.IP
.TP
.I misc
The
.I misc
field contains additional information about the sample.
The CPU mode can be determined from this value by masking with
.B PERF_RECORD_MISC_CPUMODE_MASK
and looking for one of the following (note these are not
bit masks, only one can be set at a time):
.RS
.TP
.B PERF_RECORD_MISC_CPUMODE_UNKNOWN
Unknown CPU mode.
.TP
.B PERF_RECORD_MISC_KERNEL
Sample happened in the kernel.
.TP
.B PERF_RECORD_MISC_USER
Sample happened in user code.
.TP
.B PERF_RECORD_MISC_HYPERVISOR
Sample happened in the hypervisor.
.TP
.B PERF_RECORD_MISC_GUEST_KERNEL
Sample happened in the guest kernel.
.TP
.B PERF_RECORD_MISC_GUEST_USER
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
This is set when the mapping is not executable;
otherwise the mapping is executable.
.TP
.B PERF_RECORD_MISC_EXACT_IP
This indicates that the content of
.B PERF_SAMPLE_IP
points
to the actual instruction that triggered the event.
See also
.IR perf_event_attr.precise_ip .
.TP
.B PERF_RECORD_MISC_EXT_RESERVED
This indicates there is extended data available (currently not used).
.RE
.TP
.I size
This indicates the size of the record.
.RE
.SS Signal overflow
Events can be set to deliver a signal when a threshold is crossed.