[PATCH 1/2] perf bench numa: Make no args mean 'run all tests'

From: Arnaldo Carvalho de Melo
Date: Fri Mar 14 2014 - 13:24:47 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

If we call just:

perf bench numa mem

it will present the same output as:

perf bench numa mem -h

i.e. ask for instructions about what to run.

While that is kinda ok, using 'run all tests' as the default, i.e.
making 'no parms' be equivalent to:

perf bench numa mem -a

Will allow:

perf bench numa all

to actually do what is asked: i.e. run all the 'bench' tests, instead of
responding to that by asking what to do.

That, in turn, allows:

perf bench all

to actually complete, for the same reasons.

And after that, the tests that come after that, and that at some point
hit a NULL deref, will run, allowing me to reproduce a recently reported
problem.

That when you have the needed numa libraries, which wasn't the case for
the reporter, making me a bit confused after trying to reproduce his
report.

So make no parms mean -a.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Patrick Palka <patrick@xxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-x7h0ghx4pef4n0brywg21krk@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/bench/numa.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index d4c83c60b9b2..97d86d828190 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -1593,6 +1593,7 @@ static void init_params(struct params *p, const char *name, int argc, const char
p->data_rand_walk = true;
p->nr_loops = -1;
p->init_random = true;
+ p->run_all = argc == 1;
}

static int run_bench_numa(const char *name, const char **argv)
--
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/