linux/tools/perf
Namhyung Kim e049d4a3fa perf hists: Fix dynamic entry display in hierarchy
When dynamic sort key is used it might not show pretty printed output.
This is because the trace output was not set only for the first dynamic
sort key.  During hierarchy_insert_entry() it missed to pass the
trace_output to dynamic entries.  Also even if it did, only first entry
will have it.  Subsequent entries might set it during collapsing stage
but it's not guaranteed.

Before:

  $ perf report --hierarchy --stdio -s ptr,bytes_req,gfp_flags -g none
  #
  #       Overhead  ptr / bytes_req / gfp_flags
  # ..............  ..........................................
  #
      37.50%        0xffff8803f7669400
         37.50%        448
            37.50%        66080
      10.42%        0xffff8803f766be00
          8.33%        96
             8.33%        66080
          2.08%        512
             2.08%        67280

After:

  #
  #       Overhead  ptr / bytes_req / gfp_flags
  # ..............  ..........................................
  #
      37.50%        0xffff8803f7669400
         37.50%        448
            37.50%        GFP_ATOMIC|GFP_NOWARN|GFP_NOMEMALLOC
      10.42%        0xffff8803f766be00
          8.33%        96
             8.33%        GFP_ATOMIC|GFP_NOWARN|GFP_NOMEMALLOC
          2.08%        512
             2.08%        GFP_KERNEL|GFP_NOWARN|GFP_REPEAT|GFP

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-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-02-26 19:37:38 -03:00
..
arch perf tools: Rename parse_events__free_terms() to parse_events_terms__delete() 2016-02-12 17:09:17 -03:00
bench perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
config perf build: Add libcrypto feature detection 2016-02-05 09:46:45 -03:00
Documentation perf top: Add --hierarchy option 2016-02-24 20:21:15 -03:00
jvmti perf jvmti: improve error message in Makefile 2016-02-25 10:43:28 -03:00
python perf python: Support the PERF_RECORD_SWITCH event 2015-10-07 19:41:50 -03:00
scripts perf python scripting: Append examples to err msg about audit-libs-python 2016-02-12 11:30:27 -03:00
tests perf tools: Apply tracepoint event definition options to BPF script 2016-02-22 13:02:44 -03:00
trace/strace/groups perf trace: Add read/write to the file group 2015-09-04 13:22:06 -03:00
ui perf report: Left align dynamic entries in hierarchy 2016-02-26 18:37:06 -03:00
util perf hists: Fix dynamic entry display in hierarchy 2016-02-26 19:37:38 -03:00
.gitignore perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
Build perf tools: Set and pass DOCDIR to builtin-report.c 2016-01-12 12:42:07 -03:00
builtin-annotate.c perf hists: Introduce perf_evsel__output_resort function 2016-02-03 11:13:11 -03:00
builtin-bench.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-buildid-cache.c perf tools: Move timestamp creation to util 2016-01-29 17:30:06 -03:00
builtin-buildid-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-config.c perf config: Add '--system' and '--user' options to select which config file is used 2016-02-12 10:54:46 -03:00
builtin-data.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-diff.c perf diff: Use perf_hpp__register_sort_field interface 2016-01-08 12:59:30 -03:00
builtin-evlist.c perf evlist: Add --trace-fields option to show trace fields 2016-01-08 14:23:02 -03:00
builtin-help.c perf help: No need to use strbuf_remove() 2016-02-23 16:18:37 -03:00
builtin-inject.c perf inject: Add jitdump mmap injection support 2016-02-05 09:46:45 -03:00
builtin-kmem.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-kvm.c perf kvm/powerpc: Port perf kvm stat to powerpc 2016-01-29 17:49:54 -03:00
builtin-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-lock.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-mem.c perf mem: Introduce perf_mem_events__name function 2016-02-24 10:11:52 -03:00
builtin-probe.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-record.c perf record: Apply config to BPF objects before recording 2016-02-22 12:28:02 -03:00
builtin-report.c perf report: Add --hierarchy option 2016-02-24 20:21:15 -03:00
builtin-sched.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-script.c perf script: Remove duplicated code and needless script_spec__findnew() 2016-02-25 16:14:33 -03:00
builtin-stat.c perf stat: Bail out on unsupported event config modifiers 2016-02-19 19:12:49 -03:00
builtin-timechart.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-top.c perf top: Add --hierarchy option 2016-02-24 20:21:15 -03:00
builtin-trace.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-version.c perf tools: Move cmd_version() to builtin-version.c 2015-12-09 13:42:03 -03:00
builtin.h perf tools: Add 'perf config' command 2015-11-23 18:31:24 -03:00
command-list.txt perf tools: Do not show trace command if it's not compiled in 2016-01-08 12:46:17 -03:00
CREDITS
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
Makefile perf build tests: Do parallell builds with 'build-test' 2016-02-04 15:57:00 -03:00
Makefile.perf perf build: Add EXTRA_LDFLAGS option to makefile 2016-02-12 11:30:20 -03:00
MANIFEST perf tools: Add missing sources to perf's MANIFEST 2016-01-11 12:09:25 -03:00
perf-archive.sh
perf-completion.sh perf tools: Avoid confusion with preloaded bash function for perf bash completion 2015-03-19 13:53:27 -03:00
perf-read-vdso.c perf tools: Build programs to copy 32-bit compatibility 2014-10-29 10:32:48 -02:00
perf-sys.h perf tools: Move generic barriers out of perf-sys.h 2015-05-08 16:05:08 -03:00
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c perf tools: Use asprintf() for simple string formatting/allocation 2016-02-25 10:14:50 -03:00
perf.h perf record: Add --all-user/--all-kernel options 2016-02-18 10:48:44 -03:00