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:	Tue, 10 Nov 2009 04:58:12 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>
Subject: Re: [PATCH v2 0/4] perf bench: Common option for specifying style
 formatting


* Hitoshi Mitake <mitake@....info.waseda.ac.jp> wrote:

> This patch series adds new option "--format" to
> bench subcommand of perf.
> 
> Users of perf bench will be able to specify
> style formatting with this option in common way.
> 
> Hitoshi Mitake (4):
>   perf bench: Add stuffs to bench.h for unified output formatting
>   perf bench: Modify builtin-bench.c for processing common options
>   perf bench: Modified bench/bench-messaging.c to adopt unified output
>     formatting
>   perf bench: Modify builtin-pipe.c for processing common options
> 
>  tools/perf/bench/bench.h           |    9 ++++
>  tools/perf/bench/sched-messaging.c |   18 +++++---
>  tools/perf/bench/sched-pipe.c      |   22 ++++++----
>  tools/perf/builtin-bench.c         |   79 +++++++++++++++++++++++++++++------
>  4 files changed, 99 insertions(+), 29 deletions(-)

Very nice, applied to tip:perf/bench, thanks!

A (very) small detail about initializers in bench.h:

 - No need to break the line for function prototypes, they are more
   readable in a single line. (even if checkpatch complains about it)

 - We try to align definitions / structure fields vertically, to make it 
   all a bit more readable.

Something like the (untested) cleanup patch below. (Just put it into 
your next batch of commits.)

Thanks,

	Ingo

---
 tools/perf/bench/bench.h |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

Index: tip/tools/perf/bench/bench.h
===================================================================
--- tip.orig/tools/perf/bench/bench.h
+++ tip/tools/perf/bench/bench.h
@@ -1,17 +1,15 @@
 #ifndef BENCH_H
 #define BENCH_H
 
-extern int bench_sched_messaging(int argc, const char **argv,
-				 const char *prefix);
-extern int bench_sched_pipe(int argc, const char **argv,
-			    const char *prefix);
+extern int bench_sched_messaging(int argc, const char **argv, const char *prefix);
+extern int bench_sched_pipe(int argc, const char **argv, const char *prefix);
 
-#define BENCH_FORMAT_DEFAULT_STR "default"
-#define BENCH_FORMAT_DEFAULT 0
-#define BENCH_FORMAT_SIMPLE_STR "simple"
-#define BENCH_FORMAT_SIMPLE 1
+#define BENCH_FORMAT_DEFAULT_STR	"default"
+#define BENCH_FORMAT_DEFAULT		0
+#define BENCH_FORMAT_SIMPLE_STR		"simple"
+#define BENCH_FORMAT_SIMPLE		1
 
-#define BENCH_FORMAT_UNKNOWN -1
+#define BENCH_FORMAT_UNKNOWN		-1
 
 extern int bench_format;
 
--
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