diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-03-27 01:16:22 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-04-02 21:27:55 +0200 |
commit | 5f4d3f8816461300ce54505c9117bf85b3044aa0 (patch) | |
tree | b69a6f22792480ab1ee02c67e5f8a650d66f208d /tools/perf/util/session.c | |
parent | perf symbols: map_groups__find_symbol must return the map too (diff) | |
download | linux-5f4d3f8816461300ce54505c9117bf85b3044aa0.tar.xz linux-5f4d3f8816461300ce54505c9117bf85b3044aa0.zip |
perf report: Add progress bars
For when we are processing the events and inserting the entries in the
browser.
Experimentation here: naming "ui_something" we may be treading into
creating a TUI/GUI set of routines that can then be implemented in terms
of multiple backends.
Also the time it takes for adding things to the "browser" takes, visually
(I guess I should do some profiling here ;-) ), more time than for
processing the events...
That means we probably need to create a custom hist_entry browser, so
that we reuse the structures we have in place instead of duplicating
them in newt.
But progress was made and at least we can see something while long files
are being loaded, that must be one of UI 101 bullet points :-)
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 76b4ac689df9..32765cdca058 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -397,6 +397,10 @@ int __perf_session__process_events(struct perf_session *self, event_t *event; uint32_t size; char *buf; + struct ui_progress *progress = ui_progress__new("Processing events...", + self->size); + if (progress == NULL) + return -1; perf_event_ops__fill_defaults(ops); @@ -425,6 +429,7 @@ remap: more: event = (event_t *)(buf + head); + ui_progress__update(progress, offset); if (self->header.needs_swap) perf_event_header__bswap(&event->header); @@ -475,6 +480,7 @@ more: done: err = 0; out_err: + ui_progress__delete(progress); return err; } |