linux/tools/perf
Jin Yao 410024dbbc perf report: Add branch flag to callchain cursor node
Since the branch ip has been added to call stack for easier browsing,
this patch adds more branch information. For example, add a flag to
indicate if this ip is a branch, and also add with the branch flag.

Then we can know if the cursor node represents a branch and know what
the branch flag it has.

The branch history code has a loop detection pass that removes loops. It
would be nice for knowing how many loops were removed then in next
steps, we can compute out the average number of iterations.

For example:

Before remove_loops(),
entry0: from = 0x100, to = 0x200
entry1: from = 0x300, to = 0x250
entry2: from = 0x300, to = 0x250
entry3: from = 0x300, to = 0x250
entry4: from = 0x700, to = 0x800

After remove_loops()
entry0: from = 0x100, to = 0x200
entry1: from = 0x300, to = 0x250
entry2: from = 0x700, to = 0x800

The original entry2 and entry3 are removed. So the number of iterations
(from = 0x300, to = 0x250) is equal to removed number + 1 (2 + 1).

iterations = removed number + 1;
average iteractions = Sum(iteractions) / number of samples

This formula ignores other cases, for example, iterations cross multiple
buffers and one buffer contains 2+ loops. Because in practice, it's good
enough.

Signed-off-by: Yao Jin <yao.jin@linux.intel.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linux-kernel@vger.kernel.org
Cc: Yao Jin <yao.jin@linux.intel.com>
Link: http://lkml.kernel.org/n/1477876794-30749-2-git-send-email-yao.jin@linux.intel.com
[ Renamed 'iter' to 'nr_loop_iter' for clarity ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-11-14 13:15:56 -03:00
..
arch perf tools: Update x86's syscall_64.tbl, adding pkey_(alloc,free,mprotect) 2016-10-28 11:29:44 -02:00
bench perf bench futex: Sanitize numeric parameters 2016-10-25 09:50:53 -03:00
Documentation perf config: Add support setting variables in a config file 2016-11-14 13:08:11 -03:00
jvmti perf kvmti: Remove unused Makefile file 2016-11-14 12:42:56 -03:00
pmu-events perf vendor events: Support couple more POWER8 PVRs in mapfile 2016-10-17 13:39:47 -03:00
python
scripts
tests perf jvmti: Plug compilation into perf build 2016-11-14 12:42:47 -03:00
trace
ui perf hist browser: Fix hierarchy column counts 2016-10-25 09:52:49 -03:00
util perf report: Add branch flag to callchain cursor node 2016-11-14 13:15:56 -03:00
.gitignore
Build perf c2c: Add c2c command 2016-10-19 13:18:31 -03:00
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c perf c2c report: Add --show-all option 2016-10-21 10:32:02 -03:00
builtin-config.c perf config: Mark where are config items from (user or system) 2016-11-14 13:10:37 -03:00
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-help.c
builtin-inject.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c perf list: Support long jevents descriptions 2016-10-03 21:35:47 -03:00
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Add support for using symbols in address filters 2016-09-29 11:17:02 -03:00
builtin-report.c perf tools: Use normal error reporting when processing PERF_RECORD_READ events 2016-10-24 11:07:44 -03:00
builtin-sched.c perf tools: Introduce timestamp__scnprintf_usec() 2016-10-28 11:29:40 -02:00
builtin-script.c perf tools: Introduce timestamp__scnprintf_usec() 2016-10-28 11:29:40 -02:00
builtin-stat.c
builtin-timechart.c
builtin-top.c
builtin-trace.c perf trace: Use the syscall raw_syscalls:sys_enter timestamp 2016-10-24 11:07:46 -03:00
builtin-version.c
builtin.h perf c2c: Add c2c command 2016-10-19 13:18:31 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf jvmti: Plug compilation into perf build 2016-11-14 12:42:47 -03:00
Makefile.perf perf jvmti: Plug compilation into perf build 2016-11-14 12:42:47 -03:00
MANIFEST tools lib: Add for_each_clear_bit macro 2016-10-24 11:07:33 -03:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c perf c2c: Add c2c command 2016-10-19 13:18:31 -03:00
perf.h