[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160420075406.GC25541@krava.redhat.com>
Date: Wed, 20 Apr 2016 09:54:06 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Wang Nan <wangnan0@...wei.com>
Cc: acme@...nel.org, linux-kernel@...r.kernel.org, pi3orama@....com,
Adrian Hunter <adrian.hunter@...el.com>,
Jiri Olsa <jolsa@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Zefan Li <lizefan@...wei.com>, He Kuang <hekuang@...wei.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH v5 2/6] perf record: Split output into multiple files via
'--switch-output'
On Mon, Apr 18, 2016 at 02:55:28PM +0000, Wang Nan wrote:
SNIP
> "Record build-id of all DSOs regardless of hits"),
> OPT_BOOLEAN(0, "timestamp-filename", &record.timestamp_filename,
> "append timestamp to output filename"),
> + OPT_BOOLEAN(0, "switch-output", &record.switch_output,
> + "Switch output when receive SIGUSR2"),
> OPT_END()
> };
>
> @@ -1413,10 +1440,13 @@ out_symbol_exit:
>
> static void snapshot_sig_handler(int sig __maybe_unused)
> {
> - if (!auxtrace_snapshot_is_ready())
> - return;
> - auxtrace_snapshot_toggle();
> - auxtrace_record__snapshot_started = 1;
> - if (auxtrace_record__snapshot_start(record.itr))
> - auxtrace_snapshot_error();
> + if (auxtrace_snapshot_is_ready()) {
> + auxtrace_snapshot_toggle();
> + auxtrace_record__snapshot_started = 1;
> + if (auxtrace_record__snapshot_start(record.itr))
> + auxtrace_snapshot_error();
Adrian,
I know it's out of the scope of this patchset, however
should auxtrace_record__snapshot_start call be in the
__cmd_record's loop path rather then in here in signal?
thanks,
jirka
Powered by blists - more mailing lists