summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-08-03 00:41:12 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-08-07 20:35:29 (GMT)
commit2bbf03f16a634f675c49c473b2b6528571990aea (patch)
treeed2519b8cb4cf3afd82c55102552c6d3cf590792 /tools
parent411916880ff4061ac0491a154f10af4d49a0c61a (diff)
downloadlinux-2bbf03f16a634f675c49c473b2b6528571990aea.tar.xz
perf stat: Flush output after each line in interval mode
When interval mode is outputting to a pipe, each measurement should be flushed individually, so that the reader sees it timely. With a terminal each line is automatically flushed by stdio, but that is disabled with non terminal output. Simply fflush output after each time interval Signed-off-by: Andi Kleen <ak@linux.intel.com> Reviewed-by: Jiri Olsa <jolsa@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1375490473-1503-5-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-stat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 2e637e4..f686d5f 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -416,6 +416,8 @@ static void print_interval(void)
list_for_each_entry(counter, &evsel_list->entries, node)
print_counter_aggr(counter, prefix);
}
+
+ fflush(output);
}
static void handle_initial_delay(void)