aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2015-07-18 08:24:46 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-08-06 16:29:45 -0300
commit0e332f033a8216fa03792fde69882f66500848c7 (patch)
treeb88becef22fec7eb369b5dec4ba58e57985fd4b5 /tools/perf/util/hist.c
parentperf tools: Add empty Build files for architectures lacking them (diff)
downloadlinux-dev-0e332f033a8216fa03792fde69882f66500848c7.tar.xz
linux-dev-0e332f033a8216fa03792fde69882f66500848c7.zip
perf tools: Add support for cycles, weight branch_info field
cycles is a new branch_info field available on some CPUs that indicates the time deltas between branches in the LBR. Add a sort key and output code for the cycles to allow to display the basic block cycles individually in perf report. We also pass in the cycles for weight when LBRs are processed, which allows to get global and local weight, to get an estimate of the total cost. And also print the cycles information for perf report -D. I also added printing for the previously missing LBR flags (mispredict etc.) Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1437233094-12844-2-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 6f28d53d4e46..54fc0033dd6a 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -618,7 +618,8 @@ iter_add_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *a
* and not events sampled. Thus we use a pseudo period of 1.
*/
he = __hists__add_entry(hists, al, iter->parent, &bi[i], NULL,
- 1, 1, 0, true);
+ 1, bi->flags.cycles ? bi->flags.cycles : 1,
+ 0, true);
if (he == NULL)
return -ENOMEM;