lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Mar 2011 10:39:34 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/3 V2]trace-cmd: remove dead code


filter_cpu related code is totally dead.

Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
 trace-read.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/trace-read.c b/trace-read.c
index 0e9ced8..88b576f 100644
--- a/trace-read.c
+++ b/trace-read.c
@@ -73,7 +73,6 @@ static const char *input_file;
 static int multi_inputs;
 static int max_file_size;
 
-static int filter_cpu = -1;
 static int *filter_cpus;
 static int nr_filter_cpus;
 
@@ -601,7 +600,7 @@ get_next_record(struct handle_list *handles, int *next_cpu)
 	do {
 		next = -1;
 		ts = 0;
-		if (filter_cpus) {
+		if (nr_filter_cpus > 1) {
 			unsigned long long last_stamp = 0;
 			struct record *precord;
 			int next_cpu = -1;
@@ -619,9 +618,8 @@ get_next_record(struct handle_list *handles, int *next_cpu)
 				record = tracecmd_read_data(handles->handle, next_cpu);
 			else
 				record = NULL;
-
-		} else if (filter_cpu >= 0) {
-			cpu = filter_cpu;
+               } else if (nr_filter_cpus == 1) {
+			cpu = filter_cpus[0];
 			record = tracecmd_read_data(handles->handle, cpu);
 		} else
 			record = tracecmd_read_next_data(handles->handle, &cpu);
@@ -963,10 +961,7 @@ void trace_report (int argc, char **argv)
 		case 0:
 			switch(option_index) {
 			case 0: /* cpu */
-				if (filter_cpu)
-					add_cpu(optarg);
-				else
-					filter_cpu = atoi(optarg);
+				add_cpu(optarg);
 				break;
 			case 1: /* events */
 				print_events = 1;
-- 
1.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ