diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2011-03-10 04:57:56 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-03-10 09:56:23 -0500 |
commit | 49dce72f8d2f9416a7c0b01a3d3727e59cf91e32 (patch) | |
tree | eab3107d59056d5f376ed6116feb444bb9d51f80 | |
parent | 398c59809949b518e28f307d86aea02970170f62 (diff) |
trace-cmd: Remove single use cpu code (use multi for all)
Remove the single use "filter_cpu" code and have one or multiple
filtered cpus use the same code.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4D78A0A4.1040001@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-read.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/trace-read.c b/trace-read.c index 0e9ced8..1cd9bd3 100644 --- a/trace-read.c +++ b/trace-read.c | |||
@@ -73,7 +73,6 @@ static const char *input_file; | |||
73 | static int multi_inputs; | 73 | static int multi_inputs; |
74 | static int max_file_size; | 74 | static int max_file_size; |
75 | 75 | ||
76 | static int filter_cpu = -1; | ||
77 | static int *filter_cpus; | 76 | static int *filter_cpus; |
78 | static int nr_filter_cpus; | 77 | static int nr_filter_cpus; |
79 | 78 | ||
@@ -619,10 +618,6 @@ get_next_record(struct handle_list *handles, int *next_cpu) | |||
619 | record = tracecmd_read_data(handles->handle, next_cpu); | 618 | record = tracecmd_read_data(handles->handle, next_cpu); |
620 | else | 619 | else |
621 | record = NULL; | 620 | record = NULL; |
622 | |||
623 | } else if (filter_cpu >= 0) { | ||
624 | cpu = filter_cpu; | ||
625 | record = tracecmd_read_data(handles->handle, cpu); | ||
626 | } else | 621 | } else |
627 | record = tracecmd_read_next_data(handles->handle, &cpu); | 622 | record = tracecmd_read_next_data(handles->handle, &cpu); |
628 | 623 | ||
@@ -963,10 +958,7 @@ void trace_report (int argc, char **argv) | |||
963 | case 0: | 958 | case 0: |
964 | switch(option_index) { | 959 | switch(option_index) { |
965 | case 0: /* cpu */ | 960 | case 0: /* cpu */ |
966 | if (filter_cpu) | 961 | add_cpu(optarg); |
967 | add_cpu(optarg); | ||
968 | else | ||
969 | filter_cpu = atoi(optarg); | ||
970 | break; | 962 | break; |
971 | case 1: /* events */ | 963 | case 1: /* events */ |
972 | print_events = 1; | 964 | print_events = 1; |