Re: [PATCH v3 07/18] perf stat: Remove hard coded shadow metrics

Namhyung Kim
2025-11-11T19:03:17Z

On Tue, Nov 11, 2025 at 09:23:47AM -0800, Ian Rogers wrote:
> On Mon, Nov 10, 2025 at 11:02 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > On Mon, Nov 10, 2025 at 08:04:06PM -0800, Ian Rogers wrote:
> > > Now that the metrics are encoded in common json the hard coded
> > > printing means the metrics are shown twice. Remove the hard coded
> > > version.
> > >
> > > This means that when specifying events, and those events correspond to
> > > a hard coded metric, the metric will no longer be displayed. The
> > > metric will be displayed if the metric is requested. Due to the adhoc
> > > printing in the previous approach it was often found frustrating, the
> > > new approach avoids this.
> > >
> > > The default perf stat output on an alderlake now looks like:
> > > ```
> > > $ perf stat -a -- sleep 1
> > >
> > > Performance counter stats for 'system wide':
> > >
> > > 7,932 context-switches # 281.7 cs/sec cs_per_second
> > > TopdownL1 (cpu_core) # 10.3 % tma_bad_speculation
> > > # 17.3 % tma_frontend_bound
> > > TopdownL1 (cpu_core) # 37.3 % tma_backend_bound
> > > # 35.2 % tma_retiring
> > > 5,901 page-faults # 209.5 faults/sec page_faults_per_second
> > > 418,955,116 cpu_atom/cpu-cycles/ # 0.0 GHz cycles_frequency (49.77%)
> > > 1,113,933,476 cpu_core/cpu-cycles/ # 0.0 GHz cycles_frequency
> > > # 14.6 % tma_bad_speculation
> > > # 8.5 % tma_retiring (50.17%)
> > > # 41.8 % tma_backend_bound
> > > # 35.1 % tma_frontend_bound (50.31%)
> >
> > I'd like to merge the alignment fix for this.
> >
> > https://lore.kernel.org/r/20251106072834.1750880-1-namhyung@kernel.org
>
> I'm happy with that fix but if merges before these changes then I need
> to rewrite all my commit messages :-) Not a big deal, I'll add my tag.

I understand your concern. I can merge the change after applying this
series.

Thanks,
Namhyung