[v5,1/2] perf tools: Sync perf_event_attr::config3 addition

Message ID 20220914-arm-perf-tool-spe1-2-v2-v5-1-2cf5210b2f77@kernel.org
State New
Headers
Series perf tool: 'config3' attribute support |

Commit Message

Rob Herring Feb. 17, 2023, 10:32 p.m. UTC
  Arm SPEv1.2 adds another 64-bits of event filtering control. As the
existing perf_event_attr::configN fields are all used up for SPE PMU, an
additional field is needed. Add a new 'config3' field.

Signed-off-by: Rob Herring <robh@kernel.org>
---
This matches commit 09519ec3b19e ("perf: Add perf_event_attr::config3")
for the kernel queued in linux-next.
---
 tools/include/uapi/linux/perf_event.h | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Arnaldo Carvalho de Melo Feb. 18, 2023, 1:21 p.m. UTC | #1
Em Fri, Feb 17, 2023 at 04:32:10PM -0600, Rob Herring escreveu:
> Arm SPEv1.2 adds another 64-bits of event filtering control. As the
> existing perf_event_attr::configN fields are all used up for SPE PMU, an
> additional field is needed. Add a new 'config3' field.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> This matches commit 09519ec3b19e ("perf: Add perf_event_attr::config3")
> for the kernel queued in linux-next.

When you mention linux-next where was it that it picked this from?

For me to get this merged into the perf tools "next" (perf/core) it must
already have been merged in the kernel counterpart (tip/perf/core).

Ok so it is not in tip/perf/core, but got in next yesterday, and PeterZ
acked it, good, will process it soon.

- Arnaldo

⬢[acme@toolbox perf]$ git show 09519ec3b19e
commit 09519ec3b19e4144b5f6e269c54fbb9c294a9fcb
Author: Rob Herring <robh@kernel.org>
Date:   Mon Jan 9 13:26:23 2023 -0600

    perf: Add perf_event_attr::config3

    Arm SPEv1.2 adds another 64-bits of event filtering control. As the
    existing perf_event_attr::configN fields are all used up for SPE PMU, an
    additional field is needed. Add a new 'config3' field.

    Tested-by: James Clark <james.clark@arm.com>
    Signed-off-by: Rob Herring <robh@kernel.org>
    Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-7-327f860daf28@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>

diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index ccb7f5dad59be96b..37675437b76860ae 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -374,6 +374,7 @@ enum perf_event_read_format {
 #define PERF_ATTR_SIZE_VER5    112     /* add: aux_watermark */
 #define PERF_ATTR_SIZE_VER6    120     /* add: aux_sample_size */
 #define PERF_ATTR_SIZE_VER7    128     /* add: sig_data */
+#define PERF_ATTR_SIZE_VER8    136     /* add: config3 */

 /*
  * Hardware event_id to monitor via a performance monitoring event:
@@ -515,6 +516,8 @@ struct perf_event_attr {
         * truncated accordingly on 32 bit architectures.
         */
        __u64   sig_data;
+
+       __u64   config3; /* extension of config2 */
 };

 /*
⬢[acme@toolbox perf]$
⬢[acme@toolbox perf]$
⬢[acme@toolbox perf]$
⬢[acme@toolbox perf]$
⬢[acme@toolbox perf]$ git tag --contains 09519ec3b19e4144b5f6e269c54fbb9c294a9fcb
next-20230217
⬢[acme@toolbox perf]$


> ---
>  tools/include/uapi/linux/perf_event.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
> index ea6defacc1a7..a38814ce9485 100644
> --- a/tools/include/uapi/linux/perf_event.h
> +++ b/tools/include/uapi/linux/perf_event.h
> @@ -365,6 +365,7 @@ enum perf_event_read_format {
>  #define PERF_ATTR_SIZE_VER5	112	/* add: aux_watermark */
>  #define PERF_ATTR_SIZE_VER6	120	/* add: aux_sample_size */
>  #define PERF_ATTR_SIZE_VER7	128	/* add: sig_data */
> +#define PERF_ATTR_SIZE_VER8	136	/* add: config3 */
>  
>  /*
>   * Hardware event_id to monitor via a performance monitoring event:
> @@ -506,6 +507,8 @@ struct perf_event_attr {
>  	 * truncated accordingly on 32 bit architectures.
>  	 */
>  	__u64	sig_data;
> +
> +	__u64	config3; /* extension of config2 */
>  };
>  
>  /*
> 
> -- 
> 2.39.1
>
  
kajoljain Feb. 23, 2023, 2:23 p.m. UTC | #2
On 2/18/23 04:02, Rob Herring wrote:
> Arm SPEv1.2 adds another 64-bits of event filtering control. As the
> existing perf_event_attr::configN fields are all used up for SPE PMU, an
> additional field is needed. Add a new 'config3' field.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> This matches commit 09519ec3b19e ("perf: Add perf_event_attr::config3")
> for the kernel queued in linux-next.
> ---
>  tools/include/uapi/linux/perf_event.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
> index ea6defacc1a7..a38814ce9485 100644
> --- a/tools/include/uapi/linux/perf_event.h
> +++ b/tools/include/uapi/linux/perf_event.h
> @@ -365,6 +365,7 @@ enum perf_event_read_format {
>  #define PERF_ATTR_SIZE_VER5	112	/* add: aux_watermark */
>  #define PERF_ATTR_SIZE_VER6	120	/* add: aux_sample_size */
>  #define PERF_ATTR_SIZE_VER7	128	/* add: sig_data */
> +#define PERF_ATTR_SIZE_VER8	136	/* add: config3 */
>  
>  /*
>   * Hardware event_id to monitor via a performance monitoring event:
> @@ -506,6 +507,8 @@ struct perf_event_attr {
>  	 * truncated accordingly on 32 bit architectures.
>  	 */
>  	__u64	sig_data;
> +
> +	__u64	config3; /* extension of config2 */

Patch looks fine to me.

Reviewed-by: Kajol Jain <kjain@linux.ibm.com>

Thanks,
Kajol Jain
>  };
>  
>  /*
>
  
Rob Herring March 20, 2023, 6:21 p.m. UTC | #3
On Sat, Feb 18, 2023 at 7:21 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Fri, Feb 17, 2023 at 04:32:10PM -0600, Rob Herring escreveu:
> > Arm SPEv1.2 adds another 64-bits of event filtering control. As the
> > existing perf_event_attr::configN fields are all used up for SPE PMU, an
> > additional field is needed. Add a new 'config3' field.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > This matches commit 09519ec3b19e ("perf: Add perf_event_attr::config3")
> > for the kernel queued in linux-next.
>
> When you mention linux-next where was it that it picked this from?
>
> For me to get this merged into the perf tools "next" (perf/core) it must
> already have been merged in the kernel counterpart (tip/perf/core).
>
> Ok so it is not in tip/perf/core, but got in next yesterday, and PeterZ
> acked it, good, will process it soon.

Hi Arnaldo, Are you going to apply this or are you expecting something from me?

Rob
  
Arnaldo Carvalho de Melo March 21, 2023, 12:43 p.m. UTC | #4
Em Mon, Mar 20, 2023 at 01:21:10PM -0500, Rob Herring escreveu:
> On Sat, Feb 18, 2023 at 7:21 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > Em Fri, Feb 17, 2023 at 04:32:10PM -0600, Rob Herring escreveu:
> > > Arm SPEv1.2 adds another 64-bits of event filtering control. As the
> > > existing perf_event_attr::configN fields are all used up for SPE PMU, an
> > > additional field is needed. Add a new 'config3' field.
> > >
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > > This matches commit 09519ec3b19e ("perf: Add perf_event_attr::config3")
> > > for the kernel queued in linux-next.
> >
> > When you mention linux-next where was it that it picked this from?
> >
> > For me to get this merged into the perf tools "next" (perf/core) it must
> > already have been merged in the kernel counterpart (tip/perf/core).
> >
> > Ok so it is not in tip/perf/core, but got in next yesterday, and PeterZ
> > acked it, good, will process it soon.
> 
> Hi Arnaldo, Are you going to apply this or are you expecting something from me?

Sorry for the delay, applied.

- Arnaldo
  

Patch

diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index ea6defacc1a7..a38814ce9485 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -365,6 +365,7 @@  enum perf_event_read_format {
 #define PERF_ATTR_SIZE_VER5	112	/* add: aux_watermark */
 #define PERF_ATTR_SIZE_VER6	120	/* add: aux_sample_size */
 #define PERF_ATTR_SIZE_VER7	128	/* add: sig_data */
+#define PERF_ATTR_SIZE_VER8	136	/* add: config3 */
 
 /*
  * Hardware event_id to monitor via a performance monitoring event:
@@ -506,6 +507,8 @@  struct perf_event_attr {
 	 * truncated accordingly on 32 bit architectures.
 	 */
 	__u64	sig_data;
+
+	__u64	config3; /* extension of config2 */
 };
 
 /*