Skip to contentSkip to conversation

perf ui: Start breaking down newt.c into multiple files

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

lore
Share & tools
lore
#0 lore raw
Commit-ID:  ef8f34aabf2450a9fb36b2c87fe0ea0b86a38195
Gitweb:     http://git.kernel.org/tip/ef8f34aabf2450a9fb36b2c87fe0ea0b86a38195
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Fri, 6 Aug 2010 17:35:02 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 6 Aug 2010 21:50:41 -0300

perf ui: Start breaking down newt.c into multiple files

As new TUI features get added the newt.c file is growing a lot and its name is growing misleading as an effort is being made to reduce the coupling with libnewt.

Cc: Frederic Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
LKML-Reference: <new-submission>

---
 tools/perf/Makefile          |   10 +-
 tools/perf/util/newt.c       |  306 +----------------------------------------
 tools/perf/util/ui/browser.c |  313 ++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/ui/browser.h |   43 ++++++
 4 files changed, 368 insertions(+), 304 deletions(-)
tools/perf/Makefile +7 -3
index 26f626d..d5bce76 100644
@@ -157,9 +157,8 @@ all::
 #
 # Define NO_DWARF if you do not want debug-info analysis feature at all.
 
-$(shell sh -c 'mkdir -p $(OUTPUT)scripts/python/Perf-Trace-Util/' 2> /dev/null)
-$(shell sh -c 'mkdir -p $(OUTPUT)scripts/perl/Perf-Trace-Util/' 2> /dev/null)
-$(shell sh -c 'mkdir -p $(OUTPUT)util/scripting-engines/' 2> /dev/null)
+$(shell sh -c 'mkdir -p $(OUTPUT)scripts/{perl,python}/Perf-Trace-Util/' 2> /dev/null)
+$(shell sh -c 'mkdir -p $(OUTPUT)util/{ui,scripting-engines}/' 2> /dev/null)
 $(shell sh -c 'mkdir $(OUTPUT)bench' 2> /dev/null)
 
 $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
@@ -569,6 +568,8 @@ else
 		BASIC_CFLAGS += -I/usr/include/slang
 		EXTLIBS += -lnewt -lslang
 		LIB_OBJS += $(OUTPUT)util/newt.o
+		LIB_OBJS += $(OUTPUT)util/ui/browser.o
+		LIB_H += util/ui/browser.h
 	endif
 endif
 
@@ -969,6 +970,9 @@ $(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS
 $(OUTPUT)util/newt.o: util/newt.c $(OUTPUT)PERF-CFLAGS
 	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<
 
+$(OUTPUT)util/ui/browser.o: util/ui/browser.c $(OUTPUT)PERF-CFLAGS
+	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<
+
 $(OUTPUT)util/rbtree.o: ../../lib/rbtree.c $(OUTPUT)PERF-CFLAGS
 	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<
 
tools/perf/util/newt.c +5 -301

360 lines not on this page · raw message

tools/perf/util/ui/browser.c new file +313 -0

313 lines not on this page · raw message

tools/perf/util/ui/browser.h new file +43 -0

43 lines not on this page · raw message