lkml.org 
[lkml]   [2014]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH trace-cmd V5 1/6] trace-cmd: Support -N option for trace-cmd extract
From
Date
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: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
---
trace-record.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/trace-record.c b/trace-record.c
index 3e5def2..a3a07e1 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -390,6 +390,7 @@ static void stop_threads(void)
}
}

+static void setup_network(void);
static int create_recorder(struct buffer_instance *instance, int cpu, int extract);

static void flush_threads(void)
@@ -400,6 +401,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, 1);
@@ -2987,8 +2991,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;



\
 
 \ /
  Last update: 2014-12-22 11:21    [W:0.082 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site