From: Jiri Olsa <olsajiri@gmail.com>
To: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@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>,
Leo Yan <leo.yan@linaro.org>, Andi Kleen <ak@linux.intel.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
James Clark <james.clark@arm.com>,
Xing Zhengjun <zhengjun.xing@linux.intel.com>,
Michael Petlan <mpetlan@redhat.com>
Subject: Re: [PATCH 18/20] perf stat: Display event stats using aggr counts
Date: Thu, 15 Jun 2023 10:10:18 +0200 [thread overview]
Message-ID: <ZIrHatpIlo3Y2ZPQ@krava> (raw)
In-Reply-To: <CAP-5=fX2ULvR7KFCwZN4wn1LSQmtJqQk7bK=T=BHdvnHuL=DdA@mail.gmail.com>
On Wed, Jun 14, 2023 at 09:20:53AM -0700, Ian Rogers wrote:
> On Wed, Jun 14, 2023 at 6:40 AM Jiri Olsa <olsajiri@gmail.com> wrote:
> >
> > On Mon, Oct 17, 2022 at 07:02:25PM -0700, Namhyung Kim wrote:
> > > Now aggr counts are ready for use. Convert the display routines to use
> > > the aggr counts and update the shadow stat with them. It doesn't need
> > > to aggregate counts or collect aliases anymore during the display. Get
> > > rid of now unused struct perf_aggr_thread_value.
> > >
> > > Note that there's a difference in the display order among the aggr mode.
> > > For per-core/die/socket/node aggregation, it shows relevant events in
> > > the same unit together, whereas global/thread/no aggregation it shows
> > > the same events for different units together. So it still uses separate
> > > codes to display them due to the ordering.
> > >
> > > One more thing to note is that it breaks per-core event display for now.
> > > The next patch will fix it to have identical output as of now.
> > >
> > > Acked-by: Ian Rogers <irogers@google.com>
> > > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> >
> > hi,
> > this one seems to break 'perf stat -r X' not sure why so far..
> >
> > final counts seems to be accumulated instead of displaying average, like:
> >
> >
> > with this patch:
> >
> > Performance counter stats for './test_progs -n 103/1' (2 runs):
> >
> > 206,815,929 cycles:u ( +- 0.05% )
> > 16,052,747,533 cycles:k ( +- 0.10% )
> > 16,259,643,167 cycles ( +- 0.10% )
> >
> > 1.98093 +- 0.00586 seconds time elapsed ( +- 0.30% )
> >
> >
> > without this patch:
> >
> > Performance counter stats for './test_progs -n 103/1' (2 runs):
> >
> > 103,300,812 cycles:u ( +- 0.37% )
> > 8,016,856,866 cycles:k ( +- 0.32% )
> > 8,120,200,572 cycles ( +- 0.32% )
> >
> > 1.97272 +- 0.00270 seconds time elapsed ( +- 0.14% )
> >
> >
> > any idea? ;-)
>
> Is this still broken in perf-tools-next? The patch is quite old and
> there's been work in this area. I'm assuming yes, but thought it was
> worth checking.
yes
single run:
[root@krava perf]# ./perf stat -e cycles:u ./perf bench sched pipe
# Running 'sched/pipe' benchmark:
# Executed 1000000 pipe operations between two processes
Total time: 4.725 [sec]
4.725795 usecs/op
211604 ops/sec
Performance counter stats for './perf bench sched pipe':
398,096,363 cycles:u
4.737638715 seconds time elapsed
0.227961000 seconds user
4.348895000 seconds sys
3 runs (with verbose):
[root@krava perf]# ./perf stat -v -r 3 -e cycles:u ./perf bench sched pipe
Using CPUID GenuineIntel-6-8C-1
Control descriptor is not initialized
[ perf stat: executing run #1 ... ]
# Running 'sched/pipe' benchmark:
# Executed 1000000 pipe operations between two processes
Total time: 4.659 [sec]
4.659396 usecs/op
214620 ops/sec
cycles:u: 399150620 3866604490 3866604490
[ perf stat: executing run #2 ... ]
# Running 'sched/pipe' benchmark:
# Executed 1000000 pipe operations between two processes
Total time: 4.656 [sec]
4.656820 usecs/op
214738 ops/sec
cycles:u: 795910540 7700776638 7700776638
[ perf stat: executing run #3 ... ]
# Running 'sched/pipe' benchmark:
# Executed 1000000 pipe operations between two processes
Total time: 4.634 [sec]
4.634090 usecs/op
215792 ops/sec
cycles:u: 1189927957 11522039559 11522039559
Performance counter stats for './perf bench sched pipe' (3 runs):
1,189,927,957 cycles:u ( +- 19.18% )
4.6611 +- 0.0102 seconds time elapsed ( +- 0.22% )
jirka
next prev parent reply other threads:[~2023-06-15 8:10 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 2:02 [PATCHSET 00/20] perf stat: Cleanup counter aggregation (v3) Namhyung Kim
2022-10-18 2:02 ` [PATCH 01/20] perf tools: Save evsel->pmu in parse_events() Namhyung Kim
2022-10-18 2:02 ` [PATCH 02/20] perf tools: Use pmu info in evsel__is_hybrid() Namhyung Kim
2022-10-18 2:02 ` [PATCH 03/20] perf stat: Use evsel__is_hybrid() more Namhyung Kim
2022-10-18 2:02 ` [PATCH 04/20] perf stat: Add aggr id for global mode Namhyung Kim
2022-10-18 2:02 ` [PATCH 05/20] perf stat: Add cpu aggr id for no aggregation mode Namhyung Kim
2022-10-18 2:02 ` [PATCH 06/20] perf stat: Add 'needs_sort' argument to cpu_aggr_map__new() Namhyung Kim
2022-10-18 2:02 ` [PATCH 07/20] perf stat: Add struct perf_stat_aggr to perf_stat_evsel Namhyung Kim
2022-10-18 2:02 ` [PATCH 08/20] perf stat: Allocate evsel->stats->aggr properly Namhyung Kim
2022-10-18 2:02 ` [PATCH 09/20] perf stat: Aggregate events using evsel->stats->aggr Namhyung Kim
2022-10-18 2:02 ` [PATCH 10/20] perf stat: Factor out evsel__count_has_error() Namhyung Kim
2022-10-18 2:02 ` [PATCH 11/20] perf stat: Aggregate per-thread stats using evsel->stats->aggr Namhyung Kim
2022-10-18 2:02 ` [PATCH 12/20] perf stat: Allocate aggr counts for recorded data Namhyung Kim
2022-10-18 2:02 ` [PATCH 13/20] perf stat: Reset aggr counts for each interval Namhyung Kim
2022-10-18 2:02 ` [PATCH 14/20] perf stat: Split process_counters() Namhyung Kim
2022-10-18 2:02 ` [PATCH 15/20] perf stat: Add perf_stat_merge_counters() Namhyung Kim
2022-10-18 2:02 ` [PATCH 16/20] perf stat: Add perf_stat_process_percore() Namhyung Kim
2022-10-18 2:02 ` [PATCH 17/20] perf stat: Add perf_stat_process_shadow_stats() Namhyung Kim
2022-10-18 2:02 ` [PATCH 18/20] perf stat: Display event stats using aggr counts Namhyung Kim
2022-12-05 10:51 ` Athira Rajeev
2022-12-05 19:00 ` Namhyung Kim
2022-12-06 13:39 ` Athira Rajeev
2023-06-14 13:40 ` Jiri Olsa
2023-06-14 16:20 ` Ian Rogers
2023-06-15 8:10 ` Jiri Olsa [this message]
2023-06-15 17:31 ` Namhyung Kim
2022-10-18 2:02 ` [PATCH 19/20] perf stat: Display percore events properly Namhyung Kim
2022-10-18 2:02 ` [PATCH 20/20] perf stat: Remove unused perf_counts.aggr field Namhyung Kim
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=ZIrHatpIlo3Y2ZPQ@krava \
--to=olsajiri@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=kan.liang@linux.intel.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).