]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 22 Mar 2014 16:13:59 +0000 (09:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 22 Mar 2014 16:13:59 +0000 (09:13 -0700)
Pull perf fixes from Ingo Molnar:
 "Two oneliner 'perf bench' tooling fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf bench: Fix NULL pointer dereference in "perf bench all"
  perf bench numa: Make no args mean 'run all tests'

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)
 {