diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-10-14 16:15:10 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-10-14 16:15:10 -0400 |
commit | 2c3ddd954a0a826609fc28f9224af5945fc86952 (patch) | |
tree | bd3690e20075da2e0136d32c99267b518f85d830 | |
parent | 099a2dbde50bb23a0c22098c52c6143f9fb940d2 (diff) |
trace-cmd: Do not record all events twice in extract
If -a is set with trace-cmd extract, simply ignore it,
otherwise, all events will be recorded twice. Once at this location,
and once during extracting.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-record.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/trace-record.c b/trace-record.c index bf48e03..fcec28b 100644 --- a/trace-record.c +++ b/trace-record.c | |||
@@ -1962,9 +1962,10 @@ void trace_record (int argc, char **argv) | |||
1962 | usage(argv); | 1962 | usage(argv); |
1963 | break; | 1963 | break; |
1964 | case 'a': | 1964 | case 'a': |
1965 | record_all = 1; | 1965 | if (!extract) { |
1966 | record_all_events(); | 1966 | record_all = 1; |
1967 | 1967 | record_all_events(); | |
1968 | } | ||
1968 | break; | 1969 | break; |
1969 | case 'e': | 1970 | case 'e': |
1970 | if (extract) | 1971 | if (extract) |
@@ -2136,7 +2137,7 @@ void trace_record (int argc, char **argv) | |||
2136 | tracing_on_init_val = read_tracing_on(); | 2137 | tracing_on_init_val = read_tracing_on(); |
2137 | 2138 | ||
2138 | /* Extracting data records all events in the system. */ | 2139 | /* Extracting data records all events in the system. */ |
2139 | if (extract) | 2140 | if (extract && !record_all) |
2140 | record_all_events(); | 2141 | record_all_events(); |
2141 | 2142 | ||
2142 | if (event_selection) | 2143 | if (event_selection) |