Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614149

Re: [PATCH 08/10] perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples

From Robin Murphy <robin.murphy@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 08/10] perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples
Date 2017-03-31 18:50 +0200
Message-ID <tr7Um-76y-21@gated-at.bofh.it> (permalink)
References <t4j8d-7uS-11@gated-at.bofh.it> <t4jhV-7ym-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Will,

On 27/01/17 18:07, Will Deacon wrote:
> 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.
> 
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> ---
>  include/uapi/linux/perf_event.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index c66a485a24ac..68a4e542968e 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -885,6 +885,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_COLLISION		0x03	/* sample collided with another */

Does COLLISION really represent the combination of both TRUNCATED and
OVERWRITE, or does that want to be 0x04? (The way they get ORed together
at one point in the following patch makes me suspicious.)

Robin.

>  
>  #define PERF_FLAG_FD_NO_GROUP		(1UL << 0)
>  #define PERF_FLAG_FD_OUTPUT		(1UL << 1)
> 

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 08/10] perf/core: Add PERF_AUX_FLAG_COLLISION to report  colliding samples Robin Murphy <robin.murphy@arm.com> - 2017-03-31 18:50 +0200

csiph-web