All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-perf-users@vger.kernel.org,
	Kan Liang <kan.liang@linux.intel.com>,
	Zhengjun Xing <zhengjun.xing@linux.intel.com>,
	James Clark <james.clark@arm.com>,
	Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Subject: Re: [PATCH 14/15] perf stat: Rename "aggregate-number" to "cpu-count" in JSON
Date: Tue, 29 Nov 2022 14:45:55 -0800	[thread overview]
Message-ID: <CAM9d7cj-JeKiHUM1Eq36937q+o+yj=DKwt_pYQLD6aC5zCTN+Q@mail.gmail.com> (raw)
In-Reply-To: <CAP-5=fWF7ScB0kHKQsqePHmg3sJf22TOfvKcNeYQdMoD0p8Tbg@mail.gmail.com>

On Sat, Nov 26, 2022 at 7:14 PM Ian Rogers <irogers@google.com> wrote:
>
> On Thu, Nov 24, 2022 at 11:51 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > Hi Ian,
> >
> > On Wed, Nov 23, 2022 at 3:31 PM Ian Rogers <irogers@google.com> wrote:
> > >
> > > On Wed, Nov 23, 2022 at 10:02 AM Namhyung Kim <namhyung@kernel.org> wrote:
> > > >
> > > > As the JSON output has been broken for a little while, I guess there are
> > > > not many users.  Let's rename the field to more intuitive one. :)
> > >
> > > I'm not sure cpu-count is accurate. For example, an uncore counter in
> > > a dual socket machine may have a CPU mask of "0, 36", ie one event per
> > > socket. The aggregate-number in this case I believe is 2.
> >
> > You're right.  In case of uncore events, it can be confusing.  But in some
> > sense it could be thought as cpu count as well since it aggregates the
> > result from two cpus anyway. :)
> >
> > Note that the aggregate-number (or cpu-count) is only printed if users
> > requested one of aggregation options like --per-socket or --per-core.
> > In your example, then it could print 1 for each socket.
> >
> > But I think uncore events are different from core events, and hopefully
> > they have separate instances for different sockets or something already.
> > That means it doesn't need to use those aggregation options for them.
> >
> > Also the CSV output uses "cpus" for the same information.  It'd be nice
> > we could have consistency.
>
> So in the original patch from Claire she'd passed the name "number"
> through to the json from the stat code. Having an integer called
> "number" isn't exactly intention revealing - thank you for your clean
> up work! :-) I switched "number" to be "aggregate number" as the
> number comes from the "data" aggregated and the code refers to it as
> aggregate data. I think aggregate-number is more consistent with the
> code, and cpu-count would look strange in the uncore case above where
> the number of CPUs (really hyperthreads) is 72. Perhaps we should also
> be outputting the aggregation mode with the number. Anyway, I think
> for the patch series I'd prefer we skipped this one and kept the rest.

Right, I think we need a more general term to include non-cpu events.
But it seems Arnaldo already merged it.

Arnaldo, do you want me to send a revert?

Thanks,
Namhyung

  reply	other threads:[~2022-11-29 22:46 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 18:01 [PATCHSET 00/15] perf stat: Improve perf stat output (v2) Namhyung Kim
2022-11-23 18:01 ` [PATCH 01/15] perf stat: Fix cgroup display in JSON output Namhyung Kim
2022-11-23 23:20   ` Ian Rogers
2022-11-24 12:45     ` Arnaldo Carvalho de Melo
2022-11-23 18:01 ` [PATCH 02/15] perf stat: Move summary prefix printing logic in CSV output Namhyung Kim
2022-11-23 23:20   ` Ian Rogers
2022-11-23 18:01 ` [PATCH 03/15] perf stat: Do not align time prefix " Namhyung Kim
2022-11-23 23:21   ` Ian Rogers
2022-11-23 18:01 ` [PATCH 04/15] perf stat: Use scnprintf() in prepare_interval() Namhyung Kim
2022-11-23 23:22   ` Ian Rogers
2022-11-23 18:01 ` [PATCH 05/15] perf stat: Remove prefix argument in print_metric_headers() Namhyung Kim
2022-11-23 23:23   ` Ian Rogers
2022-11-30  5:09     ` Ian Rogers
2022-11-30  5:13       ` Ian Rogers
2022-11-30 21:21         ` Namhyung Kim
2022-12-05 12:22         ` Arnaldo Carvalho de Melo
2022-12-05 12:40           ` Arnaldo Carvalho de Melo
2022-11-23 18:01 ` [PATCH 06/15] perf stat: Remove metric_only argument in print_counter_aggrdata() Namhyung Kim
2022-11-23 23:23   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 07/15] perf stat: Pass const char *prefix to display routines Namhyung Kim
2022-11-23 23:24   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 08/15] perf stat: Use struct outstate in evlist__print_counters() Namhyung Kim
2022-11-23 23:24   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 09/15] perf stat: Pass struct outstate to print_metric_begin() Namhyung Kim
2022-11-23 23:25   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 10/15] perf stat: Pass struct outstate to printout() Namhyung Kim
2022-11-23 23:26   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 11/15] perf stat: Do not pass runtime_stat " Namhyung Kim
2022-11-23 23:27   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 12/15] perf stat: Pass through struct outstate Namhyung Kim
2022-11-23 23:27   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 13/15] perf stat: Fix JSON output in metric-only mode Namhyung Kim
2022-11-23 23:28   ` Ian Rogers
2022-11-23 18:02 ` [PATCH 14/15] perf stat: Rename "aggregate-number" to "cpu-count" in JSON Namhyung Kim
2022-11-23 23:30   ` Ian Rogers
2022-11-25  7:50     ` Namhyung Kim
2022-11-27  3:14       ` Ian Rogers
2022-11-29 22:45         ` Namhyung Kim [this message]
2022-11-30  5:01           ` Ian Rogers
2022-11-23 18:02 ` [PATCH 15/15] perf stat: Tidy up JSON metric-only output when no metrics Namhyung Kim
2022-11-23 23:31   ` Ian Rogers

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='CAM9d7cj-JeKiHUM1Eq36937q+o+yj=DKwt_pYQLD6aC5zCTN+Q@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=zhengjun.xing@linux.intel.com \
    /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.