diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-06-25 01:42:24 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-06-25 01:42:24 -0400 |
commit | 06c654ca8b824e04f59f3f99d403494a140c181f (patch) | |
tree | 75c82621d95feab7b7e01e31e85bd7a95f7f28dc /tools/perf/builtin-bench.c | |
parent | 98d350cf7ae077eb8083ccc7c1bfc838344ac590 (diff) | |
parent | ecdac96899e3db3f428e4d2e978f25e3f8d35a6c (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
* Add --repeat global option to 'perf bench' to be used in benchmarks
such as the existing 'futex' one, that was modified to use it instead
of a local option. (Davidlohr Bueso)
* Fix fd -> pathname resolution in 'trace', be it using /proc or
a vfs_getname probe point. (Arnaldo Carvalho de Melo)
* Add suggestion of how to set perf_event_paranoid sysctl, to help
non-root users trying tools like 'trace' to get a working environment.
(Arnaldo Carvalho de Melo)
Fixes:
* Fix memory leak in the 'sched-messaging' perf bench test. (Davidlohr Bueso)
* The -o and -n 'perf bench mem' options are mutually exclusive, emit error
when both are specified. (Davidlohr Bueso)
* Fix scrollbar refresh row index in the ui browser, problem exposed now
that headers will be added and will be allowed to be switched on/off.
(Jiri Olsa)
Cleanups:
* Remove needless reassignments in 'trace' (Arnaldo Carvalho de Melo)
* Cache the is_exit syscall test in 'trace) (Arnaldo Carvalho de Melo)
* No need to reimplement err() in 'perf bench sched-messaging', drop barf().
(Davidlohr Bueso).
* Remove ev_name argument from perf_evsel__hists_browse, can be obtained
from the other parameters. (Jiri Olsa)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-bench.c')
-rw-r--r-- | tools/perf/builtin-bench.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c index 1e6e77710545..b9a56fa83330 100644 --- a/tools/perf/builtin-bench.c +++ b/tools/perf/builtin-bench.c | |||
@@ -104,9 +104,11 @@ static const char *bench_format_str; | |||
104 | 104 | ||
105 | /* Output/formatting style, exported to benchmark modules: */ | 105 | /* Output/formatting style, exported to benchmark modules: */ |
106 | int bench_format = BENCH_FORMAT_DEFAULT; | 106 | int bench_format = BENCH_FORMAT_DEFAULT; |
107 | unsigned int bench_repeat = 10; /* default number of times to repeat the run */ | ||
107 | 108 | ||
108 | static const struct option bench_options[] = { | 109 | static const struct option bench_options[] = { |
109 | OPT_STRING('f', "format", &bench_format_str, "default", "Specify format style"), | 110 | OPT_STRING('f', "format", &bench_format_str, "default", "Specify format style"), |
111 | OPT_UINTEGER('r', "repeat", &bench_repeat, "Specify amount of times to repeat the run"), | ||
110 | OPT_END() | 112 | OPT_END() |
111 | }; | 113 | }; |
112 | 114 | ||
@@ -226,6 +228,11 @@ int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused) | |||
226 | goto end; | 228 | goto end; |
227 | } | 229 | } |
228 | 230 | ||
231 | if (bench_repeat == 0) { | ||
232 | printf("Invalid repeat option: Must specify a positive value\n"); | ||
233 | goto end; | ||
234 | } | ||
235 | |||
229 | if (argc < 1) { | 236 | if (argc < 1) { |
230 | print_usage(); | 237 | print_usage(); |
231 | goto end; | 238 | goto end; |