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:	Sun,  8 Sep 2013 19:19:17 -0700
From:	Davidlohr Bueso <davidlohr@...com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Hitoshi Mitake <mitake@....info.waseda.ac.jp>,
	Aswin Chandramouleeswaran <aswin@...com>,
	linux-kernel@...r.kernel.org, Davidlohr Bueso <davidlohr@...com>
Subject: [PATCH 5/7] perf lock: do not cut lock name

While this could be seen as personal taste, there really isn't any
reason for being so stingy printing the lock name. Furthermore, some
symbol names are really just too long, and cutting them at 16 characters
doesn't help at all.

Signed-off-by: Davidlohr Bueso <davidlohr@...com>
---
 tools/perf/builtin-lock.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 780484f..2674a42 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -696,10 +696,9 @@ static void print_bad_events(int bad, int total)
 static void print_result(void)
 {
 	struct lock_stat *st;
-	char cut_name[20];
 	int bad, total;
 
-	pr_info("%20s ", "Name");
+	pr_info("%40s ", "Name");
 	pr_info("%10s ", "acquired");
 	pr_info("%10s ", "contended");
 
@@ -716,21 +715,8 @@ static void print_result(void)
 			bad++;
 			continue;
 		}
-		bzero(cut_name, 20);
-
-		if (strlen(st->name) < 16) {
-			/* output raw name */
-			pr_info("%20s ", st->name);
-		} else {
-			strncpy(cut_name, st->name, 16);
-			cut_name[16] = '.';
-			cut_name[17] = '.';
-			cut_name[18] = '.';
-			cut_name[19] = '\0';
-			/* cut off name for saving output style */
-			pr_info("%20s ", cut_name);
-		}
 
+		pr_info("%40s ", st->name);
 		pr_info("%10u ", st->nr_acquired);
 		pr_info("%10u ", st->nr_contended);
 
-- 
1.7.11.7

--
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