diff options
author | Namhyung Kim <[email protected]> | 2013-01-08 18:39:26 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-01-24 16:40:19 -0300 |
commit | 9b494ea2f5638184bc203a30062b32b9a9a05d9e (patch) | |
tree | 0ddbaa8913c7ae232a938f39bed3abd00bb0bb83 /tools/perf/scripts/python/sctop.py | |
parent | eec185ab603fab3b7b5021e840cf4b282c4c7e6b (diff) |
perf bench: Flush stdout before starting bench suite
perf bench prints header message for bench suite before starting the
benchmark. However if the stdout is redirected to a file and bench
suite forks child processes this (and possibly other debugging
messages too) will be repeated multiple times.
$ perf bench sched messaging
# Running sched/messaging benchmark...
# 20 sender and receiver processes per group
# 10 groups == 400 processes run
Total time: 0.100 [sec]
$ perf bench sched messaging > result.txt
$ wc -l result.txt
391
In this file, there were so many "Running sched/messaging benchmark..."
lines. This was because stdout is converted to fully-buffered due to
the redirection and inherited child processes. Other lines are printed
after reaping all those tasks.
So fix it by flushing stdout before starting bench suites.
Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Hitoshi Mitake <[email protected]>
Cc: Hitoshi Mitake <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions