Messages in this thread | | | From | Jiri Olsa <> | Date | Thu, 15 Jun 2023 10:10:18 +0200 | Subject | Re: [PATCH 18/20] perf stat: Display event stats using aggr counts |
| |
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
| |