linux/tools/perf/ui
Namhyung Kim 7111ffff60 perf tools: Put caller above callee in --children mode
The __hpp__sort_acc() sorts entries using callchain depth in order to
put callers above in children mode.  But it assumed the callchain order
was callee-first.  Now default (for children) is caller-first so the
order of entries is reverted.

For example, consider following case:

  $ perf report --no-children
  ..l
  # Overhead  Command  Shared Object        Symbol
  # ........  .......  ...................  ..........................
  #
      99.44%  a.out    a.out                [.] main
              |
              ---main
                 __libc_start_main
                 _start

Then children mode should show 'start' above '__libc_start_main' since
it's the caller (parent) of the __libc_start_main.  But it's reversed:

  # Children      Self  Command  Shared Object    Symbol
  # ........  ........  .......  ...............  .....................
  #
      99.61%     0.00%  a.out    libc-2.25.so     [.] __libc_start_main
      99.61%     0.00%  a.out    a.out            [.] _start
      99.54%    99.44%  a.out    a.out            [.] main

This patch fixes it.

  # Children      Self  Command  Shared Object    Symbol
  # ........  ........  .......  ...............  .....................
  #
      99.61%     0.00%  a.out    a.out            [.] _start
      99.61%     0.00%  a.out    libc-2.25.so     [.] __libc_start_main
      99.54%    99.44%  a.out    a.out            [.] main

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yao Jin <yao.jin@linux.intel.com>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170524062129.32529-8-namhyung@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-05-24 08:41:49 +02:00
..
browsers perf tools: Use just forward declarations for struct thread where possible 2017-04-24 13:43:35 -03:00
gtk perf tools: Add signal.h to places using its definitions 2017-04-20 13:22:43 -03:00
stdio perf tools: Use just forward declarations for struct thread where possible 2017-04-24 13:43:35 -03:00
tui perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used 2017-04-19 13:01:44 -03:00
browser.c perf tools: Move extra string util functions to util/string2.h 2017-04-19 13:01:51 -03:00
browser.h perf annotate: Rename 'colors.code' to 'colors.jump_arrows' 2016-01-26 11:52:46 -03:00
Build perf build: Add slang objects building 2015-02-12 11:48:13 -03:00
helpline.c perf ui helpline: Provide a printf variant 2016-11-25 15:49:16 -03:00
helpline.h perf ui helpline: Provide a printf variant 2016-11-25 15:49:16 -03:00
hist.c perf tools: Put caller above callee in --children mode 2017-05-24 08:41:49 +02:00
keysyms.h perf hists browser: Add option for runtime switching perf data file 2013-02-06 18:09:24 -03:00
libslang.h perf ui browser: Introduce ui_browser__printf() 2015-08-12 10:27:05 -03:00
progress.c perf ui progress: Per progress bar state 2013-10-23 15:40:38 -03:00
progress.h perf tools: Remove EOL whitespaces 2015-01-21 13:24:31 -03:00
setup.c perf ui gtk: Move gtk .so name to the only place where it is used 2017-04-26 15:31:57 -03:00
ui.h perf ui stdio: Add way to setup the color output mode selection 2016-07-12 00:00:39 -03:00
util.c perf evsel: Introduce perf_evsel__open_strerror method 2013-01-24 16:40:09 -03:00
util.h perf ui: Introduce struct perf_error_ops 2012-06-19 13:06:18 -03:00