]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples
authorWill Deacon <will.deacon@arm.com>
Fri, 23 Sep 2016 13:05:12 +0000 (14:05 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 18 Oct 2017 11:53:31 +0000 (12:53 +0100)
The ARM SPE architecture permits an implementation to ignore a sample
if the sample is due to be taken whilst another sample is already being
produced. In this case, it is desirable to report the collision to
userspace, as they may want to lower the sample period.

This patch adds a PERF_AUX_FLAG_COLLISION flag, so that such events can
be relayed to userspace.

Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
include/uapi/linux/perf_event.h

index 140ae638cfd618b931ec1d298a80d1dffa4c1680..7ca1b22ea41790b45cd578eedd73faa054b5a868 100644 (file)
@@ -941,6 +941,7 @@ enum perf_callchain_context {
 #define PERF_AUX_FLAG_TRUNCATED                0x01    /* record was truncated to fit */
 #define PERF_AUX_FLAG_OVERWRITE                0x02    /* snapshot from overwrite mode */
 #define PERF_AUX_FLAG_PARTIAL          0x04    /* record contains gaps */
+#define PERF_AUX_FLAG_COLLISION                0x08    /* sample collided with another */
 
 #define PERF_FLAG_FD_NO_GROUP          (1UL << 0)
 #define PERF_FLAG_FD_OUTPUT            (1UL << 1)