Skip to contentSkip to conversation

perf ui: Move ui_progress routines to separate file in util/ui/

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Aug 11, 2010 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  34cea7f7c0620c964676eece258ef431a6608bce
Gitweb:     http://git.kernel.org/tip/34cea7f7c0620c964676eece258ef431a6608bce
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Sun, 8 Aug 2010 19:56:47 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 10 Aug 2010 16:09:14 -0300

perf ui: Move ui_progress routines to separate file in util/ui/

LKML-Reference: <new-submission>

---
 tools/perf/Makefile           |    2 +
 tools/perf/util/debug.h       |    4 +--
 tools/perf/util/newt.c        |   56 --------------------------------------
 tools/perf/util/ui/progress.c |   60 +++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/ui/progress.h |   11 +++++++
 5 files changed, 74 insertions(+), 59 deletions(-)
tools/perf/Makefile +2 -0
index d77a101..528c914 100644
@@ -570,8 +570,10 @@ else
 		LIB_OBJS += $(OUTPUT)util/newt.o
 		LIB_OBJS += $(OUTPUT)util/ui/browser.o
 		LIB_OBJS += $(OUTPUT)util/ui/helpline.o
+		LIB_OBJS += $(OUTPUT)util/ui/progress.o
 		LIB_H += util/ui/browser.h
 		LIB_H += util/ui/helpline.h
+		LIB_H += util/ui/progress.h
 	endif
 endif
 
tools/perf/util/debug.h +1 -3
index 047ac33..a929b06 100644
@@ -31,9 +31,7 @@ static inline void ui_progress__update(struct ui_progress *self __used,
 static inline void ui_progress__delete(struct ui_progress *self __used) {}
 #else
 int browser__show_help(const char *format, va_list ap);
-struct ui_progress *ui_progress__new(const char *title, u64 total);
-void ui_progress__update(struct ui_progress *self, u64 curr);
-void ui_progress__delete(struct ui_progress *self);
+#include "ui/progress.h"
 #endif
 
 #endif	/* __PERF_DEBUG_H */
tools/perf/util/newt.c +0 -56

62 lines not on this page · raw message

tools/perf/util/ui/progress.c new file +60 -0

60 lines not on this page · raw message

tools/perf/util/ui/progress.h new file +11 -0
new file mode 100644
index 0000000..a3820a0
@@ -0,0 +1,11 @@
+#ifndef _PERF_UI_PROGRESS_H_
+#define _PERF_UI_PROGRESS_H_ 1
+
+struct ui_progress;
+
+struct ui_progress *ui_progress__new(const char *title, u64 total);
+void ui_progress__delete(struct ui_progress *self);
+
+void ui_progress__update(struct ui_progress *self, u64 curr);
+
+#endif