]> git.baikalelectronics.ru Git - kernel.git/commit
s390/cpum_sf: Add flag to process full SDBs only
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Fri, 13 Dec 2013 11:45:01 +0000 (12:45 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Dec 2013 13:38:01 +0000 (14:38 +0100)
commit982fe8ed2159973dcd0d48efc500ae16158e4e92
tree8e5c54f2de4462a8600037f7563930acf5260bcf
parent9d67b4dac0e26c8b418383c62318b7f8d726f0c0
s390/cpum_sf: Add flag to process full SDBs only

Add the PERF_CPUM_SF_FULL_BLOCKS flag to process only sample-data-blocks that
have the block-full-indicator bit set.  Sample-data-blocks that are partially
filled are discarded.  Use this flag if the sampling buffer is likely to be
shared among perf events that use different sampling modes.  In such
environments, flushing sample-data-blocks that are not completely filled, might
cause invalid-data-formats.

Setting PERF_CPUM_SF_FULL_BLOCKS prevents potentially invalid sampling data to
be processed but, in contrast, also discards valid samples in partially filled
sample-data-blocks.  Note that sample-data-blocks might not become full for
small sampling frequencies or for workload that is scheduled for tiny intervals.

To sample with the PERF_CPUM_SF_FULL_BLOCKS flag, set the perf->attr.config1
to 0x0004.  For example:

perf record -e cpum_sf/config=0xB000,config1=0x0004/

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/perf_event.h
arch/s390/kernel/perf_cpum_sf.c