perf record: Add '--timestamp-filename' option to append timestamp to output file...
authorWang Nan <wangnan0@huawei.com>
Wed, 13 Apr 2016 08:21:07 +0000 (08:21 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Apr 2016 12:00:39 +0000 (09:00 -0300)
commitecfd7a9c044e98fc3da8937e652080bc5abe7918
treee5ffe3e2f38414a6dc3bfd55ff9d965adb611a50
parentc0bdc1c461dd5b2e492c0746708a3e0da6b13515
perf record: Add '--timestamp-filename' option to append timestamp to output file name

This option appends current timestamp to the output file name.

For example:

  # perf record -a --timestamp-filename
  ^C[ perf record: Woken up 1 times to write data ]
  [ perf record: Dump perf.data.2015122622265847 ]
  [ perf record: Captured and wrote 0.742 MB perf.data.<timestamp> (90 samples) ]
  # ls
  perf.data.201512262226584

The timestamp will be useful for identifying each perf.data after the
'perf record' support for generating multiple output files gets
introduced.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1460535673-159866-5-git-send-email-wangnan0@huawei.com
Signed-off-by: He Kuang <hekuang@huawei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c