]> Git Repo - linux.git/commitdiff
Merge branch 'perf/parse-events-4' of git://github.com/fweisbec/tracing into perf...
authorIngo Molnar <[email protected]>
Mon, 21 May 2012 08:42:09 +0000 (10:42 +0200)
committerIngo Molnar <[email protected]>
Mon, 21 May 2012 08:42:09 +0000 (10:42 +0200)
Conflicts:
tools/perf/Makefile

This tree from Frederic unifies the perf and trace-cmd trace event format
parsing code into a single library.

Powertop and other tools will also be able to make use of it.

Signed-off-by: Ingo Molnar <[email protected]>
1  2 
tools/perf/Makefile

diff --combined tools/perf/Makefile
index 398094c3d3c997f51d91083d4a4b6ee9e192f785,af0e5d64a9f794f9079147af02257b85a9ad06db..fa37cd53e9b9f7b538641e2e8666657fd99ca9ac
@@@ -149,7 -149,7 +149,7 @@@ endi
  
  ### --- END CONFIGURATION SECTION ---
  
- BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)/util -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+ BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)/util -I$(EVENT_PARSE_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  BASIC_LDFLAGS =
  
  # Guard against environment variables
@@@ -178,6 -178,17 +178,17 @@@ $(OUTPUT)python/perf.so: $(PYRF_OBJS) $
  
  SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH))
  
+ EVENT_PARSE_DIR = ../lib/traceevent/
+ ifeq ("$(origin O)", "command line")
+       EP_PATH=$(OUTPUT)/
+ else
+       EP_PATH=$(EVENT_PARSE_DIR)/
+ endif
+ LIBPARSEVENT = $(EP_PATH)libtraceevent.a
+ EP_LIB := -L$(EP_PATH) -ltraceevent
  #
  # Single 'perf' binary right now:
  #
@@@ -201,8 -212,8 +212,8 @@@ endi
  
  export PERL_PATH
  
 -FLEX = $(CROSS_COMPILE)flex
 -BISON= $(CROSS_COMPILE)bison
 +FLEX = flex
 +BISON= bison
  
  $(OUTPUT)util/parse-events-flex.c: util/parse-events.l
        $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
@@@ -300,7 -311,7 +311,8 @@@ LIB_H += util/cpumap.
  LIB_H += util/top.h
  LIB_H += $(ARCH_INCLUDE)
  LIB_H += util/cgroup.h
+ LIB_H += $(EVENT_PARSE_DIR)event-parse.h
 +LIB_H += util/target.h
  
  LIB_OBJS += $(OUTPUT)util/abspath.o
  LIB_OBJS += $(OUTPUT)util/alias.o
@@@ -362,7 -373,6 +374,7 @@@ LIB_OBJS += $(OUTPUT)util/util.
  LIB_OBJS += $(OUTPUT)util/xyarray.o
  LIB_OBJS += $(OUTPUT)util/cpumap.o
  LIB_OBJS += $(OUTPUT)util/cgroup.o
 +LIB_OBJS += $(OUTPUT)util/target.o
  
  BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
  
@@@ -398,7 -408,7 +410,7 @@@ BUILTIN_OBJS += $(OUTPUT)builtin-kvm.
  BUILTIN_OBJS += $(OUTPUT)builtin-test.o
  BUILTIN_OBJS += $(OUTPUT)builtin-inject.o
  
- PERFLIBS = $(LIB_FILE)
+ PERFLIBS = $(LIB_FILE) $(LIBPARSEVENT)
  
  # Files needed for the python binding, perf.so
  # pyrf is just an internal name needed for all those wrappers.
@@@ -483,7 -493,6 +495,7 @@@ els
                LIB_OBJS += $(OUTPUT)ui/helpline.o
                LIB_OBJS += $(OUTPUT)ui/progress.o
                LIB_OBJS += $(OUTPUT)ui/util.o
 +              LIB_OBJS += $(OUTPUT)ui/tui/setup.o
                LIB_H += ui/browser.h
                LIB_H += ui/browsers/map.h
                LIB_H += ui/helpline.h
@@@ -506,11 -515,6 +518,11 @@@ els
                BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0)
                EXTLIBS += $(shell pkg-config --libs gtk+-2.0)
                LIB_OBJS += $(OUTPUT)ui/gtk/browser.o
 +              LIB_OBJS += $(OUTPUT)ui/gtk/setup.o
 +              # Make sure that it'd be included only once.
 +              ifneq ($(findstring -DNO_NEWT_SUPPORT,$(BASIC_CFLAGS)),)
 +                      LIB_OBJS += $(OUTPUT)ui/setup.o
 +              endif
        endif
  endif
  
@@@ -737,10 -741,10 +749,10 @@@ $(OUTPUT)perf.o perf.spec 
  # over the general rule for .o
  
  $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS
 -      $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
 +      $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -w $<
  
  $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS
 -      $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $<
 +      $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -w $<
  
  $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS
        $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
@@@ -807,6 -811,10 +819,10 @@@ $(sort $(dir $(DIRECTORY_DEPS)))
  $(LIB_FILE): $(LIB_OBJS)
        $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
  
+ # libparsevent.a
+ $(LIBPARSEVENT):
+       make -C $(EVENT_PARSE_DIR) $(COMMAND_O) libtraceevent.a
  help:
        @echo 'Perf make targets:'
        @echo '  doc            - make *all* documentation (see below)'
This page took 0.057513 seconds and 4 git commands to generate.