Re: [PATCH] perf stat: Add ScaleUnit to {cpu,task}-clock JSON description

From: Namhyung Kim

Date: Fri Nov 07 2025 - 12:53:29 EST


On Thu, Nov 06, 2025 at 02:09:00PM -0800, Ian Rogers wrote:
> On Thu, Nov 6, 2025 at 1:53 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> >
> > This changes the output of the event like below. In fact, that's the
> > output it used to have before the JSON conversion.
> >
> > Before:
> > $ perf stat -e task-clock true
> >
> > Performance counter stats for 'true':
> >
> > 313,848 task-clock # 0.290 CPUs utilized
> >
> > 0.001081223 seconds time elapsed
> >
> > 0.001122000 seconds user
> > 0.000000000 seconds sys
> >
> > After:
> > $ perf stat -e task-clock true
> >
> > Performance counter stats for 'true':
> >
> > 0.36 msec task-clock # 0.297 CPUs utilized
> >
> > 0.001225435 seconds time elapsed
> >
> > 0.001268000 seconds user
> > 0.000000000 seconds sys
> >
> > Fixes: 9957d8c801fe0cb90 ("perf jevents: Add common software event json")
> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
>
> Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>

Applied to perf-tools-next, thanks!

Namhyung