[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160414235913.GK9056@kernel.org>
Date: Thu, 14 Apr 2016 20:59:13 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Wang Nan <wangnan0@...wei.com>
Cc: linux-kernel@...r.kernel.org, pi3orama@....com,
He Kuang <hekuang@...wei.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Jiri Olsa <jolsa@...nel.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Namhyung Kim <namhyung@...nel.org>,
Zefan Li <lizefan@...wei.com>
Subject: Re: [PATCH v2 2/6] perf record: Split output into multiple files via
'--switch-output'
Em Thu, Apr 14, 2016 at 02:22:01PM +0000, Wang Nan escreveu:
> Allow 'perf record' splits its output into multiple files.
>
> For example:
>
> # ~/perf record -a --timestamp-filename --switch-output &
> [1] 10763
> # kill -s SIGUSR2 10763
> [ perf record: dump data: Woken up 1 times ]
> # [ perf record: Dump perf.data.2015122622314468 ]
>
> # kill -s SIGUSR2 10763
> [ perf record: dump data: Woken up 1 times ]
> # [ perf record: Dump perf.data.2015122622314762 ]
>
> # kill -s SIGUSR2 10763
> [ perf record: dump data: Woken up 1 times ]
> #[ perf record: Dump perf.data.2015122622315171 ]
>
> # fg
> perf record -a --timestamp-filename --switch-output
> ^C[ perf record: Woken up 1 times to write data ]
> [ perf record: Dump perf.data.2015122622315513 ]
> [ perf record: Captured and wrote 0.014 MB perf.data.<timestamp> (296 samples) ]
Added this as an initial man page entry:
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 19aa17532a16..a77a431ca4ef 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -347,6 +347,14 @@ Configure all used events to run in kernel space.
--all-user::
Configure all used events to run in user space.
+--switch-output::
+Generate multiple perf.data files, timestamp prefixed, switching to a new one
+when receiving a SIGUSR2.
+
+A possible use case is to, given an external event, slice the perf.data file
+that gets then processed, possibly via a perf script, to decide if that
+particular perf.data snapshot should be kept or not.
+
SEE ALSO
--------
linkperf:perf-stat[1], linkperf:perf-list[1]
Powered by blists - more mailing lists