Linux-perf-users Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] perf: correct SNOOPX field offset
@ 2020-09-21 20:46 Al Grant
  0 siblings, 0 replies; 12+ messages in thread
From: Al Grant @ 2020-09-21 20:46 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Jiri Olsa, Namhyung Kim, linux-perf-users,
	linux-kernel, Alexander Shishkin

perf_event.h has macros that define the field offsets in the
data_src bitmask in perf records. The SNOOPX and REMOTE offsets
were both 37. These are distinct fields, and the bitfield layout
in perf_mem_data_src confirms that SNOOPX should be at offset 38.

Fixes: 52839e653b5629bd ("perf tools: Add support for printing new 
mem_info encodings")
Signed-off-by: Al Grant <al.grant@foss.arm.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
---
  include/uapi/linux/perf_event.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/perf_event.h 
b/include/uapi/linux/perf_event.h
index 077e7ee69e3d..3e5dcdd48a49 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -1196,7 +1196,7 @@ union perf_mem_data_src {

  #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
  /* 1 free */
-#define PERF_MEM_SNOOPX_SHIFT  37
+#define PERF_MEM_SNOOPX_SHIFT  38

  /* locked instruction */
  #define PERF_MEM_LOCK_NA       0x01 /* not available */

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-09-01 15:58             ` Arnaldo Carvalho de Melo
@ 2020-09-01 17:34               ` Peter Zijlstra
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Zijlstra @ 2020-09-01 17:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Al Grant, Andi Kleen,
	linux-perf-users, linux-kernel

On Tue, Sep 01, 2020 at 12:58:34PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Sep 01, 2020 at 05:12:04PM +0200, peterz@infradead.org escreveu:
> > On Tue, Sep 01, 2020 at 12:06:30PM -0300, Arnaldo Carvalho de Melo wrote:
> > 
> > > Also you mixed up tools/ with include/ things, the perf part of the
> > > kernel is maintained by Ingo, PeterZ.
> > 
> > Right, it helps if the right people are on Cc.
> > 
> > > Peter, the patch is the one below, I'll collect the
> > > tools/include/uapi/linux/perf_event.h bit as it fixes the tooling,
> > > please consider taking the kernel part.
> > 
> > Al, can you resend with the right people on Cc? Also see below.
> > 
> > > ---
> > > 
> > > From:   Al Grant <al.grant@foss.arm.com>
> > > Subject: [PATCH] perf: correct SNOOPX field offset
> > > Message-ID: <9974f2d0-bf7f-518e-d9f7-4520e5ff1bb0@foss.arm.com>
> > > Date:   Mon, 24 Aug 2020 10:28:34 +0100
> > > 
> > > perf_event.h has macros that define the field offsets in the
> > > data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> > > were both 37. These are distinct fields, and the bitfield layout
> > > in perf_mem_data_src confirms that SNOOPX should be at offset 38.
> > > 
> > 
> > This needs a Fixes: tag.
> 
> He provided it in a later message, here it goes:
> 
>     Fixes: 52839e653b5629bd ("perf tools: Add support for printing new mem_info encodings")
> 
> Also Andi has provided this:
> 
>     Reviewed-by: Andi Kleen <ak@linux.intel.com>

Have him send a new and complete patch, we're not an editing service.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-09-01 15:12           ` peterz
@ 2020-09-01 15:58             ` Arnaldo Carvalho de Melo
  2020-09-01 17:34               ` Peter Zijlstra
  0 siblings, 1 reply; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-09-01 15:58 UTC (permalink / raw)
  To: peterz
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Al Grant, Andi Kleen,
	linux-perf-users, linux-kernel

Em Tue, Sep 01, 2020 at 05:12:04PM +0200, peterz@infradead.org escreveu:
> On Tue, Sep 01, 2020 at 12:06:30PM -0300, Arnaldo Carvalho de Melo wrote:
> 
> > Also you mixed up tools/ with include/ things, the perf part of the
> > kernel is maintained by Ingo, PeterZ.
> 
> Right, it helps if the right people are on Cc.
> 
> > Peter, the patch is the one below, I'll collect the
> > tools/include/uapi/linux/perf_event.h bit as it fixes the tooling,
> > please consider taking the kernel part.
> 
> Al, can you resend with the right people on Cc? Also see below.
> 
> > ---
> > 
> > From:   Al Grant <al.grant@foss.arm.com>
> > Subject: [PATCH] perf: correct SNOOPX field offset
> > Message-ID: <9974f2d0-bf7f-518e-d9f7-4520e5ff1bb0@foss.arm.com>
> > Date:   Mon, 24 Aug 2020 10:28:34 +0100
> > 
> > perf_event.h has macros that define the field offsets in the
> > data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> > were both 37. These are distinct fields, and the bitfield layout
> > in perf_mem_data_src confirms that SNOOPX should be at offset 38.
> > 
> 
> This needs a Fixes: tag.

He provided it in a later message, here it goes:

    Fixes: 52839e653b5629bd ("perf tools: Add support for printing new mem_info encodings")

Also Andi has provided this:

    Reviewed-by: Andi Kleen <ak@linux.intel.com>

- Arnaldo

 
> > Signed-off-by: Al Grant <al.grant@arm.com>
> > 
> > ---
> > 
> >   include/uapi/linux/perf_event.h       | 2 +-
> >   tools/include/uapi/linux/perf_event.h | 2 +-
> >   2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > ---
> > 
> > diff --git a/include/uapi/linux/perf_event.h 
> > b/include/uapi/linux/perf_event.h
> > index 077e7ee69e3d..3e5dcdd48a49 100644
> > --- a/include/uapi/linux/perf_event.h
> > +++ b/include/uapi/linux/perf_event.h
> > @@ -1196,7 +1196,7 @@ union perf_mem_data_src {
> > 
> >   #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
> >   /* 1 free */
> > -#define PERF_MEM_SNOOPX_SHIFT  37
> > +#define PERF_MEM_SNOOPX_SHIFT  38
> > 
> >   /* locked instruction */
> >   #define PERF_MEM_LOCK_NA       0x01 /* not available */
> > diff --git a/tools/include/uapi/linux/perf_event.h 
> > b/tools/include/uapi/linux/perf_event.h
> > index 077e7ee69e3d..3e5dcdd48a49 100644
> > --- a/tools/include/uapi/linux/perf_event.h
> > +++ b/tools/include/uapi/linux/perf_event.h
> > @@ -1196,7 +1196,7 @@ union perf_mem_data_src {
> > 
> >   #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
> >   /* 1 free */
> > -#define PERF_MEM_SNOOPX_SHIFT  37
> > +#define PERF_MEM_SNOOPX_SHIFT  38
> > 
> >   /* locked instruction */
> >   #define PERF_MEM_LOCK_NA       0x01 /* not available */

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-09-01 15:06         ` Arnaldo Carvalho de Melo
@ 2020-09-01 15:12           ` peterz
  2020-09-01 15:58             ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 12+ messages in thread
From: peterz @ 2020-09-01 15:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, Al Grant, Arnaldo Carvalho de Melo, Andi Kleen,
	linux-perf-users, linux-kernel

On Tue, Sep 01, 2020 at 12:06:30PM -0300, Arnaldo Carvalho de Melo wrote:

> Also you mixed up tools/ with include/ things, the perf part of the
> kernel is maintained by Ingo, PeterZ.

Right, it helps if the right people are on Cc.

> Peter, the patch is the one below, I'll collect the
> tools/include/uapi/linux/perf_event.h bit as it fixes the tooling,
> please consider taking the kernel part.

Al, can you resend with the right people on Cc? Also see below.

> ---
> 
> From:   Al Grant <al.grant@foss.arm.com>
> Subject: [PATCH] perf: correct SNOOPX field offset
> Message-ID: <9974f2d0-bf7f-518e-d9f7-4520e5ff1bb0@foss.arm.com>
> Date:   Mon, 24 Aug 2020 10:28:34 +0100
> 
> perf_event.h has macros that define the field offsets in the
> data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> were both 37. These are distinct fields, and the bitfield layout
> in perf_mem_data_src confirms that SNOOPX should be at offset 38.
> 

This needs a Fixes: tag.

> Signed-off-by: Al Grant <al.grant@arm.com>
> 
> ---
> 
>   include/uapi/linux/perf_event.h       | 2 +-
>   tools/include/uapi/linux/perf_event.h | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> ---
> 
> diff --git a/include/uapi/linux/perf_event.h 
> b/include/uapi/linux/perf_event.h
> index 077e7ee69e3d..3e5dcdd48a49 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -1196,7 +1196,7 @@ union perf_mem_data_src {
> 
>   #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
>   /* 1 free */
> -#define PERF_MEM_SNOOPX_SHIFT  37
> +#define PERF_MEM_SNOOPX_SHIFT  38
> 
>   /* locked instruction */
>   #define PERF_MEM_LOCK_NA       0x01 /* not available */
> diff --git a/tools/include/uapi/linux/perf_event.h 
> b/tools/include/uapi/linux/perf_event.h
> index 077e7ee69e3d..3e5dcdd48a49 100644
> --- a/tools/include/uapi/linux/perf_event.h
> +++ b/tools/include/uapi/linux/perf_event.h
> @@ -1196,7 +1196,7 @@ union perf_mem_data_src {
> 
>   #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
>   /* 1 free */
> -#define PERF_MEM_SNOOPX_SHIFT  37
> +#define PERF_MEM_SNOOPX_SHIFT  38
> 
>   /* locked instruction */
>   #define PERF_MEM_LOCK_NA       0x01 /* not available */

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-09-01 15:02       ` Arnaldo Carvalho de Melo
  2020-09-01 15:05         ` Al Grant
@ 2020-09-01 15:06         ` Arnaldo Carvalho de Melo
  2020-09-01 15:12           ` peterz
  1 sibling, 1 reply; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-09-01 15:06 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Al Grant
  Cc: Arnaldo Carvalho de Melo, Andi Kleen, linux-perf-users, linux-kernel

Em Tue, Sep 01, 2020 at 12:02:25PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Aug 26, 2020 at 03:33:35PM +0100, Al Grant escreveu:
> > On 26/08/2020 15:26, Arnaldo Carvalho de Melo wrote:
> > > Em Tue, Aug 25, 2020 at 10:40:43AM -0700, Andi Kleen escreveu:
> > > > On Mon, Aug 24, 2020 at 10:28:34AM +0100, Al Grant wrote:
> > > > > perf_event.h has macros that define the field offsets in the
> > > > > data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> > > > > were both 37. These are distinct fields, and the bitfield layout
> > > > > in perf_mem_data_src confirms that SNOOPX should be at offset 38.
> > > > 
> > > > Looks good.
> > > > 
> > > > Reviewed-by: Andi Kleen <ak@linux.intel.com>
> > > > 
> > > > Probably should have a Fixes: header
> > > 
> > > Please do so, find the patch that introduced the error, add the Fixes
> > > tag, will help me not having to do it myself :-)
> > 
> > Fixes: 52839e653b562 ("perf tools: Add support for printing new mem_info
> > encodings")
> 
> Ok, I'll add that, thanks.
> 
> But you forgot to add your Signed-off-by:, can you please provide it?
> 
> There was also a minor problem in the patch, there was no separation of
> --- from the patch comment section to the patch itself, I'll fix that as
> well.

Also you mixed up tools/ with include/ things, the perf part of the
kernel is maintained by Ingo, PeterZ.

Peter, the patch is the one below, I'll collect the
tools/include/uapi/linux/perf_event.h bit as it fixes the tooling,
please consider taking the kernel part.

Thanks,

- Arnaldo

---

From:   Al Grant <al.grant@foss.arm.com>
Subject: [PATCH] perf: correct SNOOPX field offset
Message-ID: <9974f2d0-bf7f-518e-d9f7-4520e5ff1bb0@foss.arm.com>
Date:   Mon, 24 Aug 2020 10:28:34 +0100

perf_event.h has macros that define the field offsets in the
data_src bitmask in perf records. The SNOOPX and REMOTE offsets
were both 37. These are distinct fields, and the bitfield layout
in perf_mem_data_src confirms that SNOOPX should be at offset 38.

Signed-off-by: Al Grant <al.grant@arm.com>

---

  include/uapi/linux/perf_event.h       | 2 +-
  tools/include/uapi/linux/perf_event.h | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/include/uapi/linux/perf_event.h 
b/include/uapi/linux/perf_event.h
index 077e7ee69e3d..3e5dcdd48a49 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -1196,7 +1196,7 @@ union perf_mem_data_src {

  #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
  /* 1 free */
-#define PERF_MEM_SNOOPX_SHIFT  37
+#define PERF_MEM_SNOOPX_SHIFT  38

  /* locked instruction */
  #define PERF_MEM_LOCK_NA       0x01 /* not available */
diff --git a/tools/include/uapi/linux/perf_event.h 
b/tools/include/uapi/linux/perf_event.h
index 077e7ee69e3d..3e5dcdd48a49 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -1196,7 +1196,7 @@ union perf_mem_data_src {

  #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
  /* 1 free */
-#define PERF_MEM_SNOOPX_SHIFT  37
+#define PERF_MEM_SNOOPX_SHIFT  38

  /* locked instruction */
  #define PERF_MEM_LOCK_NA       0x01 /* not available */

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-09-01 15:02       ` Arnaldo Carvalho de Melo
@ 2020-09-01 15:05         ` Al Grant
  2020-09-01 15:06         ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 12+ messages in thread
From: Al Grant @ 2020-09-01 15:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Arnaldo Carvalho de Melo, Andi Kleen, linux-perf-users, linux-kernel



On 01/09/2020 16:02, Arnaldo Carvalho de Melo wrote:
> Em Wed, Aug 26, 2020 at 03:33:35PM +0100, Al Grant escreveu:
>> On 26/08/2020 15:26, Arnaldo Carvalho de Melo wrote:
>>> Em Tue, Aug 25, 2020 at 10:40:43AM -0700, Andi Kleen escreveu:
>>>> On Mon, Aug 24, 2020 at 10:28:34AM +0100, Al Grant wrote:
>>>>> perf_event.h has macros that define the field offsets in the
>>>>> data_src bitmask in perf records. The SNOOPX and REMOTE offsets
>>>>> were both 37. These are distinct fields, and the bitfield layout
>>>>> in perf_mem_data_src confirms that SNOOPX should be at offset 38.
>>>>
>>>> Looks good.
>>>>
>>>> Reviewed-by: Andi Kleen <ak@linux.intel.com>
>>>>
>>>> Probably should have a Fixes: header
>>>
>>> Please do so, find the patch that introduced the error, add the Fixes
>>> tag, will help me not having to do it myself :-)
>>
>> Fixes: 52839e653b562 ("perf tools: Add support for printing new mem_info
>> encodings")
> 
> Ok, I'll add that, thanks.
>  > But you forgot to add your Signed-off-by:, can you please provide it?

Signed-off-by: Al Grant <al.grant@arm.com>

> There was also a minor problem in the patch, there was no separation of
> --- from the patch comment section to the patch itself, I'll fix that as
> well.

Thanks, will remember for next time.

Al

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-08-26 14:33     ` Al Grant
@ 2020-09-01 15:02       ` Arnaldo Carvalho de Melo
  2020-09-01 15:05         ` Al Grant
  2020-09-01 15:06         ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-09-01 15:02 UTC (permalink / raw)
  To: Al Grant
  Cc: Arnaldo Carvalho de Melo, Andi Kleen, linux-perf-users, linux-kernel

Em Wed, Aug 26, 2020 at 03:33:35PM +0100, Al Grant escreveu:
> On 26/08/2020 15:26, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Aug 25, 2020 at 10:40:43AM -0700, Andi Kleen escreveu:
> > > On Mon, Aug 24, 2020 at 10:28:34AM +0100, Al Grant wrote:
> > > > perf_event.h has macros that define the field offsets in the
> > > > data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> > > > were both 37. These are distinct fields, and the bitfield layout
> > > > in perf_mem_data_src confirms that SNOOPX should be at offset 38.
> > > 
> > > Looks good.
> > > 
> > > Reviewed-by: Andi Kleen <ak@linux.intel.com>
> > > 
> > > Probably should have a Fixes: header
> > 
> > Please do so, find the patch that introduced the error, add the Fixes
> > tag, will help me not having to do it myself :-)
> 
> Fixes: 52839e653b562 ("perf tools: Add support for printing new mem_info
> encodings")

Ok, I'll add that, thanks.

But you forgot to add your Signed-off-by:, can you please provide it?

There was also a minor problem in the patch, there was no separation of
--- from the patch comment section to the patch itself, I'll fix that as
well.

- Arnaldo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-08-26 14:26   ` Arnaldo Carvalho de Melo
@ 2020-08-26 14:33     ` Al Grant
  2020-09-01 15:02       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 12+ messages in thread
From: Al Grant @ 2020-08-26 14:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Andi Kleen; +Cc: linux-perf-users, linux-kernel, acme

On 26/08/2020 15:26, Arnaldo Carvalho de Melo wrote:
> Em Tue, Aug 25, 2020 at 10:40:43AM -0700, Andi Kleen escreveu:
>> On Mon, Aug 24, 2020 at 10:28:34AM +0100, Al Grant wrote:
>>> perf_event.h has macros that define the field offsets in the
>>> data_src bitmask in perf records. The SNOOPX and REMOTE offsets
>>> were both 37. These are distinct fields, and the bitfield layout
>>> in perf_mem_data_src confirms that SNOOPX should be at offset 38.
>>
>> Looks good.
>>
>> Reviewed-by: Andi Kleen <ak@linux.intel.com>
>>
>> Probably should have a Fixes: header
> 
> Please do so, find the patch that introduced the error, add the Fixes
> tag, will help me not having to do it myself :-)

Fixes: 52839e653b562 ("perf tools: Add support for printing new mem_info 
encodings")

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-08-25 17:40 ` Andi Kleen
@ 2020-08-26 14:26   ` Arnaldo Carvalho de Melo
  2020-08-26 14:33     ` Al Grant
  0 siblings, 1 reply; 12+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-08-26 14:26 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Al Grant, linux-perf-users, linux-kernel, acme

Em Tue, Aug 25, 2020 at 10:40:43AM -0700, Andi Kleen escreveu:
> On Mon, Aug 24, 2020 at 10:28:34AM +0100, Al Grant wrote:
> > perf_event.h has macros that define the field offsets in the
> > data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> > were both 37. These are distinct fields, and the bitfield layout
> > in perf_mem_data_src confirms that SNOOPX should be at offset 38.
> 
> Looks good.
> 
> Reviewed-by: Andi Kleen <ak@linux.intel.com>
> 
> Probably should have a Fixes: header

Please do so, find the patch that introduced the error, add the Fixes
tag, will help me not having to do it myself :-)

- Arnaldo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-08-24  9:28 Al Grant
  2020-08-25 17:40 ` Andi Kleen
@ 2020-08-26 11:24 ` Mark Rutland
  1 sibling, 0 replies; 12+ messages in thread
From: Mark Rutland @ 2020-08-26 11:24 UTC (permalink / raw)
  To: Al Grant
  Cc: linux-perf-users, linux-kernel, ak, acme, Peter Zijlstra,
	Ingo Molnar, Alexander Shishkin, Jiri Olsa, Namhyung Kim

Hi,

[ adding the kernel-side perf maintainers ]

Please note that scripts/get_maintainer.pl can help to find relevant
maintainers.

On Mon, Aug 24, 2020 at 10:28:34AM +0100, Al Grant wrote:
> perf_event.h has macros that define the field offsets in the
> data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> were both 37. These are distinct fields, and the bitfield layout
> in perf_mem_data_src confirms that SNOOPX should be at offset 38.
>
> From: Al Grant <al.grant@arm.com>

This needs a Signed-off-by line from you. See:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

The patch itself looks right to me, so provided you add an S-o-B line:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark

> 
>  include/uapi/linux/perf_event.h       | 2 +-
>  tools/include/uapi/linux/perf_event.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/perf_event.h
> b/include/uapi/linux/perf_event.h
> index 077e7ee69e3d..3e5dcdd48a49 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -1196,7 +1196,7 @@ union perf_mem_data_src {
> 
>  #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
>  /* 1 free */
> -#define PERF_MEM_SNOOPX_SHIFT  37
> +#define PERF_MEM_SNOOPX_SHIFT  38
> 
>  /* locked instruction */
>  #define PERF_MEM_LOCK_NA       0x01 /* not available */
> diff --git a/tools/include/uapi/linux/perf_event.h
> b/tools/include/uapi/linux/perf_event.h
> index 077e7ee69e3d..3e5dcdd48a49 100644
> --- a/tools/include/uapi/linux/perf_event.h
> +++ b/tools/include/uapi/linux/perf_event.h
> @@ -1196,7 +1196,7 @@ union perf_mem_data_src {
> 
>  #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
>  /* 1 free */
> -#define PERF_MEM_SNOOPX_SHIFT  37
> +#define PERF_MEM_SNOOPX_SHIFT  38
> 
>  /* locked instruction */
>  #define PERF_MEM_LOCK_NA       0x01 /* not available */

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] perf: correct SNOOPX field offset
  2020-08-24  9:28 Al Grant
@ 2020-08-25 17:40 ` Andi Kleen
  2020-08-26 14:26   ` Arnaldo Carvalho de Melo
  2020-08-26 11:24 ` Mark Rutland
  1 sibling, 1 reply; 12+ messages in thread
From: Andi Kleen @ 2020-08-25 17:40 UTC (permalink / raw)
  To: Al Grant; +Cc: linux-perf-users, linux-kernel, acme

On Mon, Aug 24, 2020 at 10:28:34AM +0100, Al Grant wrote:
> perf_event.h has macros that define the field offsets in the
> data_src bitmask in perf records. The SNOOPX and REMOTE offsets
> were both 37. These are distinct fields, and the bitfield layout
> in perf_mem_data_src confirms that SNOOPX should be at offset 38.

Looks good.

Reviewed-by: Andi Kleen <ak@linux.intel.com>

Probably should have a Fixes: header

-Andi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] perf: correct SNOOPX field offset
@ 2020-08-24  9:28 Al Grant
  2020-08-25 17:40 ` Andi Kleen
  2020-08-26 11:24 ` Mark Rutland
  0 siblings, 2 replies; 12+ messages in thread
From: Al Grant @ 2020-08-24  9:28 UTC (permalink / raw)
  To: linux-perf-users, linux-kernel, ak, acme

perf_event.h has macros that define the field offsets in the
data_src bitmask in perf records. The SNOOPX and REMOTE offsets
were both 37. These are distinct fields, and the bitfield layout
in perf_mem_data_src confirms that SNOOPX should be at offset 38.

From: Al Grant <al.grant@arm.com>

  include/uapi/linux/perf_event.h       | 2 +-
  tools/include/uapi/linux/perf_event.h | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/perf_event.h 
b/include/uapi/linux/perf_event.h
index 077e7ee69e3d..3e5dcdd48a49 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -1196,7 +1196,7 @@ union perf_mem_data_src {

  #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
  /* 1 free */
-#define PERF_MEM_SNOOPX_SHIFT  37
+#define PERF_MEM_SNOOPX_SHIFT  38

  /* locked instruction */
  #define PERF_MEM_LOCK_NA       0x01 /* not available */
diff --git a/tools/include/uapi/linux/perf_event.h 
b/tools/include/uapi/linux/perf_event.h
index 077e7ee69e3d..3e5dcdd48a49 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -1196,7 +1196,7 @@ union perf_mem_data_src {

  #define PERF_MEM_SNOOPX_FWD    0x01 /* forward */
  /* 1 free */
-#define PERF_MEM_SNOOPX_SHIFT  37
+#define PERF_MEM_SNOOPX_SHIFT  38

  /* locked instruction */
  #define PERF_MEM_LOCK_NA       0x01 /* not available */

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 20:46 [PATCH] perf: correct SNOOPX field offset Al Grant
  -- strict thread matches above, loose matches on Subject: below --
2020-08-24  9:28 Al Grant
2020-08-25 17:40 ` Andi Kleen
2020-08-26 14:26   ` Arnaldo Carvalho de Melo
2020-08-26 14:33     ` Al Grant
2020-09-01 15:02       ` Arnaldo Carvalho de Melo
2020-09-01 15:05         ` Al Grant
2020-09-01 15:06         ` Arnaldo Carvalho de Melo
2020-09-01 15:12           ` peterz
2020-09-01 15:58             ` Arnaldo Carvalho de Melo
2020-09-01 17:34               ` Peter Zijlstra
2020-08-26 11:24 ` Mark Rutland

Linux-perf-users Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-perf-users/0 linux-perf-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-perf-users linux-perf-users/ https://lore.kernel.org/linux-perf-users \
		linux-perf-users@vger.kernel.org
	public-inbox-index linux-perf-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-perf-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git