perf symbols: Don't try to find DSOs in SYSV maps
[deliverable/linux.git] / tools / perf / builtin-bench.c
index 1e6e77710545afc472eae5c0f5e5a63f5ec432d1..b9a56fa8333065271a9242e98cf052d9c8100b87 100644 (file)
@@ -104,9 +104,11 @@ static const char *bench_format_str;
 
 /* Output/formatting style, exported to benchmark modules: */
 int bench_format = BENCH_FORMAT_DEFAULT;
+unsigned int bench_repeat = 10; /* default number of times to repeat the run */
 
 static const struct option bench_options[] = {
        OPT_STRING('f', "format", &bench_format_str, "default", "Specify format style"),
+       OPT_UINTEGER('r', "repeat",  &bench_repeat,   "Specify amount of times to repeat the run"),
        OPT_END()
 };
 
@@ -226,6 +228,11 @@ int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused)
                goto end;
        }
 
+       if (bench_repeat == 0) {
+               printf("Invalid repeat option: Must specify a positive value\n");
+               goto end;
+       }
+
        if (argc < 1) {
                print_usage();
                goto end;
This page took 0.025826 seconds and 5 git commands to generate.