Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932761AbcDTHyQ (ORCPT ); Wed, 20 Apr 2016 03:54:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34367 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752457AbcDTHyP (ORCPT ); Wed, 20 Apr 2016 03:54:15 -0400 Date: Wed, 20 Apr 2016 09:54:06 +0200 From: Jiri Olsa To: Wang Nan Cc: acme@kernel.org, linux-kernel@vger.kernel.org, pi3orama@163.com, Adrian Hunter , Jiri Olsa , Masami Hiramatsu , Namhyung Kim , Zefan Li , He Kuang , Arnaldo Carvalho de Melo Subject: Re: [PATCH v5 2/6] perf record: Split output into multiple files via '--switch-output' Message-ID: <20160420075406.GC25541@krava.redhat.com> References: <1460991332-185772-1-git-send-email-wangnan0@huawei.com> <1460991332-185772-3-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460991332-185772-3-git-send-email-wangnan0@huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1092 Lines: 35 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