lkml.org 
[lkml]   [2018]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] perf report: Display average IPC and IPC coverage per symbol
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

thanks,
jirka

\
 
 \ /
  Last update: 2018-11-26 10:56    [W:1.651 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site