All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: James Clark <james.clark@arm.com>,
	linux-perf-users@vger.kernel.org,
	John Garry <john.garry@huawei.com>,
	linux-kernel@vger.kernel.org, namhyung@kernel.org,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH v6 00/12] perf tools: fix perf stat with large socket IDs
Date: Thu, 24 Dec 2020 09:30:38 -0300	[thread overview]
Message-ID: <20201224123038.GC477817@kernel.org> (raw)
In-Reply-To: <20201223221747.GB236568@krava>

Em Wed, Dec 23, 2020 at 11:17:47PM +0100, Jiri Olsa escreveu:
> On Fri, Dec 04, 2020 at 11:48:36AM +0000, John Garry wrote:
> > On 03/12/2020 15:39, Jiri Olsa wrote:
> > 
> > +
> > 
> > > On Thu, Nov 26, 2020 at 04:13:16PM +0200, James Clark wrote:
> > > > Changes since v5:
> > > >    * Fix test for cpu_map__get_die() by shifting id before testing.
> > > >    * Fix test for cpu_map__get_socket() by not using cpu_map__id_to_socket()
> > > >      which is only valid in CPU aggregation mode.
> > > > 
> > > > James Clark (12):
> > > >    perf tools: Improve topology test
> > > >    perf tools: Use allocator for perf_cpu_map
> > > >    perf tools: Add new struct for cpu aggregation
> > > >    perf tools: Replace aggregation ID with a struct
> > > >    perf tools: add new map type for aggregation
> > > >    perf tools: drop in cpu_aggr_map struct
> > > >    perf tools: Start using cpu_aggr_id in map
> > > >    perf tools: Add separate node member
> > > >    perf tools: Add separate socket member
> > > >    perf tools: Add separate die member
> > > >    perf tools: Add separate core member
> > > >    perf tools: Add separate thread member
> > > 
> > > Acked-by: Jiri Olsa <jolsa@redhat.com>
> > > 
> > 
> > Tested-by: John Garry <john.garry@huawei.com>
> 
> hi,
> I was wondering where this went, and noticed that
> Arnaldo was not CC-ed on the cover letter ;-)

Looking at it right now, used the Message-ID and b4 got everything,
there are some fuzzies that I'm checking:

[acme@five perf]$ git am --show-current-patch=diff | patch -p1
patching file tools/perf/builtin-stat.c
Hunk #1 succeeded at 1186 (offset -2 lines).
Hunk #2 succeeded at 1347 (offset -2 lines).
Hunk #3 succeeded at 1373 (offset -2 lines).
Hunk #4 succeeded at 1399 (offset -2 lines).
Hunk #5 succeeded at 1448 (offset -2 lines).
patching file tools/perf/tests/topology.c
patching file tools/perf/util/cpumap.c
patching file tools/perf/util/cpumap.h
patching file tools/perf/util/stat-display.c
Hunk #8 succeeded at 326 with fuzz 2 (offset -3 lines).
Hunk #9 succeeded at 334 (offset -3 lines).
Hunk #10 succeeded at 397 (offset -3 lines).
Hunk #11 succeeded at 500 (offset -3 lines).
Hunk #12 succeeded at 589 (offset -3 lines).
Hunk #13 succeeded at 598 (offset -3 lines).
Hunk #14 succeeded at 634 (offset -3 lines).
Hunk #15 succeeded at 656 (offset -3 lines).
Hunk #16 succeeded at 739 (offset -3 lines).
Hunk #17 succeeded at 763 (offset -3 lines).
Hunk #18 succeeded at 781 (offset -3 lines).
Hunk #19 succeeded at 827 (offset -3 lines).
Hunk #20 succeeded at 855 (offset -3 lines).
Hunk #21 succeeded at 870 (offset -3 lines).
Hunk #22 succeeded at 888 (offset -3 lines).
Hunk #23 succeeded at 897 (offset -3 lines).
Hunk #24 succeeded at 908 (offset -3 lines).
Hunk #25 succeeded at 1159 (offset -3 lines).
patching file tools/perf/util/stat.c
patching file tools/perf/util/stat.h
[acme@five perf]$

[acme@five perf]$ git am --show-current-patch=diff | head -20
---
 tools/perf/builtin-stat.c      |  76 +++++++++++++----------
 tools/perf/tests/topology.c    |  17 +++---
 tools/perf/util/cpumap.c       |  82 ++++++++++++++-----------
 tools/perf/util/cpumap.h       |  10 +--
 tools/perf/util/stat-display.c | 108 +++++++++++++++++++--------------
 tools/perf/util/stat.c         |   2 +-
 tools/perf/util/stat.h         |   5 +-
 7 files changed, 173 insertions(+), 127 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f15b2f8aa14d..f10c67a26472 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1188,65 +1188,67 @@ static struct option stat_options[] = {
 	OPT_END()
 };

-static int perf_stat__get_socket(struct perf_stat_config *config __maybe_unused,
+static struct aggr_cpu_id perf_stat__get_socket(struct perf_stat_config *config __maybe_unused,
[acme@five perf]$
 
> jirka
> 
> > 
> > I still think that vendors (like us) need to fix/improve their firmware
> > tables so that we don't get silly big numbers for socket/package IDs, like
> > S5418-D0, below:
> > 
> > $./perf stat -a --per-die
> > 
> >  Performance counter stats for 'system wide':
> > 
> > S36-D0   48   72,216.31 msec cpu-clock      #   47.933 CPUs utilized
> > S36-D0   48        174     context-switches #   0.002 K/sec
> > S36-D0   48         48     cpu-migrations   #   0.001 K/sec
> > S36-D0   48         0     page-faults    #   0.000 K/sec
> > S36-D0   48   7,991,698     cycles    #   0.000 GHz
> > S36-D0   48   4,750,040     instructions   #   0.59  insn per cycle
> > S36-D0    1   <not supported>     branches
> > S36-D0   48      32,928     branch-misses    #   0.00% of all branches
> > S5418-D0   48   72,189.54 msec cpu-clock     #   47.915 CPUs utilized
> > S5418-D0   48        176     context-switches  #   0.002 K/sec
> > S5418-D0   48         48     cpu-migrations   #   0.001 K/sec
> > S5418-D0   48         0     page-faults     #   0.000 K/sec
> > S5418-D0   48   5,677,218     cycles    #    0.000 GHz
> > S5418-D0   48   3,872,285     instructions   #  0.68  insn per cycle
> > S5418-D0    1   <not supported>     branches
> > S5418-D0   48      29,208     branch-misses   #  0.00% of all branches
> > 
> >       1.506615297 seconds time elapsed
> > 
> > but at least it works now. Thanks.
> > 
> > > 
> > > > 
> > > >   tools/perf/builtin-stat.c      | 128 ++++++++++++------------
> > > >   tools/perf/tests/topology.c    |  64 ++++++++++--
> > > >   tools/perf/util/cpumap.c       | 171 ++++++++++++++++++++++-----------
> > > >   tools/perf/util/cpumap.h       |  55 ++++++-----
> > > >   tools/perf/util/stat-display.c | 102 ++++++++++++--------
> > > >   tools/perf/util/stat.c         |   2 +-
> > > >   tools/perf/util/stat.h         |   9 +-
> > > >   7 files changed, 337 insertions(+), 194 deletions(-)
> > > > 
> > > > -- 
> > > > 2.28.0
> > > > 
> > > 
> > > .
> > > 
> > 
> 

-- 

- Arnaldo

WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>,
	linux-kernel@vger.kernel.org, Linuxarm <linuxarm@huawei.com>,
	linux-perf-users@vger.kernel.org,
	James Clark <james.clark@arm.com>,
	namhyung@kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v6 00/12] perf tools: fix perf stat with large socket IDs
Date: Thu, 24 Dec 2020 09:30:38 -0300	[thread overview]
Message-ID: <20201224123038.GC477817@kernel.org> (raw)
In-Reply-To: <20201223221747.GB236568@krava>

Em Wed, Dec 23, 2020 at 11:17:47PM +0100, Jiri Olsa escreveu:
> On Fri, Dec 04, 2020 at 11:48:36AM +0000, John Garry wrote:
> > On 03/12/2020 15:39, Jiri Olsa wrote:
> > 
> > +
> > 
> > > On Thu, Nov 26, 2020 at 04:13:16PM +0200, James Clark wrote:
> > > > Changes since v5:
> > > >    * Fix test for cpu_map__get_die() by shifting id before testing.
> > > >    * Fix test for cpu_map__get_socket() by not using cpu_map__id_to_socket()
> > > >      which is only valid in CPU aggregation mode.
> > > > 
> > > > James Clark (12):
> > > >    perf tools: Improve topology test
> > > >    perf tools: Use allocator for perf_cpu_map
> > > >    perf tools: Add new struct for cpu aggregation
> > > >    perf tools: Replace aggregation ID with a struct
> > > >    perf tools: add new map type for aggregation
> > > >    perf tools: drop in cpu_aggr_map struct
> > > >    perf tools: Start using cpu_aggr_id in map
> > > >    perf tools: Add separate node member
> > > >    perf tools: Add separate socket member
> > > >    perf tools: Add separate die member
> > > >    perf tools: Add separate core member
> > > >    perf tools: Add separate thread member
> > > 
> > > Acked-by: Jiri Olsa <jolsa@redhat.com>
> > > 
> > 
> > Tested-by: John Garry <john.garry@huawei.com>
> 
> hi,
> I was wondering where this went, and noticed that
> Arnaldo was not CC-ed on the cover letter ;-)

Looking at it right now, used the Message-ID and b4 got everything,
there are some fuzzies that I'm checking:

[acme@five perf]$ git am --show-current-patch=diff | patch -p1
patching file tools/perf/builtin-stat.c
Hunk #1 succeeded at 1186 (offset -2 lines).
Hunk #2 succeeded at 1347 (offset -2 lines).
Hunk #3 succeeded at 1373 (offset -2 lines).
Hunk #4 succeeded at 1399 (offset -2 lines).
Hunk #5 succeeded at 1448 (offset -2 lines).
patching file tools/perf/tests/topology.c
patching file tools/perf/util/cpumap.c
patching file tools/perf/util/cpumap.h
patching file tools/perf/util/stat-display.c
Hunk #8 succeeded at 326 with fuzz 2 (offset -3 lines).
Hunk #9 succeeded at 334 (offset -3 lines).
Hunk #10 succeeded at 397 (offset -3 lines).
Hunk #11 succeeded at 500 (offset -3 lines).
Hunk #12 succeeded at 589 (offset -3 lines).
Hunk #13 succeeded at 598 (offset -3 lines).
Hunk #14 succeeded at 634 (offset -3 lines).
Hunk #15 succeeded at 656 (offset -3 lines).
Hunk #16 succeeded at 739 (offset -3 lines).
Hunk #17 succeeded at 763 (offset -3 lines).
Hunk #18 succeeded at 781 (offset -3 lines).
Hunk #19 succeeded at 827 (offset -3 lines).
Hunk #20 succeeded at 855 (offset -3 lines).
Hunk #21 succeeded at 870 (offset -3 lines).
Hunk #22 succeeded at 888 (offset -3 lines).
Hunk #23 succeeded at 897 (offset -3 lines).
Hunk #24 succeeded at 908 (offset -3 lines).
Hunk #25 succeeded at 1159 (offset -3 lines).
patching file tools/perf/util/stat.c
patching file tools/perf/util/stat.h
[acme@five perf]$

[acme@five perf]$ git am --show-current-patch=diff | head -20
---
 tools/perf/builtin-stat.c      |  76 +++++++++++++----------
 tools/perf/tests/topology.c    |  17 +++---
 tools/perf/util/cpumap.c       |  82 ++++++++++++++-----------
 tools/perf/util/cpumap.h       |  10 +--
 tools/perf/util/stat-display.c | 108 +++++++++++++++++++--------------
 tools/perf/util/stat.c         |   2 +-
 tools/perf/util/stat.h         |   5 +-
 7 files changed, 173 insertions(+), 127 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f15b2f8aa14d..f10c67a26472 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1188,65 +1188,67 @@ static struct option stat_options[] = {
 	OPT_END()
 };

-static int perf_stat__get_socket(struct perf_stat_config *config __maybe_unused,
+static struct aggr_cpu_id perf_stat__get_socket(struct perf_stat_config *config __maybe_unused,
[acme@five perf]$
 
> jirka
> 
> > 
> > I still think that vendors (like us) need to fix/improve their firmware
> > tables so that we don't get silly big numbers for socket/package IDs, like
> > S5418-D0, below:
> > 
> > $./perf stat -a --per-die
> > 
> >  Performance counter stats for 'system wide':
> > 
> > S36-D0   48   72,216.31 msec cpu-clock      #   47.933 CPUs utilized
> > S36-D0   48        174     context-switches #   0.002 K/sec
> > S36-D0   48         48     cpu-migrations   #   0.001 K/sec
> > S36-D0   48         0     page-faults    #   0.000 K/sec
> > S36-D0   48   7,991,698     cycles    #   0.000 GHz
> > S36-D0   48   4,750,040     instructions   #   0.59  insn per cycle
> > S36-D0    1   <not supported>     branches
> > S36-D0   48      32,928     branch-misses    #   0.00% of all branches
> > S5418-D0   48   72,189.54 msec cpu-clock     #   47.915 CPUs utilized
> > S5418-D0   48        176     context-switches  #   0.002 K/sec
> > S5418-D0   48         48     cpu-migrations   #   0.001 K/sec
> > S5418-D0   48         0     page-faults     #   0.000 K/sec
> > S5418-D0   48   5,677,218     cycles    #    0.000 GHz
> > S5418-D0   48   3,872,285     instructions   #  0.68  insn per cycle
> > S5418-D0    1   <not supported>     branches
> > S5418-D0   48      29,208     branch-misses   #  0.00% of all branches
> > 
> >       1.506615297 seconds time elapsed
> > 
> > but at least it works now. Thanks.
> > 
> > > 
> > > > 
> > > >   tools/perf/builtin-stat.c      | 128 ++++++++++++------------
> > > >   tools/perf/tests/topology.c    |  64 ++++++++++--
> > > >   tools/perf/util/cpumap.c       | 171 ++++++++++++++++++++++-----------
> > > >   tools/perf/util/cpumap.h       |  55 ++++++-----
> > > >   tools/perf/util/stat-display.c | 102 ++++++++++++--------
> > > >   tools/perf/util/stat.c         |   2 +-
> > > >   tools/perf/util/stat.h         |   9 +-
> > > >   7 files changed, 337 insertions(+), 194 deletions(-)
> > > > 
> > > > -- 
> > > > 2.28.0
> > > > 
> > > 
> > > .
> > > 
> > 
> 

-- 

- Arnaldo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-12-24 12:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 14:13 [PATCH v6 00/12] perf tools: fix perf stat with large socket IDs James Clark
2020-11-26 14:13 ` [PATCH v6 01/12] perf tools: Improve topology test James Clark
2020-11-26 14:13 ` [PATCH v6 02/12] perf tools: Use allocator for perf_cpu_map James Clark
2020-11-26 14:13 ` [PATCH v6 03/12] perf tools: Add new struct for cpu aggregation James Clark
2020-11-26 14:13 ` [PATCH v6 04/12] perf tools: Replace aggregation ID with a struct James Clark
2020-11-26 14:13 ` [PATCH v6 05/12] perf tools: add new map type for aggregation James Clark
2020-11-26 14:13 ` [PATCH v6 06/12] perf tools: drop in cpu_aggr_map struct James Clark
2020-11-26 14:13 ` [PATCH v6 07/12] perf tools: Start using cpu_aggr_id in map James Clark
2020-11-26 14:13 ` [PATCH v6 08/12] perf tools: Add separate node member James Clark
2020-11-26 14:13 ` [PATCH v6 09/12] perf tools: Add separate socket member James Clark
2020-11-26 14:13 ` [PATCH v6 10/12] perf tools: Add separate die member James Clark
2020-11-26 14:13 ` [PATCH v6 11/12] perf tools: Add separate core member James Clark
2020-11-26 14:13 ` [PATCH v6 12/12] perf tools: Add separate thread member James Clark
2020-11-30 14:33 ` [PATCH v6 00/12] perf tools: fix perf stat with large socket IDs Namhyung Kim
2020-12-03 15:39 ` Jiri Olsa
2020-12-04 11:48   ` John Garry
2020-12-04 11:48     ` John Garry
2020-12-23 22:17     ` Jiri Olsa
2020-12-23 22:17       ` Jiri Olsa
2020-12-24 12:30       ` Arnaldo Carvalho de Melo [this message]
2020-12-24 12:30         ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201224123038.GC477817@kernel.org \
    --to=acme@kernel.org \
    --cc=james.clark@arm.com \
    --cc=john.garry@huawei.com \
    --cc=jolsa@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.