Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383129

Re: [PATCH v5 2/6] perf record: Split output into multiple files via '--switch-output'

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 2/6] perf record: Split output into multiple files via '--switch-output'
Date 2016-04-20 10:00 +0200
Message-ID <rpVdg-4bE-17@gated-at.bofh.it> (permalink)
References <rpiOB-7ii-3@gated-at.bofh.it> <rpiOB-7ii-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v5 2/6] perf record: Split output into multiple files via '--switch-output' Wang Nan <wangnan0@huawei.com> - 2016-04-18 17:00 +0200
  Re: [PATCH v5 2/6] perf record: Split output into multiple files via  '--switch-output' Jiri Olsa <jolsa@redhat.com> - 2016-04-20 10:00 +0200

csiph-web