aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-10-25 11:29:11 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-10-26 11:04:42 -0400
commitca59bcbceeb7fd412faa35871ec0bd21bdd69229 (patch)
tree0d83b6f0b28492a978eb7a5ecde93ec9a2e18258 /tools/perf/util/session.c
parent727ab04edbc4767711a7aeff5e00249b267ed4c1 (diff)
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.c8
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,
1012{ 1012{
1013 u64 head, page_offset, file_offset, file_pos, progress_next; 1013 u64 head, page_offset, file_offset, file_pos, progress_next;
1014 int err, mmap_prot, mmap_flags, map_idx = 0; 1014 int err, mmap_prot, mmap_flags, map_idx = 0;
1015 struct ui_progress *progress;
1016 size_t page_size, mmap_size; 1015 size_t page_size, mmap_size;
1017 char *buf, *mmaps[8]; 1016 char *buf, *mmaps[8];
1018 union perf_event *event; 1017 union perf_event *event;
@@ -1030,9 +1029,6 @@ int __perf_session__process_events(struct perf_session *session,
1030 file_size = data_offset + data_size; 1029 file_size = data_offset + data_size;
1031 1030
1032 progress_next = file_size / 16; 1031 progress_next = file_size / 16;
1033 progress = ui_progress__new("Processing events...", file_size);
1034 if (progress == NULL)
1035 return -1;
1036 1032
1037 mmap_size = session->mmap_window; 1033 mmap_size = session->mmap_window;
1038 if (mmap_size > file_size) 1034 if (mmap_size > file_size)
@@ -1095,7 +1091,8 @@ more:
1095 1091
1096 if (file_pos >= progress_next) { 1092 if (file_pos >= progress_next) {
1097 progress_next += file_size / 16; 1093 progress_next += file_size / 16;
1098 ui_progress__update(progress, file_pos); 1094 ui_progress__update(file_pos, file_size,
1095 "Processing events...");
1099 } 1096 }
1100 1097
1101 if (file_pos < file_size) 1098 if (file_pos < file_size)
@@ -1106,7 +1103,6 @@ more:
1106 session->ordered_samples.next_flush = ULLONG_MAX; 1103 session->ordered_samples.next_flush = ULLONG_MAX;
1107 flush_sample_queue(session, ops); 1104 flush_sample_queue(session, ops);
1108out_err: 1105out_err:
1109 ui_progress__delete(progress);
1110 perf_session__warn_about_errors(session, ops); 1106 perf_session__warn_about_errors(session, ops);
1111 perf_session_free_sample_buffers(session); 1107 perf_session_free_sample_buffers(session);
1112 return err; 1108 return err;