perf session: Separate progress bar update when processing events
authorJiri Olsa <jolsa@redhat.com>
Thu, 5 Sep 2013 09:14:50 +0000 (11:14 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 5 Sep 2013 19:19:02 +0000 (16:19 -0300)
commit526fd8d4f770d18e99680ff87965e16bb8f1d806
tree44429da06dafd36090000092e02be2e9cc0b4f44
parent41817815666e4a6f302dad1fea47cbe64cc45e40
perf session: Separate progress bar update when processing events

Currently when processing events in the __perf_session__process_events
function we update a progress bar based on the file_size. During the
same processing we update the progress bar from within
flush_sample_queue which is based on number of samples count.

Having 2 different based updates is causing the progress bar to jump
heavily back and forth giving not much usefull info.

Fixing this by keeping only __perf_session__process_events based
progress bar update. And turning on flush_sample_queue progress bar
update only for final flushing.

This reduces the number of time the progress bar update function is
called and it significantly reduces the loading time for TUI, where the
progress bar update takes quite a lot of time.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20130905091449.GC1100@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c