diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-10-23 15:40:38 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-10-23 15:40:38 -0300 |
commit | 4d3001fdfdfacd2b35ee74ff0f037274eeebd3f6 (patch) | |
tree | 20634d8528fe514298163af38a66b37447503926 /tools/perf/ui/progress.h | |
parent | 4779a2e99af80e133ee1c70c7093dc6cc13429a1 (diff) | |
download | op-kernel-dev-4d3001fdfdfacd2b35ee74ff0f037274eeebd3f6.zip op-kernel-dev-4d3001fdfdfacd2b35ee74ff0f037274eeebd3f6.tar.gz |
perf ui progress: Per progress bar state
That will ease using a progress bar across multiple functions, like in
the upcoming patches that will present a progress bar when collapsing
histograms.
Based on a previous patch by Namhyung Kim.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.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-cr7lq7ud9fj21bg7wvq27w1u@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/progress.h')
-rw-r--r-- | tools/perf/ui/progress.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/perf/ui/progress.h b/tools/perf/ui/progress.h index d41bde5..29ec8ef 100644 --- a/tools/perf/ui/progress.h +++ b/tools/perf/ui/progress.h @@ -3,14 +3,21 @@ #include <../types.h> +void ui_progress__finish(void); + +struct ui_progress { + const char *title; + u64 curr, next, step, total; +}; + +void ui_progress__init(struct ui_progress *p, u64 total, const char *title); +void ui_progress__update(struct ui_progress *p, u64 adv); + struct ui_progress_ops { - void (*update)(u64, u64, const char *); + void (*update)(struct ui_progress *p); void (*finish)(void); }; extern struct ui_progress_ops *ui_progress__ops; -void ui_progress__update(u64 curr, u64 total, const char *title); -void ui_progress__finish(void); - #endif |