perf report: Left align dynamic entries in hierarchy
authorNamhyung Kim <namhyung@kernel.org>
Fri, 26 Feb 2016 18:52:45 +0000 (03:52 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Feb 2016 21:37:06 +0000 (18:37 -0300)
commitcb1fab917206f822d1f905cbc45971eefdef361d
tree89424867efd2f449f0117925be29643da988015d
parentd3a72fd8187b7fa0014394c9dec95ba349b3301e
perf report: Left align dynamic entries in hierarchy

The dynamic entries are right-aligned unlike other entries since it
usually has numeric value.  But for the hierarchy mode, left alignment
is more appropriate IMHO.  Also trim spaces on the left so that we can
easily identify the hierarchy.

Before:

  $ perf report --hierarchy -i perf.data.kmem -s gfp_flags,ptr,bytes_req --stdio -g none
  ...
  #
  #       Overhead                                        gfp_flags /                ptr /          bytes_req
  # ..............  .................................................................................................
  #
      91.67%                   GFP_ATOMIC|GFP_NOWARN|GFP_NOMEMALLOC
         37.50%        0xffff8803f7669400
            37.50%                       448
          8.33%        0xffff8803f766be00
             8.33%                        96
          4.17%        0xffff8800d156dc00
             4.17%                       704

After:

  #       Overhead  gfp_flags / ptr / bytes_req
  # ..............  ....................................
  #
      91.67%        GFP_ATOMIC|GFP_NOWARN|GFP_NOMEMALLOC
         37.50%        0xffff8803f7669400
            37.50%        448
          8.33%        0xffff8803f766be00
             8.33%        96
          4.17%        0xffff8800d156dc00
             4.17%        704

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1456512767-1164-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c
tools/perf/ui/stdio/hist.c