2009-11-03 04:36:46

by Hitoshi Mitake

[permalink] [raw]
Subject: [RFC][PATCH 2/7] Adding general performance benchmarking subsystem to perf.


Adding general performance benchmarking subsystem to perf.
This patch add new file: bench-suite.h

bench-suite.h contains prototypes of benchmark suite functions.

Signed-off-by: Hitoshi Mitake <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
---
tools/perf/bench-suite.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 tools/perf/bench-suite.h

diff --git a/tools/perf/bench-suite.h b/tools/perf/bench-suite.h
new file mode 100644
index 0000000..65f6f55
--- /dev/null
+++ b/tools/perf/bench-suite.h
@@ -0,0 +1,7 @@
+#ifndef BENCH_SUITE_H
+#define BENCH_SUITE_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);
+
+#endif
--
1.5.6.5


2009-11-03 07:35:18

by Ingo Molnar

[permalink] [raw]
Subject: Re: [RFC][PATCH 2/7] Adding general performance benchmarking subsystem to perf.


* Hitoshi Mitake <[email protected]> wrote:

>
> Adding general performance benchmarking subsystem to perf.
> This patch add new file: bench-suite.h
>
> bench-suite.h contains prototypes of benchmark suite functions.
>
> Signed-off-by: Hitoshi Mitake <[email protected]>
> Cc: Rusty Russell <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Peter Zijlstra <[email protected]>
> Cc: Mike Galbraith <[email protected]>
> ---
> tools/perf/bench-suite.h | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
> create mode 100644 tools/perf/bench-suite.h
>
> diff --git a/tools/perf/bench-suite.h b/tools/perf/bench-suite.h
> new file mode 100644
> index 0000000..65f6f55
> --- /dev/null
> +++ b/tools/perf/bench-suite.h
> @@ -0,0 +1,7 @@
> +#ifndef BENCH_SUITE_H
> +#define BENCH_SUITE_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);
> +
> +#endif

Please put new headers into tools/*.h.

Also, could we name it bench.h? It's a bit shorter :)

Ingo

2009-11-03 07:48:09

by Ingo Molnar

[permalink] [raw]
Subject: Re: [RFC][PATCH 2/7] Adding general performance benchmarking subsystem to perf.


* Ingo Molnar <[email protected]> wrote:

>
> * Hitoshi Mitake <[email protected]> wrote:
>
> >
> > Adding general performance benchmarking subsystem to perf.
> > This patch add new file: bench-suite.h
> >
> > bench-suite.h contains prototypes of benchmark suite functions.
> >
> > Signed-off-by: Hitoshi Mitake <[email protected]>
> > Cc: Rusty Russell <[email protected]>
> > Cc: Thomas Gleixner <[email protected]>
> > Cc: Peter Zijlstra <[email protected]>
> > Cc: Mike Galbraith <[email protected]>
> > ---
> > tools/perf/bench-suite.h | 7 +++++++
> > 1 files changed, 7 insertions(+), 0 deletions(-)
> > create mode 100644 tools/perf/bench-suite.h
> >
> > diff --git a/tools/perf/bench-suite.h b/tools/perf/bench-suite.h
> > new file mode 100644
> > index 0000000..65f6f55
> > --- /dev/null
> > +++ b/tools/perf/bench-suite.h
> > @@ -0,0 +1,7 @@
> > +#ifndef BENCH_SUITE_H
> > +#define BENCH_SUITE_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);
> > +
> > +#endif
>
> Please put new headers into tools/*.h.
>
> Also, could we name it bench.h? It's a bit shorter :)

As per my later mail, maybe the better place for this header would be
tools/perf/bench/bench.h. That makes the addition of new benchmark
modules rather self-sufficient.

Ingo