linux/tools/perf/util
Frederic Weisbecker a4fb581b15 perf tools: Bind callchains to the first sort dimension column
Currently, the callchains are displayed using a constant left
margin. So depending on the current sort dimension
configuration, callchains may appear to be well attached to the
first sort dimension column field which is mostly the case,
except when the first dimension of sorting is done by comm,
because these are right aligned.

This patch binds the callchain to the first letter in the first
column, whatever type of column it is (dso, comm, symbol).
Before:

     0.80%             perf  [k] __lock_acquire
             __lock_acquire
             lock_acquire
             |
             |--58.33%-- _spin_lock
             |          |
             |          |--28.57%-- inotify_should_send_event
             |          |          fsnotify
             |          |          __fsnotify_parent

After:

     0.80%             perf  [k] __lock_acquire
                       __lock_acquire
                       lock_acquire
                       |
                       |--58.33%-- _spin_lock
                       |          |
                       |          |--28.57%-- inotify_should_send_event
                       |          |          fsnotify
                       |          |          __fsnotify_parent

Also, for clarity, we don't put anymore the callchain as is but:

- If we have a top level ancestor in the callchain, start it
  with a first ascii hook.

  Before:

     0.80%             perf  [kernel]                        [k] __lock_acquire
                       __lock_acquire
                         lock_acquire
                       |
                       |--58.33%-- _spin_lock
                       |          |
                       |          |--28.57%-- inotify_should_send_event
                       |          |          fsnotify
                      [..]       [..]

   After:

     0.80%             perf  [kernel]                         [k] __lock_acquire
                       |
                       --- __lock_acquire
                           lock_acquire
                          |
                          |--58.33%-- _spin_lock
                          |          |
                          |          |--28.57%-- inotify_should_send_event
                          |          |          fsnotify
                         [..]       [..]

- Otherwise, if we have several top level ancestors, then
  display these like we did before:

       1.69%           Xorg
                       |
                       |--21.21%-- vread_hpet
                       |          0x7fffd85b46fc
                       |          0x7fffd85b494d
                       |          0x7f4fafb4e54d
                       |
                       |--15.15%-- exaOffscreenAlloc
                       |
                       |--9.09%-- I830WaitLpRing

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
LKML-Reference: <1256246604-17156-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-10-23 07:55:18 +02:00
..
include perf tools: Add missing tools/perf/util/include/string.h 2009-10-20 02:59:34 +02:00
abspath.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
alias.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
cache.h perf tools: Do not manually count string lengths 2009-10-13 11:55:31 +02:00
callchain.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
callchain.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
color.c perf tools: Librarize trace_event() helper 2009-08-16 23:06:45 +02:00
color.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
config.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
ctype.c perf_counter tools: Add and use isprint() 2009-06-18 09:46:00 +02:00
data_map.c perf annotate: Use the sym_priv_size area for the histogram 2009-10-20 21:12:58 +02:00
data_map.h perf tools: Unify perf.data mapping and events handling 2009-10-08 16:56:32 +02:00
debug.c perf tools: Librarize trace_event() helper 2009-08-16 23:06:45 +02:00
debug.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
environment.c perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
event.h perf annotate: Use the sym_priv_size area for the histogram 2009-10-20 21:12:58 +02:00
exec_cmd.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
exec_cmd.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
generate-cmdlist.sh perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
header.c perf tools: Use DECLARE_BITMAP instead of an open-coded array 2009-10-19 09:26:35 +02:00
header.h perf tools: Use DECLARE_BITMAP instead of an open-coded array 2009-10-19 09:26:35 +02:00
help.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
help.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
hist.c perf tools: Move hist_entry__add common code to hist.c 2009-10-03 16:01:59 +02:00
hist.h perf tools: Move hist_entry__add common code to hist.c 2009-10-03 16:01:59 +02:00
levenshtein.c perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
levenshtein.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
map.c perf annotate: Use the sym_priv_size area for the histogram 2009-10-20 21:12:58 +02:00
pager.c perf_counter tools: Remove dead code 2009-06-27 06:06:39 +02:00
parse-events.c perf trace: Add filter Suppport 2009-10-15 11:35:23 +02:00
parse-events.h perf trace: Add filter Suppport 2009-10-15 11:35:23 +02:00
parse-options.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
parse-options.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
path.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
PERF-VERSION-GEN perf tools: Bump version to 0.0.2 2009-10-16 10:34:28 +02:00
quote.c perf: Fix read buffer overflow 2009-08-04 11:09:56 +02:00
quote.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
run-command.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
run-command.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
sigchain.c perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
sigchain.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
sort.c perf tools: Bind callchains to the first sort dimension column 2009-10-23 07:55:18 +02:00
sort.h perf tools: Bind callchains to the first sort dimension column 2009-10-23 07:55:18 +02:00
strbuf.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
strbuf.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
string.c perf tools: /proc/modules names don't always match its name 2009-10-05 20:35:23 +02:00
string.h perf tools: /proc/modules names don't always match its name 2009-10-05 20:35:23 +02:00
strlist.c strlist: Introduce strlist__entry and strlist__nr_entries methods 2009-07-11 19:20:25 +02:00
strlist.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
svghelper.c perf timechart: Improve the visual appearance of scheduler delays 2009-10-20 03:39:21 +02:00
svghelper.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
symbol.c perf annotate: Use the sym_priv_size area for the histogram 2009-10-20 21:12:58 +02:00
symbol.h perf annotate: Use the sym_priv_size area for the histogram 2009-10-20 21:12:58 +02:00
thread.c perf tools: Bind callchains to the first sort dimension column 2009-10-23 07:55:18 +02:00
thread.h perf tools: Bind callchains to the first sort dimension column 2009-10-23 07:55:18 +02:00
trace-event-info.c perf tools: Merge trace.info content into perf.data 2009-10-07 08:36:10 +02:00
trace-event-parse.c perf tools: Use strsep() over strtok_r() for parsing single line 2009-10-21 13:39:57 +02:00
trace-event-read.c perf tools: Merge trace.info content into perf.data 2009-10-07 08:36:10 +02:00
trace-event.h perf tools: Add latency format to trace output 2009-10-15 10:42:39 +02:00
types.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
usage.c perf top: Fall back to cpu-clock-tick hrtimer sampling if no cycle counter available 2009-06-07 17:31:52 +02:00
util.h Merge branch 'perfcounters/tracing' into perfcounters/core 2009-08-31 10:03:27 +02:00
values.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
values.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
wrapper.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00