lkml.org 
[lkml]   [2020]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] perf stat: Show percore counts in per CPU output
On Tue, Feb 18, 2020 at 09:02:52AM +0800, Jin, Yao wrote:

SNIP

> > > >
> > > > thanks,
> > > > jirka
> > > >
> > >
> > > I have a simple fix for this misalignment issue.
> > >
> > > diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
> > > index bc31fccc0057..95b29c9cba36 100644
> > > --- a/tools/perf/util/stat-display.c
> > > +++ b/tools/perf/util/stat-display.c
> > > @@ -114,11 +114,11 @@ static void aggr_printout(struct perf_stat_config
> > > *config,
> > > fprintf(config->output, "S%d-D%d-C%*d%s",
> > > cpu_map__id_to_socket(id),
> > > cpu_map__id_to_die(id),
> > > - config->csv_output ? 0 : -5,
> > > + config->csv_output ? 0 : -3,
> > > cpu_map__id_to_cpu(id), config->csv_sep);
> > > } else {
> > > - fprintf(config->output, "CPU%*d%s ",
> > > - config->csv_output ? 0 : -5,
> > > + fprintf(config->output, "CPU%*d%s",
> > > + config->csv_output ? 0 : -7,
> > > evsel__cpus(evsel)->map[id],
> > > config->csv_sep);
> >
> > I guess that's ok, will that work with higher (3 digit) cpu numbers?
> >
> > jirka
> >
>
> Yes, it works with hundreds of CPU. I have tested with that case.
>
> BTW, do you need me to post a separate patch or you will add this fix in
> your patch series?

please send separate patch

thanks,
jirka

\
 
 \ /
  Last update: 2020-02-18 07:18    [W:0.040 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site