perf stat: Flush output after each line in interval mode
authorAndi Kleen <ak@linux.intel.com>
Sat, 3 Aug 2013 00:41:12 +0000 (17:41 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 7 Aug 2013 20:35:29 +0000 (17:35 -0300)
commit2bbf03f16a634f675c49c473b2b6528571990aea
treeed2519b8cb4cf3afd82c55102552c6d3cf590792
parent411916880ff4061ac0491a154f10af4d49a0c61a
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>
tools/perf/builtin-stat.c