All of lore.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 2/2] perf report: Display average IPC and IPC coverage per symbol
Date: Tue, 27 Nov 2018 10:34:54 +0100	[thread overview]
Message-ID: <20181127093454.GF8908@krava> (raw)
In-Reply-To: <bda91905-c08a-87e0-e49c-27eeaf9b711d@linux.intel.com>

On Tue, Nov 27, 2018 at 11:42:12AM +0800, Jin, Yao wrote:
> 
> 
> On 11/26/2018 5:55 PM, Jiri Olsa wrote:
> > On Mon, Nov 26, 2018 at 05:40:54PM +0800, Jin Yao wrote:
> > 
> > SNIP
> > 
> > > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> > > index f96c005..94f62c8 100644
> > > --- a/tools/perf/util/sort.c
> > > +++ b/tools/perf/util/sort.c
> > > @@ -13,6 +13,7 @@
> > >   #include "strlist.h"
> > >   #include <traceevent/event-parse.h>
> > >   #include "mem-events.h"
> > > +#include "annotate.h"
> > >   #include <linux/kernel.h>
> > >   regex_t		parent_regex;
> > > @@ -422,6 +423,47 @@ struct sort_entry sort_srcline_to = {
> > >   	.se_width_idx	= HISTC_SRCLINE_TO,
> > >   };
> > > +static int hist_entry__sym_ipc_snprintf(struct hist_entry *he, char *bf,
> > > +					size_t size, unsigned int width)
> > > +{
> > > +
> > > +	struct symbol *sym = he->ms.sym;
> > > +	struct map *map = he->ms.map;
> > > +	struct perf_evsel *evsel = hists_to_evsel(he->hists);
> > > +	struct annotation *notes;
> > > +	double ipc = 0.0, coverage = 0.0;
> > > +	char tmp[64];
> > > +
> > > +	if (!sym)
> > > +		return repsep_snprintf(bf, size, "%-*s", width, "-");
> > > +
> > > +	if (!sym->annotated &&
> > > +	    symbol__annotate2(sym, map, evsel, &annotation__default_options,
> > > +			      NULL) < 0) {
> > > +		return 0;
> > > +	}
> > 
> > this seems to make the sorting extra long, would you
> > please consider progress bar update for this?
> > 
> > should be added somewhere around hists sorting code
> > 
> 
> Hi Jiri,
> 
> Sorting doesn't take long time in my test but the session event processing
> takes some time.
> 
> I just think maybe we need a new ops for stdio progress bar like what the
> tui_progress__ops does now. That should be benefit for all stdio usages.
> 
> That may be another separate patch-set.

sure, thanks

jirka

      reply	other threads:[~2018-11-27  9:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26  9:40 [PATCH 0/2] perf report/annotate: Support average IPC and IPC coverage for function Jin Yao
2018-11-26  9:40 ` [PATCH 1/2] perf annotate: Compute average IPC and IPC coverage per symbol Jin Yao
2018-11-26  9:40 ` [PATCH 2/2] perf report: Display " Jin Yao
2018-11-26  9:52   ` Jiri Olsa
2018-11-27  3:50     ` Jin, Yao
2018-11-26  9:53   ` Jiri Olsa
2018-11-27  3:52     ` Jin, Yao
2018-11-26  9:55   ` Jiri Olsa
2018-11-27  3:42     ` Jin, Yao
2018-11-27  9:34       ` Jiri Olsa [this message]

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=20181127093454.GF8908@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.