]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
perf script: Allow creating per-event dump files
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 26 Oct 2017 13:30:20 +0000 (10:30 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 27 Oct 2017 12:10:10 +0000 (09:10 -0300)
commita14390fde64e862c4fe8b92ecb293ee4b12d5bfe
tree736cf2a2e5ef26d6dc948578fdf444829aed9370
parente669e833da8d71a02e175dfffceaabc3eb010207
perf script: Allow creating per-event dump files

Introduce a new option to dump trace output to files named by the
monitored events and update perf-script documentation accordingly.

Shown below is output of perf script command with the newly introduced
option.

         $ perf record -e cycles -e cs -ag -- sleep 1
         $ perf script --per-event-dump
         $ ls
         perf.data.cycles.dump perf.data.cs.dump

Without per-event-dump support, drawing flamegraphs for different events
would require post processing to separate events. You can monitor only
one event at a time if you want to get flamegraphs for different events.
Using this option, you can get the trace output files named by the
monitored events, and could draw flamegraphs according to the event's
name.

Based-on-a-patch-by: yuzhoujian <yuzhoujian@didichuxing.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1508921599-10832-3-git-send-email-yuzhoujian@didichuxing.com
Link: http://lkml.kernel.org/n/tip-8ngzsjdhgiovkupl3r5yy570@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-script.txt
tools/perf/builtin-script.c