mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
9e1a7ea19f
After this patch, 'perf data convert' convert comm events to output CTF stream. Result: # perf record -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.378 MB perf.data (73 samples) ] # perf data convert --to-ctf ./out.ctf [ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ] [ perf data convert: Converted and wrote 0.003 MB (73 samples) ] # babeltrace --clock-seconds ./out.ctf/ [10627.402515791] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 } [10627.402518972] (+0.000003181) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 } ... // only sample event is converted # perf data convert --all --to-ctf ./out.ctf [ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ] [ perf data convert: Converted and wrote 0.023 MB (73 samples, 384 non-samples) ] # babeltrace --clock-seconds ./out.ctf/ [ 0.000000000] (+?.?????????) perf_comm: { cpu_id = 0 }, { pid = 1, tid = 1, comm = "init" } [ 0.000000000] (+0.000000000) perf_comm: { cpu_id = 0 }, { pid = 2, tid = 2, comm = "kthreadd" } [ 0.000000000] (+0.000000000) perf_comm: { cpu_id = 0 }, { pid = 3, tid = 3, comm = "ksoftirqd/0" } ... // comm events are converted [10627.402515791] (+10627.402515791) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 } [10627.402518972] (+0.000003181) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 } ... // samples are also converted Signed-off-by: Wang Nan <wangnan0@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1466767332-114472-7-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
45 lines
934 B
Plaintext
45 lines
934 B
Plaintext
perf-data(1)
|
|
==============
|
|
|
|
NAME
|
|
----
|
|
perf-data - Data file related processing
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[verse]
|
|
'perf data' [<common options>] <command> [<options>]",
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
Data file related processing.
|
|
|
|
COMMANDS
|
|
--------
|
|
convert::
|
|
Converts perf data file into another format (only CTF [1] format is support by now).
|
|
It's possible to set data-convert debug variable to get debug messages from conversion,
|
|
like:
|
|
perf --debug data-convert data convert ...
|
|
|
|
OPTIONS for 'convert'
|
|
---------------------
|
|
--to-ctf::
|
|
Triggers the CTF conversion, specify the path of CTF data directory.
|
|
|
|
-i::
|
|
Specify input perf data file path.
|
|
|
|
-v::
|
|
--verbose::
|
|
Be more verbose (show counter open errors, etc).
|
|
|
|
--all::
|
|
Convert all events, including non-sample events (comm, fork, ...), to output.
|
|
Default is off, only convert samples.
|
|
|
|
SEE ALSO
|
|
--------
|
|
linkperf:perf[1]
|
|
[1] Common Trace Format - http://www.efficios.com/ctf
|