diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-25 13:29:11 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-26 13:04:42 -0200 |
commit | ca59bcbceeb7fd412faa35871ec0bd21bdd69229 (patch) | |
tree | 0d83b6f0b28492a978eb7a5ecde93ec9a2e18258 /tools/perf/util/session.c | |
parent | 727ab04edbc4767711a7aeff5e00249b267ed4c1 (diff) | |
download | lwn-ca59bcbceeb7fd412faa35871ec0bd21bdd69229.tar.gz lwn-ca59bcbceeb7fd412faa35871ec0bd21bdd69229.zip |
perf ui progress: Reimplement using slang
Just another step in stopping the use of libnewt in perf.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vkb9jh5kkzl5ep3puoatd6an@git.kernel.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 | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 20e011c99a94..91c6442ef966 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1012,7 +1012,6 @@ int __perf_session__process_events(struct perf_session *session, { u64 head, page_offset, file_offset, file_pos, progress_next; int err, mmap_prot, mmap_flags, map_idx = 0; - struct ui_progress *progress; size_t page_size, mmap_size; char *buf, *mmaps[8]; union perf_event *event; @@ -1030,9 +1029,6 @@ int __perf_session__process_events(struct perf_session *session, file_size = data_offset + data_size; progress_next = file_size / 16; - progress = ui_progress__new("Processing events...", file_size); - if (progress == NULL) - return -1; mmap_size = session->mmap_window; if (mmap_size > file_size) @@ -1095,7 +1091,8 @@ more: if (file_pos >= progress_next) { progress_next += file_size / 16; - ui_progress__update(progress, file_pos); + ui_progress__update(file_pos, file_size, + "Processing events..."); } if (file_pos < file_size) @@ -1106,7 +1103,6 @@ more: session->ordered_samples.next_flush = ULLONG_MAX; flush_sample_queue(session, ops); out_err: - ui_progress__delete(progress); perf_session__warn_about_errors(session, ops); perf_session_free_sample_buffers(session); return err; |