]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorIngo Molnar <mingo@kernel.org>
Tue, 18 Mar 2014 08:21:42 +0000 (09:21 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 18 Mar 2014 08:21:42 +0000 (09:21 +0100)
Pull two 'perf bench' fixes from Arnaldo:

  * Make 'perf bench mem' (i.e. no args) mean 'run all tests' so that we can run
    all tests, not stopping at the numa ones.  (Arnaldo Carvalho de Melo)

  * Fix NULL pointer dereference after last test in in "perf bench all" (Patrick Palka)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/perf/bench/numa.c
tools/perf/builtin-bench.c

index d4c83c60b9b29fa7d6249de70e5f0673d2066287..97d86d828190950af7f133c1b8be72550070d3d1 100644 (file)
@@ -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)
index e47f90cc7b98cdde57079975bbd5637f3249ce44..8a987d2527803ff71f10314152162b29d61b486a 100644 (file)
@@ -76,7 +76,7 @@ static struct collection collections[] = {
 
 /* Iterate over all benchmarks within a collection: */
 #define for_each_bench(coll, bench) \
-       for (bench = coll->benchmarks; bench->name; bench++)
+       for (bench = coll->benchmarks; bench && bench->name; bench++)
 
 static void dump_benchmarks(struct collection *coll)
 {