public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: "Jin, Yao" <yao.jin@linux.intel.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v4] perf stat: Show percore counts in per CPU output
Date: Tue, 18 Feb 2020 07:14:22 +0100	[thread overview]
Message-ID: <20200218061422.GA384398@krava> (raw)
In-Reply-To: <9c16e98e-aa9e-8879-0690-990a5dcda303@linux.intel.com>

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


  reply	other threads:[~2020-02-18  6:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  8:04 [PATCH v4] perf stat: Show percore counts in per CPU output Jin Yao
2020-02-16 22:54 ` Jiri Olsa
2020-02-17  1:22   ` Jin, Yao
2020-02-17 11:06     ` Jiri Olsa
2020-02-18  1:02       ` Jin, Yao
2020-02-18  6:14         ` Jiri Olsa [this message]
2020-02-17 14:45   ` Arnaldo Carvalho de Melo
2020-03-19 14:10 ` [tip: perf/core] " tip-bot2 for Jin Yao

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=20200218061422.GA384398@krava \
    --to=jolsa@redhat.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    --cc=yao.jin@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