Re: [PATCH 04/10] perf, tools, report: Add processing for cycle histograms

From: Jiri Olsa
Date: Tue May 26 2015 - 09:45:56 EST


On Sun, May 10, 2015 at 06:52:00AM -0700, Andi Kleen wrote:

SNIP

> mi = he->mem_info;
> err = addr_map_symbol__inc_samples(&mi->daddr, evsel->idx);
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index 302fc05..cf6b48b 100644
> --- a/tools/perf/util/hist.c
> +++ b/tools/perf/util/hist.c
> @@ -1412,6 +1412,39 @@ int hists__link(struct hists *leader, struct hists *other)
> return 0;
> }
>
> +void hist__account_cycles(struct branch_stack *bs, struct addr_location *al,
> + struct perf_sample *sample, bool nonstd_branch_mode)
> +{
> + struct branch_info *bi;
> +
> + /* If we have branch cycles always annotate them. */
> + if (bs && bs->nr && bs->entries[0].flags.cycles) {

hum, so this is assuming that having cycles fort 1st entry
means there'll be for the rest?

Also in that case why is there the '!= cycles' check within
addr_map_symbol__account_cycles ?

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/