perf_event_open.2: Clarify PERF_SAMPLE_DATA_SRC usage

When checking the fields in the PERF_SAMPLE_DATA_SRC type samples
you need to shift the masks before doing the compare.

Although the value you are checking (perf_mem_data_src) is
specified as a bitfield so this might all fall apart if trying
to access the field in a cross-endian way.  The Power people
were working on this issue, not sure if they resolved it.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Vince Weaver 2014-07-14 10:33:04 -04:00 committed by Michael Kerrisk
parent 02ca78a0c7
commit bc9d90b589
1 changed files with 10 additions and 4 deletions

View File

@ -1937,7 +1937,9 @@ Executable code
.PD
.TP
.I mem_lvl
Memory hierarchy level hit or miss, a bitwise combination of:
Memory hierarchy level hit or miss, a bitwise combination of
the following, shifted left by
.BR PERF_MEM_LVL_SHIFT :
.PD 0
.RS
@ -1987,7 +1989,8 @@ Uncached memory
.PD
.TP
.I mem_snoop
Snoop mode, a bitwise combination of:
Snoop mode, a bitwise combination of the following, shifted left by
.BR PERF_MEM_SNOOP_SHIFT :
.PD 0
.RS
@ -2010,7 +2013,8 @@ Snoop hit modified
.PD
.TP
.I mem_lock
Lock instruction, a bitwise combination of:
Lock instruction, a bitwise combination of the following, shifted left by
.BR PERF_MEM_LOCK_SHIFT :
.PD 0
.RS
@ -2024,7 +2028,9 @@ Locked transaction
.PD
.TP
.I mem_dtlb
TLB access hit or miss, a bitwise combination of:
TLB access hit or miss, a bitwise combination of the following, shifted
left by
.BR PERF_MEM_TLB_SHIFT :
.PD 0
.RS