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

Reply via email to