diff options
Diffstat (limited to 'tools/perf/builtin-bench.c')
-rw-r--r-- | tools/perf/builtin-bench.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c index d0895162c2ba..334ab897aae3 100644 --- a/tools/perf/builtin-bench.c +++ b/tools/perf/builtin-bench.c @@ -92,6 +92,13 @@ static struct bench internals_benchmarks[] = { { NULL, NULL, NULL } }; +static struct bench breakpoint_benchmarks[] = { + { "thread", "Benchmark thread start/finish with breakpoints", bench_breakpoint_thread}, + { "enable", "Benchmark breakpoint enable/disable", bench_breakpoint_enable}, + { "all", "Run all breakpoint benchmarks", NULL}, + { NULL, NULL, NULL }, +}; + struct collection { const char *name; const char *summary; @@ -110,6 +117,7 @@ static struct collection collections[] = { {"epoll", "Epoll stressing benchmarks", epoll_benchmarks }, #endif { "internals", "Perf-internals benchmarks", internals_benchmarks }, + { "breakpoint", "Breakpoint benchmarks", breakpoint_benchmarks }, { "all", "All benchmarks", NULL }, { NULL, NULL, NULL } }; @@ -226,7 +234,6 @@ static void run_collection(struct collection *coll) if (!bench->fn) break; printf("# Running %s/%s benchmark...\n", coll->name, bench->name); - fflush(stdout); argv[1] = bench->name; run_bench(coll->name, bench->name, bench->fn, 1, argv); @@ -247,6 +254,9 @@ int cmd_bench(int argc, const char **argv) struct collection *coll; int ret = 0; + /* Unbuffered output */ + setvbuf(stdout, NULL, _IONBF, 0); + if (argc < 2) { /* No collection specified. */ print_usage(); @@ -300,7 +310,6 @@ int cmd_bench(int argc, const char **argv) if (bench_format == BENCH_FORMAT_DEFAULT) printf("# Running '%s/%s' benchmark:\n", coll->name, bench->name); - fflush(stdout); ret = run_bench(coll->name, bench->name, bench->fn, argc-1, argv+1); goto end; } |