Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751382AbbEZG6f (ORCPT ); Tue, 26 May 2015 02:58:35 -0400 Received: from [133.145.228.44] ([133.145.228.44]:60431 "EHLO mail9.hitachi.co.jp" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751320AbbEZG6b (ORCPT ); Tue, 26 May 2015 02:58:31 -0400 X-AuditID: 85900ec0-9d7c9b9000001a57-a2-55641974959f Subject: [PATCH trace-cmd V6 1/7] trace-cmd: Support -N option for trace-cmd extract From: Masami Hiramatsu To: Steven Rostedt Cc: Yoshihiro YUNOMAE , Aaron Fabbri , linux-kernel@vger.kernel.org, cti.systems-productivity-manager.ts@hitachi.com, Divya Vyas , Hidehiro Kawai , yoshihiro.yunomae@aktsk.jp Date: Tue, 26 May 2015 15:55:24 +0900 Message-ID: <20150526065524.16023.68225.stgit@localhost.localdomain> In-Reply-To: <20150526065522.16023.30813.stgit@localhost.localdomain> References: <20150526065522.16023.30813.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1642 Lines: 51 From: Yoshihiro YUNOMAE There is no reason to prohibit supporting -N command in extract mode, since both record and extract read trace logs from ftrace and save it. Signed-off-by: Yoshihiro YUNOMAE Signed-off-by: Masami Hiramatsu --- trace-record.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trace-record.c b/trace-record.c index 9874a12..c387aff 100644 --- a/trace-record.c +++ b/trace-record.c @@ -520,6 +520,7 @@ static void stop_threads(enum trace_type type) static int create_recorder(struct buffer_instance *instance, int cpu, enum trace_type type, int *brass); +static void setup_network(void); static void flush_threads(void) { @@ -529,6 +530,9 @@ static void flush_threads(void) if (!cpu_count) return; + if (host) + setup_network(); + for (i = 0; i < cpu_count; i++) { /* Extract doesn't support sub buffers yet */ ret = create_recorder(&top_instance, i, TRACE_TYPE_EXTRACT, NULL); @@ -4047,8 +4051,8 @@ void trace_record (int argc, char **argv) rt_prio = atoi(optarg); break; case 'N': - if (!record) - die("-N only available with record"); + if (!record && !extract) + die("-N only available with record or extract"); if (output) die("-N incompatible with -o"); host = optarg; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/