mbox series

[0/4] perf: Add new macros for mem_hops field

Message ID 20211206091749.87585-1-kjain@linux.ibm.com (mailing list archive)
Headers show
Series perf: Add new macros for mem_hops field | expand

Message

Kajol Jain Dec. 6, 2021, 9:17 a.m. UTC
Patchset adds new macros for mem_hops field which can be
used to represent remote-node, socket and board level details.

Currently the code had macro for HOPS_0, which corresponds
to data coming from another core but same node.
Add new macros for HOPS_1 to HOPS_3 to represent
remote-node, socket and board level data.

For ex: Encodings for mem_hops fields with L2 cache:

L2                      - local L2
L2 | REMOTE | HOPS_0    - remote core, same node L2
L2 | REMOTE | HOPS_1    - remote node, same socket L2
L2 | REMOTE | HOPS_2    - remote socket, same board L2
L2 | REMOTE | HOPS_3    - remote board L2

Patch 1 & 2 adds tool and kernel side changes to add new macros for
mem_hops field

Patch 3 add data source encodings for power10 and older platforms
to represent data based on newer composite  PERF_MEM_LVLNUM* fields

Patch 4 add data source encodings with proper sub_index used to
represent memory/cache level data for power10 platform.

Kajol Jain (4):
  perf: Add new macros for mem_hops field
  tools/perf: Add new macros for mem_hops field
  powerpc/perf: Add encodings to represent data based on newer composite
    PERF_MEM_LVLNUM* fields
  powerpc/perf: Add data source encodings for power10 platform

 arch/powerpc/perf/isa207-common.c     | 60 ++++++++++++++++++++-------
 include/uapi/linux/perf_event.h       |  5 ++-
 tools/include/uapi/linux/perf_event.h |  5 ++-
 tools/perf/util/mem-events.c          | 29 ++++++++-----
 4 files changed, 71 insertions(+), 28 deletions(-)

Comments

Arnaldo Carvalho de Melo Dec. 9, 2021, 7:17 p.m. UTC | #1
Em Mon, Dec 06, 2021 at 02:47:45PM +0530, Kajol Jain escreveu:
> Patchset adds new macros for mem_hops field which can be
> used to represent remote-node, socket and board level details.
> 
> Currently the code had macro for HOPS_0, which corresponds
> to data coming from another core but same node.
> Add new macros for HOPS_1 to HOPS_3 to represent
> remote-node, socket and board level data.
> 
> For ex: Encodings for mem_hops fields with L2 cache:

I checked and this hasn't hit mainstream, is it already merged on a tree
where this is slated to be submitted in the next window? If so please
let me know which one so that I can merge it on perf/core.

- Arnaldo
 
> L2                      - local L2
> L2 | REMOTE | HOPS_0    - remote core, same node L2
> L2 | REMOTE | HOPS_1    - remote node, same socket L2
> L2 | REMOTE | HOPS_2    - remote socket, same board L2
> L2 | REMOTE | HOPS_3    - remote board L2
> 
> Patch 1 & 2 adds tool and kernel side changes to add new macros for
> mem_hops field
> 
> Patch 3 add data source encodings for power10 and older platforms
> to represent data based on newer composite  PERF_MEM_LVLNUM* fields
> 
> Patch 4 add data source encodings with proper sub_index used to
> represent memory/cache level data for power10 platform.
> 
> Kajol Jain (4):
>   perf: Add new macros for mem_hops field
>   tools/perf: Add new macros for mem_hops field
>   powerpc/perf: Add encodings to represent data based on newer composite
>     PERF_MEM_LVLNUM* fields
>   powerpc/perf: Add data source encodings for power10 platform
> 
>  arch/powerpc/perf/isa207-common.c     | 60 ++++++++++++++++++++-------
>  include/uapi/linux/perf_event.h       |  5 ++-
>  tools/include/uapi/linux/perf_event.h |  5 ++-
>  tools/perf/util/mem-events.c          | 29 ++++++++-----
>  4 files changed, 71 insertions(+), 28 deletions(-)
> 
> -- 
> 2.27.0
Michael Ellerman Dec. 10, 2021, 6:35 a.m. UTC | #2
Arnaldo Carvalho de Melo <acme@kernel.org> writes:
> Em Mon, Dec 06, 2021 at 02:47:45PM +0530, Kajol Jain escreveu:
>> Patchset adds new macros for mem_hops field which can be
>> used to represent remote-node, socket and board level details.
>> 
>> Currently the code had macro for HOPS_0, which corresponds
>> to data coming from another core but same node.
>> Add new macros for HOPS_1 to HOPS_3 to represent
>> remote-node, socket and board level data.
>> 
>> For ex: Encodings for mem_hops fields with L2 cache:
>
> I checked and this hasn't hit mainstream, is it already merged on a tree
> where this is slated to be submitted in the next window? If so please
> let me know which one so that I can merge it on perf/core.

I haven't picked it up. I guess the kernel changes are mainly in
powerpc, but I'd at least need an ack from eg. Peter for the generic
perf uapi change.

Equally the whole series could go via tip.

cheers
Peter Zijlstra Dec. 10, 2021, 8:22 a.m. UTC | #3
On Fri, Dec 10, 2021 at 05:35:41PM +1100, Michael Ellerman wrote:
> Arnaldo Carvalho de Melo <acme@kernel.org> writes:
> > Em Mon, Dec 06, 2021 at 02:47:45PM +0530, Kajol Jain escreveu:
> >> Patchset adds new macros for mem_hops field which can be
> >> used to represent remote-node, socket and board level details.
> >> 
> >> Currently the code had macro for HOPS_0, which corresponds
> >> to data coming from another core but same node.
> >> Add new macros for HOPS_1 to HOPS_3 to represent
> >> remote-node, socket and board level data.
> >> 
> >> For ex: Encodings for mem_hops fields with L2 cache:
> >
> > I checked and this hasn't hit mainstream, is it already merged on a tree
> > where this is slated to be submitted in the next window? If so please
> > let me know which one so that I can merge it on perf/core.
> 
> I haven't picked it up. I guess the kernel changes are mainly in
> powerpc, but I'd at least need an ack from eg. Peter for the generic
> perf uapi change.

Done :-)
Michael Ellerman Dec. 21, 2021, 12:14 p.m. UTC | #4
On Mon, 6 Dec 2021 14:47:45 +0530, Kajol Jain wrote:
> Patchset adds new macros for mem_hops field which can be
> used to represent remote-node, socket and board level details.
> 
> Currently the code had macro for HOPS_0, which corresponds
> to data coming from another core but same node.
> Add new macros for HOPS_1 to HOPS_3 to represent
> remote-node, socket and board level data.
> 
> [...]

Patches 1, 3 and 4 applied to powerpc/next.

[1/4] perf: Add new macros for mem_hops field
      https://git.kernel.org/powerpc/c/cb1c4aba055f928ffae0c868e8dfe08eeab302e7
[3/4] powerpc/perf: Add encodings to represent data based on newer composite PERF_MEM_LVLNUM* fields
      https://git.kernel.org/powerpc/c/4a20ee106154ac1765dea97932faad29f0ba57fc
[4/4] powerpc/perf: Add data source encodings for power10 platform
      https://git.kernel.org/powerpc/c/6ed05a8efda56e5be11081954929421de19cce88

cheers