* [PATCH 2/2] tools perf: Add a new benchmark tool for semaphore/mutex
@ 2012-04-16 8:34 Chen, Dennis (SRDC SW)
2012-04-16 9:22 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Chen, Dennis (SRDC SW) @ 2012-04-16 8:34 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar, paulmck@linux.vnet.ibm.com, peterz@infradead.org,
Paul Mackerras, Arnaldo Carvalho de Melo
A new performance benchmark tool for semaphore or mutex lock.
Signed-off-by: Dennis Chen <dennis1.chen@amd.com>
---
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index fcb9626..354a133 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -58,6 +58,16 @@ static struct bench_suite mem_suites[] = {
NULL }
};
+static struct bench_suite lock_suites[] = {
+ { "mutex",
+ "Simple performance measurement for semaphore/mutex lock",
+ bench_lock_mutex },
+ suite_all,
+ { NULL,
+ NULL,
+ NULL }
+};
+
struct bench_subsys {
const char *name;
const char *summary;
@@ -71,6 +81,9 @@ static struct bench_subsys subsystems[] = {
{ "mem",
"memory access performance",
mem_suites },
+ { "locking",
+ "lock method performance",
+ lock_suites },
{ "all", /* sentinel: easy for help */
"test all subsystem (pseudo subsystem)",
NULL },
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 8a4b9bc..a947396 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -363,6 +363,7 @@ ifeq ($(RAW_ARCH),x86_64)
BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy-x86-64-asm.o
endif
BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o
+BUILTIN_OBJS += $(OUTPUT)bench/lock-mutex.o
BUILTIN_OBJS += $(OUTPUT)builtin-diff.o
BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
index f7781c6..57f1170 100644
--- a/tools/perf/bench/bench.h
+++ b/tools/perf/bench/bench.h
@@ -4,6 +4,8 @@
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_mem_memcpy(int argc, const char **argv, const char *prefix __used);
+extern int bench_lock_mutex(int argc, const char **argv,
+ const char *prefix __used);
#define BENCH_FORMAT_DEFAULT_STR "default"
#define BENCH_FORMAT_DEFAULT 0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] tools perf: Add a new benchmark tool for semaphore/mutex
2012-04-16 8:34 [PATCH 2/2] tools perf: Add a new benchmark tool for semaphore/mutex Chen, Dennis (SRDC SW)
@ 2012-04-16 9:22 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2012-04-16 9:22 UTC (permalink / raw)
To: Chen, Dennis (SRDC SW)
Cc: linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com,
peterz@infradead.org, Paul Mackerras, Arnaldo Carvalho de Melo
* Chen, Dennis (SRDC SW) <Dennis1.Chen@amd.com> wrote:
> A new performance benchmark tool for semaphore or mutex lock.
it would be very useful to paste the output of the tool into the
changelog, to explain why we want it, to explain how it should
be used - in addition to explaining (on a high level) how it's
implemented, what its assumptions are, etc. etc.
A oneliner changelog is really not adequate.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-16 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 8:34 [PATCH 2/2] tools perf: Add a new benchmark tool for semaphore/mutex Chen, Dennis (SRDC SW)
2012-04-16 9:22 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox