[PATCH V3 13/14] perf: aux: Add flags for the buffer format

Peter Zijlstra peterz at infradead.org
Wed Jan 27 07:51:47 EST 2021


On Wed, Jan 27, 2021 at 02:25:37PM +0530, Anshuman Khandual wrote:
> From: Suzuki K Poulose <suzuki.poulose at arm.com>
> 
> Allocate a byte for advertising the PMU specific format type
> of the given AUX record. A PMU could end up providing hardware
> trace data in multiple format in a single session.
> 
> e.g, The format of hardware buffer produced by CoreSight ETM
> PMU depends on the type of the "sink" device used for collection
> for an event (Traditional TMC-ETR/Bs with formatting or
> TRBEs without any formatting).

Acked-by: Peter Ziljstra <peterz at infradead.org>

> Signed-off-by: Suzuki K Poulose <suzuki.poulose at arm.com>
> Signed-off-by: Anshuman Khandual <anshuman.khandual at arm.com>
> ---
>  include/uapi/linux/perf_event.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index b15e344..9a5ca45 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -1105,10 +1105,11 @@ enum perf_callchain_context {
>  /**
>   * PERF_RECORD_AUX::flags bits
>   */
> -#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_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_AUX_FLAG_PMU_FORMAT_TYPE_MASK	0xff00	/* PMU specific trace format type */
>  
>  #define PERF_FLAG_FD_NO_GROUP		(1UL << 0)
>  #define PERF_FLAG_FD_OUTPUT		(1UL << 1)
> -- 
> 2.7.4
> 



More information about the linux-arm-kernel mailing list