perf tools: New build framework
Subsystems (2)
Jiri Olsa
reviewerv2 cover perf tools: New build framework
hi,
I'm following up on latest post from Alexis:
http://marc.info/?l=linux-kernel&m=141427580405357&w=2
v2 changes:
- build Makefiles librarized and moved to 'tools/build' [Ingo]
- several minor fixies [Namhyung]
- tested on other archs now - x86_64, i386, powerpc
- moved tools/lib/* under new build framework to show that it's possible ;-)
included traceevent/lockdep maintainers to get the feedback
- omitted last 2 patches
The patchset is also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/build
All tests/make tests passed.
Any feedback from ARM guys would be great ;-)
Since it's actually small portion of kbuild that perf needs, I realized it's actually better to steal it than 'reconfigure' kbuild to be usable for perf.
Also this patchset is kind of incremental version of the latest:
perf tools: Add kbuild support into Makefile.kbuild
so it should be easier to review.
NOTE I couldn't find any copyright/credit messages in the kbuild system, but would be happy to include it if someone suggests one.
The stolen parts are in files:
Makefile.kbuild
Build.include
The idea and more details are explained in the 'Documentation/Build' file. The basic idea is the same as in kbuild system, with some minor changes to allow for multiple binaries build definitions.
User provides 'Build' files with objects definitions like:
perf-y += perf.o
perf-y += builtin-bench.o
...
libperf-y += util/
...
and the build framework outputs files:
perf-in.o
libperf-in.o
which are then linked into appropriate binaries/libraries. (perf libperf.a libperf-gtk.so)
Also now we have the full dependency check ((gcc -Wp,-MD,... stuff) and build command line is stored/checked automatically by the build system.
thanks for comments,
jirka
---
Jiri Olsa (36):
tools build: Add new build support
tools build: Add detected config support tools build: Add subdir support
perf tools: Remove api fs object from python build perf build: Disable make's built-in rules and variables perf build: Add bench objects building
perf build: Add tests objects building
perf build: Add builtin objects building
perf build: Add libperf objects building
perf build: Add probe objects building
perf build: Add dwarf objects building
perf build: Add dwarf unwind objects building perf build: Add ui objects building
perf build: Add slang objects building
perf build: Add gtk objects building
perf build: Add scripts objects building
perf build: Add perf regs objects building perf build: Add zlib objects building
perf build: Add perf.o object building
perf build: Add arch x86 objects building perf build: Add arch arm objects building perf build: Add arch arm64 objects building perf build: Add arch powerpc objects building perf build: Add arch s390 objects building perf build: Add arch sh objects building
perf build: Add arch sparc objects building perf build: Add single target build framework support perf build: Remove directory dependency rules perf build: Remove uneeded variables
perf build: Remove PERF-CFLAGS file
perf build: Add build documentation
tools lib api: Use tools build framework tools lib api: Rename libapikfs.a to libapi.a tools lib traceevent: Use tools build framework tools lib lockdep: Use tools build framework perf build: Display make commands on V=1
tools/build/Build.include | 75 +++ tools/build/Documentation/Build.txt | 75 +++ tools/build/Makefile.build | 122 +++++ tools/lib/api/Build | 2 + tools/lib/api/Makefile | 57 +-- tools/lib/api/fd/Build | 1 + tools/lib/api/fs/Build | 2 + tools/lib/lockdep/Build | 1 + tools/lib/lockdep/Makefile | 132 +----- tools/lib/traceevent/Build | 17 + tools/lib/traceevent/Makefile | 161 ++----- tools/perf/Build | 43 ++ tools/perf/Documentation/Build.txt | 49 ++ tools/perf/MANIFEST | 1 + tools/perf/Makefile.perf | 600 +++--------------------- tools/perf/arch/Build | 2 + tools/perf/arch/arm/Build | 2 + tools/perf/arch/arm/Makefile | 11 - tools/perf/arch/arm/tests/Build | 2 + tools/perf/arch/arm/util/Build | 4 + tools/perf/arch/arm64/Build | 3 + tools/perf/arch/arm64/Makefile | 4 - tools/perf/arch/arm64/util/Build | 2 + tools/perf/arch/powerpc/Build | 1 + tools/perf/arch/powerpc/Makefile | 3 - tools/perf/arch/powerpc/util/Build | 4 + tools/perf/arch/s390/Build | 1 + tools/perf/arch/s390/Makefile | 3 - tools/perf/arch/s390/util/Build | 4 + tools/perf/arch/sh/Build | 1 + tools/perf/arch/sh/Makefile | 1 - tools/perf/arch/sh/util/Build | 1 + tools/perf/arch/sparc/Build | 1 + tools/perf/arch/sparc/Makefile | 1 - tools/perf/arch/sparc/util/Build | 1 + tools/perf/arch/x86/Build | 2 + tools/perf/arch/x86/Makefile | 15 - tools/perf/arch/x86/tests/Build | 2 + tools/perf/arch/x86/util/Build | 8 + tools/perf/bench/Build | 11 + tools/perf/config/Makefile | 44 ++ tools/perf/scripts/Build | 2 + tools/perf/scripts/perl/Perf-Trace-Util/Build | 3 + tools/perf/scripts/python/Perf-Trace-Util/Build | 3 + tools/perf/tests/Build | 42 ++ tools/perf/ui/Build | 14 + tools/perf/ui/browsers/Build | 10 + tools/perf/ui/gtk/Build | 9 + tools/perf/ui/tui/Build | 4 + tools/perf/util/Build | 137 ++++++ tools/perf/util/python-ext-sources | 1 - tools/perf/util/scripting-engines/Build | 6 + 52 files changed, 875 insertions(+), 828 deletions(-) create mode 100644 tools/build/Build.include create mode 100644 tools/build/Documentation/Build.txt create mode 100644 tools/build/Makefile.build create mode 100644 tools/lib/api/Build create mode 100644 tools/lib/api/fd/Build create mode 100644 tools/lib/api/fs/Build create mode 100644 tools/lib/lockdep/Build create mode 100644 tools/lib/traceevent/Build create mode 100644 tools/perf/Build create mode 100644 tools/perf/Documentation/Build.txt create mode 100644 tools/perf/arch/Build create mode 100644 tools/perf/arch/arm/Build create mode 100644 tools/perf/arch/arm/tests/Build create mode 100644 tools/perf/arch/arm/util/Build create mode 100644 tools/perf/arch/arm64/Build create mode 100644 tools/perf/arch/arm64/util/Build create mode 100644 tools/perf/arch/powerpc/Build create mode 100644 tools/perf/arch/powerpc/util/Build create mode 100644 tools/perf/arch/s390/Build create mode 100644 tools/perf/arch/s390/util/Build create mode 100644 tools/perf/arch/sh/Build create mode 100644 tools/perf/arch/sh/util/Build create mode 100644 tools/perf/arch/sparc/Build create mode 100644 tools/perf/arch/sparc/util/Build create mode 100644 tools/perf/arch/x86/Build create mode 100644 tools/perf/arch/x86/tests/Build create mode 100644 tools/perf/arch/x86/util/Build create mode 100644 tools/perf/bench/Build create mode 100644 tools/perf/scripts/Build create mode 100644 tools/perf/scripts/perl/Perf-Trace-Util/Build create mode 100644 tools/perf/scripts/python/Perf-Trace-Util/Build create mode 100644 tools/perf/tests/Build create mode 100644 tools/perf/ui/Build create mode 100644 tools/perf/ui/browsers/Build create mode 100644 tools/perf/ui/gtk/Build create mode 100644 tools/perf/ui/tui/Build create mode 100644 tools/perf/util/Build create mode 100644 tools/perf/util/scripting-engines/Build
Jiri Olsa
reviewerPATCH v2 1/36 tools build: Add new build support
Adding new build framework into 'tools/build' to be used by tools.
There's no change for actual building at this point, it comes in the next patches.
The idea and more details are explained in the
'tools/build/Documentation/Build' file.
I stole everything from the kernel build system, with some changes to allow for multiple binaries build definitions.
While the kernel's build output is single image (forget modules) we need to be able to build several binaries/libraries.
The basic idea is that sser provides 'Build' files with objects definitions like:
perf-y += a.o
perf-y += b.o
libperf-y += c.o
libperf-y += d.o
and the build framework outputs files:
perf-in.o # a.o, b.o compiled in
libperf-in.o # c.o, d.o compiled in
--- tools/build/Build.include | 75 ++++++++++++++++++++++++++++++ tools/build/Documentation/Build.txt | 75 ++++++++++++++++++++++++++++++ tools/build/Makefile.build | 91 +++++++++++++++++++++++++++++++++++++ tools/perf/MANIFEST | 1 + 4 files changed, 242 insertions(+) create mode 100644 tools/build/Build.include create mode 100644 tools/build/Documentation/Build.txt create mode 100644 tools/build/Makefile.build
tools/build/Build.include new file +75 -0
@@ -0,0 +1,75 @@ +### +# build: Generic definitions + +### +# Convenient variables +comma := , +squote := ' + +### +# Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o +dot-target = $(dir $@).$(notdir $@) + +### +# filename of target with directory and extension stripped +basetarget = $(basename $(notdir $@)) + +### +# The temporary file to save gcc -MD generated dependencies must not +# contain a comma +depfile = $(subst $(comma),_,$(dot-target).d) + +### +# Check if both arguments has same arguments. Result is empty string if equal. +arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ + $(filter-out $(cmd_$@), $(cmd_$(1))) ) + +### +# Escape single quote for use in echo statements +escsq = $(subst $(squote),'\$(squote)',$1) + +# Echo command +# Short version is used, if $(quiet) equals `quiet_', otherwise full one. +echo-cmd = $(if $($(quiet)cmd_$(1)),\ + echo ' $(call escsq,$($(quiet)cmd_$(1)))';) + +### +# Replace >$< with >$$< to preserve $ when reloading the .cmd file +# (needed for make) +# Replace >#< with >\#< to avoid starting a comment in the .cmd file +# (needed for make) +# Replace >'< with >'\''< to be able to enclose the whole string in '...' +# (needed for the shell) +make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1))))) + +### +# Find any prerequisites that is newer than target or that does not exist. +# PHONY targets skipped in both cases. +any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) + +### +# if_changed_dep - execute command if any prerequisite is newer than +# target, or command line has changed and update +# dependencies in the cmd file +if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)), \ + @set -e; \ + $(echo-cmd) $(cmd_$(1)); \ + cat $(depfile) > $(dot-target).cmd; \ + printf '%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd) + +### +# if_changed - execute command if any prerequisite is newer than +# target, or command line has changed +if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ + @set -e; \ + $(echo-cmd) $(cmd_$(1)); \ + printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) + +### +# C flags to be used in rule definitions, includes: +# - depfile generation +# - global $(CFLAGS) +# - per target C flags +# - per object C flags +# - BUILD_STR macro to allow '-D"$(variable)"' constructs +c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj))
tools/build/Documentation/Build.txt new file +75 -0
75 lines not on this page · raw message
tools/build/Makefile.build new file +91 -0
91 lines not on this page · raw message
tools/perf/MANIFEST +1 -0
@@ -1,5 +1,6 @@ tools/perf tools/scripts +tools/build tools/lib/traceevent tools/lib/api tools/lib/symbol/kallsyms.c
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 2/36 tools build: Add detected config support
In reply to Jiri OlsaAdding support to include detected configuration makefile into the build process. This will allow the Build objects to be configurable based on the config data, like:
perf-$(CONFIG_KRAVA) += krava.o
The configuration is stored in '.config-detected' file, which is generated for each compilation.
--- tools/build/Makefile.build | 3 +++ tools/perf/config/Makefile | 4 ++++ 2 files changed, 7 insertions(+)
tools/build/Makefile.build +3 -0
@@ -17,6 +17,9 @@ build-dir := $(srctree)/tools/build # Generic definitions include $(build-dir)/Build.include +# do not force detected configuration +-include .config-detected + # Init all relevant variables used in build files so # 1) they have correct type # 2) they do not inherit any value from the environment
tools/perf/config/Makefile +4 -0
@@ -11,6 +11,10 @@ ifneq ($(obj-perf),) obj-perf := $(abspath $(obj-perf))/ endif +$(shell echo -n > .config-detected) +detected = $(shell echo "$(1)=y" >> .config-detected) +detected_var = $(shell echo "$(1)=$($(1))" >> .config-detected) + LIB_INCLUDE := $(srctree)/tools/lib/ CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)
Signature · 1 line
1.9.3
Re: [PATCH 02/36] tools build: Add detected config support
Quoted 8 lines · Jiri Olsa
Adding support to include detected configuration makefile into the build process. This will allow the Build objects to be configurable based on the config data, like:
perf-$(CONFIG_KRAVA) += krava.oThe configuration is stored in '.config-detected' file, which is generated for each compilation.
So this file is similar to kernel's .config file and is generated based on today's autoprobing?
Re: [PATCH 02/36] tools build: Add detected config support
Quoted 5 lines · David Ahern
Quoted 4 lines · Jiri Olsa
Adding support to include detected configuration makefile into the build process. This will allow the Build objects to be configurable based on the config data, like:
Quoted 8 lines
Quoted 4 lines
perf-$(CONFIG_KRAVA) += krava.oThe configuration is stored in '.config-detected' file, which is generated for each compilation.
So this file is similar to kernel's .config file and is generated based on today's autoprobing?
yep, it's the way to pass detected data/variables from perf detection system (config/Makefile) to the build framework, it get's generated every build
the plan is to have '.config' in the future that will gather user's configuration
jirka
Jiri Olsa
reviewerPATCH v2 3/36 tools build: Add subdir support
In reply to Jiri OlsaAdd support to make directory any time we build objects out of the tree (O=/tmp/krava) and the output directory does not exist.
--- tools/build/Makefile.build | 7 +++++++ 1 file changed, 7 insertions(+)
tools/build/Makefile.build +7 -0
@@ -32,6 +32,11 @@ subdir-obj-y := build-file := $(dir)/Build include $(build-file) +# Create directory unless it exists +quiet_cmd_mkdir = MKDIR $(dir $@) + cmd_mkdir = mkdir -p $(dir $@) + rule_mkdir = $(if $(wildcard $(dir $@)),,@$(call echo-cmd,mkdir) $(cmd_mkdir)) + # Compile command quiet_cmd_cc_o_c = CC $@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
@@ -42,9 +47,11 @@ quiet_cmd_ld_multi = LD $@ # Build rules $(OUTPUT)%.o: %.c FORCE + $(call rule_mkdir) $(call if_changed_dep,cc_o_c) $(OUTPUT)%.o: %.S FORCE + $(call rule_mkdir) $(call if_changed_dep,cc_o_c) # Gather build data:
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 4/36 perf tools: Remove api fs object from python build
In reply to Jiri OlsaIt's already included in libapikfs.a library, which is already used to link perf.so.
--- tools/perf/util/python-ext-sources | 1 - 1 file changed, 1 deletion(-)
tools/perf/util/python-ext-sources +0 -1
@@ -17,6 +17,5 @@ util/xyarray.c util/cgroup.c util/rblist.c util/strlist.c -../lib/api/fs/fs.c util/trace-event.c ../../lib/rbtree.c
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 5/36 perf build: Disable make's built-in rules and variables
In reply to Jiri OlsaWe don't use any built-in rules and variables so we can disable make's checks for that and build faster.
--- tools/perf/Makefile.perf | 4 ++++ 1 file changed, 4 insertions(+)
tools/perf/Makefile.perf +4 -0
@@ -84,6 +84,10 @@ ifneq ($(OUTPUT),) #$(info Determined 'OUTPUT' to be $(OUTPUT)) endif +# Do not use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour); +MAKEFLAGS += -rR + $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) @touch $(OUTPUT)PERF-VERSION-FILE
Signature · 1 line
1.9.3
Re: [PATCH 05/36] perf build: Disable make's built-in rules and variables
Quoted 5 lines · Jiri Olsa
tools/perf/Makefile.perf +0
-0
tools/perf/Makefile.perf ifneq ($(OUTPUT),) · line 93
Quoted 10 lines
tools/perf/Makefile.perf +4
-0@@ -84,6 +84,10 @@ ifneq ($(OUTPUT),) #$(info Determined 'OUTPUT' to be $(OUTPUT)) endif +# Do not use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour); +MAKEFLAGS += -rR + $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) @touch $(OUTPUT)PERF-VERSION-FILE
Does this depend on any prior patch? Was not obvious to me. Adding just this patch to a fresh build and it blows up.
$ vi Makefile.perf - add line above $ mkdir /tmp/junk2 $ make O=/tmp/junk2 ... CC /tmp/junk2/fs/debugfs.o CC /tmp/junk2/fs/fs.o CC /tmp/junk2/fd/array.o /bin/sh: .event-parse.d: command not found /bin/sh: .trace-seq.d: command not found /bin/sh: .event-plugin.d: command not found make[3]: *** [.event-parse.d] Error 127 make[3]: *** Waiting for unfinished jobs.... ...
This is on a Fedora 16 host.
David
Re: [PATCH 05/36] perf build: Disable make's built-in rules and variables
Quoted 36 lines · David Ahern
Quoted 5 lines · Jiri Olsa
tools/perf/Makefile.perf +0
-0tools/perf/Makefile.perf ifneq ($(OUTPUT),) · line 93
Quoted 10 lines
tools/perf/Makefile.perf +4
-0@@ -84,6 +84,10 @@ ifneq ($(OUTPUT),) #$(info Determined 'OUTPUT' to be $(OUTPUT)) endif +# Do not use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour); +MAKEFLAGS += -rR + $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) @touch $(OUTPUT)PERF-VERSION-FILEDoes this depend on any prior patch? Was not obvious to me. Adding just this patch to a fresh build and it blows up.
$ vi Makefile.perf - add line above $ mkdir /tmp/junk2 $ make O=/tmp/junk2 ... CC /tmp/junk2/fs/debugfs.o CC /tmp/junk2/fs/fs.o CC /tmp/junk2/fd/array.o /bin/sh: .event-parse.d: command not found /bin/sh: .trace-seq.d: command not found /bin/sh: .event-plugin.d: command not found make[3]: *** [.event-parse.d] Error 127 make[3]: *** Waiting for unfinished jobs.... ...
Quoted 1 line
This is on a Fedora 16 host.
oops, I've cut it out of the framework changes to make it simpler, but looks like traceevent library depends on builtin rules, I'll check..
thanks,
jirka
Jiri Olsa
reviewerPATCH v2 6/36 perf build: Add bench objects building
In reply to Jiri OlsaMove bench objects building under build framework and enable perf-in.o rule.
--- tools/perf/Build | 2 ++ tools/perf/Makefile.perf | 38 ++++++++++++++++---------------------- tools/perf/bench/Build | 11 +++++++++++ tools/perf/config/Makefile | 2 ++ 4 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 tools/perf/Build create mode 100644 tools/perf/bench/Build
tools/perf/Build new file +2 -0
@@ -0,0 +1,2 @@ +perf-y += builtin-bench.o +perf-y += bench/
tools/perf/Makefile.perf +16 -22
@@ -93,6 +93,7 @@ $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD @touch $(OUTPUT)PERF-VERSION-FILE CC = $(CROSS_COMPILE)gcc +LD = $(CROSS_COMPILE)ld AR = $(CROSS_COMPILE)ar PKG_CONFIG = $(CROSS_COMPILE)pkg-config
@@ -462,21 +463,6 @@ LIB_OBJS += $(OUTPUT)tests/thread-mg-share.o LIB_OBJS += $(OUTPUT)tests/switch-tracking.o BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o -BUILTIN_OBJS += $(OUTPUT)builtin-bench.o -# Benchmark modules -BUILTIN_OBJS += $(OUTPUT)bench/sched-messaging.o -BUILTIN_OBJS += $(OUTPUT)bench/sched-pipe.o -ifeq ($(ARCH), x86) -ifeq ($(IS_64_BIT), 1) -BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy-x86-64-asm.o -BUILTIN_OBJS += $(OUTPUT)bench/mem-memset-x86-64-asm.o -endif -endif -BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o -BUILTIN_OBJS += $(OUTPUT)bench/futex-hash.o -BUILTIN_OBJS += $(OUTPUT)bench/futex-wake.o -BUILTIN_OBJS += $(OUTPUT)bench/futex-requeue.o - BUILTIN_OBJS += $(OUTPUT)builtin-diff.o BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o BUILTIN_OBJS += $(OUTPUT)builtin-help.o
@@ -595,10 +581,6 @@ ifeq ($(NO_PERF_REGS),0) LIB_OBJS += $(OUTPUT)util/perf_regs.o endif -ifndef NO_LIBNUMA - BUILTIN_OBJS += $(OUTPUT)bench/numa.o -endif - ifndef NO_ZLIB LIB_OBJS += $(OUTPUT)util/zlib.o endif
@@ -625,14 +607,22 @@ shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell strip: $(PROGRAMS) $(OUTPUT)perf $(STRIP) $(STRIP_OPTS) $(PROGRAMS) $(OUTPUT)perf +PERF_IN := $(OUTPUT)perf-in.o + +export srctree OUTPUT RM CC LD CFLAGS V +build := -f $(srctree)/tools/build/Makefile.build dir=. obj + +$(PERF_IN): FORCE + @$(MAKE) $(build)=perf + $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS $(QUIET_CC)$(CC) -include $(OUTPUT)PERF-VERSION-FILE \ '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ $(CFLAGS) -c $(filter %.c,$^) -o $@ -$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) +$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN) $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \ - $(BUILTIN_OBJS) $(LIBS) -o $@ + $(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@ $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H) $(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $<
@@ -984,6 +974,8 @@ config-clean: clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS) + @find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) + @$(RM) .config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
@@ -999,7 +991,9 @@ else GIT-HEAD-PHONY = endif +FORCE: + .PHONY: all install clean config-clean strip install-gtk .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell -.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS +.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS FORCE
tools/perf/bench/Build new file +11 -0
@@ -0,0 +1,11 @@ +perf-y += sched-messaging.o +perf-y += sched-pipe.o +perf-y += mem-memcpy.o +perf-y += futex-hash.o +perf-y += futex-wake.o +perf-y += futex-requeue.o + +perf-$(CONFIG_X86_64) += mem-memcpy-x86-64-asm.o +perf-$(CONFIG_X86_64) += mem-memset-x86-64-asm.o + +perf-$(CONFIG_NUMA) += numa.o
tools/perf/config/Makefile +2 -0
@@ -28,6 +28,7 @@ ifeq ($(ARCH),x86) CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S LIBUNWIND_LIBS = -lunwind -lunwind-x86_64 + $(call detected,CONFIG_X86_64) else LIBUNWIND_LIBS = -lunwind -lunwind-x86 endif
@@ -633,6 +634,7 @@ ifndef NO_LIBNUMA else CFLAGS += -DHAVE_LIBNUMA_SUPPORT EXTLIBS += -lnuma + $(call detected,CONFIG_NUMA) endif endif
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 7/36 perf build: Add tests objects building
In reply to Jiri OlsaMove test objects building under build framework.
--- tools/perf/Build | 1 + tools/perf/Makefile.perf | 55 ---------------------------------------------- tools/perf/config/Makefile | 10 +++++++++ tools/perf/tests/Build | 42 +++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 55 deletions(-) create mode 100644 tools/perf/tests/Build
tools/perf/Build +1 -0
@@ -1,2 +1,3 @@ perf-y += builtin-bench.o perf-y += bench/ +perf-y += tests/
tools/perf/Makefile.perf +0 -55
79 lines not on this page · raw message
tools/perf/config/Makefile +10 -0
@@ -20,10 +20,13 @@ CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS) include $(src-perf)/config/Makefile.arch +$(call detected_var,ARCH) + NO_PERF_REGS := 1 # Additional ARCH settings for x86 ifeq ($(ARCH),x86) + $(call detected,CONFIG_X86) ifeq (${IS_64_BIT}, 1) CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S
@@ -418,6 +421,7 @@ endif ifeq ($(dwarf-post-unwind),1) CFLAGS += -DHAVE_DWARF_UNWIND_SUPPORT + $(call detected,CONFIG_DWARF_UNWIND) else NO_DWARF_UNWIND := 1 endif
@@ -815,3 +819,9 @@ endif ifeq ($(display_lib),1) $(info ) endif + +$(call detected_var,bindir_SQ) +$(call detected_var,PYTHON_WORD) +ifneq ($(OUTPUT),) +$(call detected_var,OUTPUT) +endif
tools/perf/tests/Build new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 8/36 perf build: Add builtin objects building
In reply to Jiri OlsaMove the rest of builtin objects (bench and test are already in) building under build framework.
--- tools/perf/Build | 29 +++++++++++++++++++++++++++++ tools/perf/Makefile.perf | 35 ----------------------------------- tools/perf/config/Makefile | 4 ++++ 3 files changed, 33 insertions(+), 35 deletions(-)
tools/perf/Build +29 -0
@@ -1,3 +1,32 @@ perf-y += builtin-bench.o +perf-y += builtin-annotate.o +perf-y += builtin-diff.o +perf-y += builtin-evlist.o +perf-y += builtin-help.o +perf-y += builtin-sched.o +perf-y += builtin-buildid-list.o +perf-y += builtin-buildid-cache.o +perf-y += builtin-list.o +perf-y += builtin-record.o +perf-y += builtin-report.o +perf-y += builtin-stat.o +perf-y += builtin-timechart.o +perf-y += builtin-top.o +perf-y += builtin-script.o +perf-y += builtin-kmem.o +perf-y += builtin-lock.o +perf-y += builtin-kvm.o +perf-y += builtin-inject.o +perf-y += builtin-mem.o + +perf-$(CONFIG_AUDIT) += builtin-trace.o + perf-y += bench/ perf-y += tests/ + +paths += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))" +paths += -DPERF_INFO_PATH="BUILD_STR($(infodir_SQ))" +paths += -DPERF_MAN_PATH="BUILD_STR($(mandir_SQ))" + +CFLAGS_builtin-help.o += $(paths) +CFLAGS_builtin-timechart.o += $(paths)
tools/perf/Makefile.perf +0 -35
@@ -423,26 +423,7 @@ LIB_OBJS += $(OUTPUT)ui/stdio/hist.o LIB_OBJS += $(OUTPUT)arch/common.o -BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o -BUILTIN_OBJS += $(OUTPUT)builtin-diff.o -BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o -BUILTIN_OBJS += $(OUTPUT)builtin-help.o -BUILTIN_OBJS += $(OUTPUT)builtin-sched.o -BUILTIN_OBJS += $(OUTPUT)builtin-buildid-list.o -BUILTIN_OBJS += $(OUTPUT)builtin-buildid-cache.o -BUILTIN_OBJS += $(OUTPUT)builtin-list.o -BUILTIN_OBJS += $(OUTPUT)builtin-record.o -BUILTIN_OBJS += $(OUTPUT)builtin-report.o -BUILTIN_OBJS += $(OUTPUT)builtin-stat.o -BUILTIN_OBJS += $(OUTPUT)builtin-timechart.o -BUILTIN_OBJS += $(OUTPUT)builtin-top.o -BUILTIN_OBJS += $(OUTPUT)builtin-script.o BUILTIN_OBJS += $(OUTPUT)builtin-probe.o -BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o -BUILTIN_OBJS += $(OUTPUT)builtin-lock.o -BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o -BUILTIN_OBJS += $(OUTPUT)builtin-inject.o -BUILTIN_OBJS += $(OUTPUT)builtin-mem.o PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT)
@@ -484,10 +465,6 @@ ifndef NO_LIBUNWIND LIB_OBJS += $(OUTPUT)util/unwind-libunwind.o endif -ifndef NO_LIBAUDIT - BUILTIN_OBJS += $(OUTPUT)builtin-trace.o -endif - ifndef NO_SLANG LIB_OBJS += $(OUTPUT)ui/browser.o LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
@@ -589,18 +566,6 @@ $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H) $(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS) $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) -$(OUTPUT)builtin-help.o: builtin-help.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \ - '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ - '-DPERF_MAN_PATH="$(mandir_SQ)"' \ - '-DPERF_INFO_PATH="$(infodir_SQ)"' $< - -$(OUTPUT)builtin-timechart.o: builtin-timechart.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \ - '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ - '-DPERF_MAN_PATH="$(mandir_SQ)"' \ - '-DPERF_INFO_PATH="$(infodir_SQ)"' $< - $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
tools/perf/config/Makefile +4 -0
@@ -450,6 +450,7 @@ ifndef NO_LIBAUDIT else CFLAGS += -DHAVE_LIBAUDIT_SUPPORT EXTLIBS += -laudit + $(call detected,CONFIG_AUDIT) endif endif
@@ -825,3 +826,6 @@ $(call detected_var,PYTHON_WORD) ifneq ($(OUTPUT),) $(call detected_var,OUTPUT) endif +$(call detected_var,htmldir_SQ) +$(call detected_var,infodir_SQ) +$(call detected_var,mandir_SQ)
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 9/36 perf build: Add libperf objects building
In reply to Jiri OlsaMove the util objects building under build framework.
Add new libperf build object so it's separated from the rest of the perf code and could be librarized.
--- tools/build/Makefile.build | 3 + tools/perf/Build | 3 + tools/perf/Makefile.perf | 136 +++++---------------------------------------- tools/perf/arch/Build | 1 + tools/perf/config/Makefile | 5 ++ tools/perf/util/Build | 112 +++++++++++++++++++++++++++++++++++++ 6 files changed, 137 insertions(+), 123 deletions(-) create mode 100644 tools/perf/arch/Build create mode 100644 tools/perf/util/Build
tools/build/Makefile.build +3 -0
@@ -32,6 +32,9 @@ subdir-obj-y := build-file := $(dir)/Build include $(build-file) +quiet_cmd_flex = FLEX $@ +quiet_cmd_bison = BISON $@ + # Create directory unless it exists quiet_cmd_mkdir = MKDIR $(dir $@) cmd_mkdir = mkdir -p $(dir $@)
tools/perf/Build +3 -0
@@ -30,3 +30,6 @@ paths += -DPERF_MAN_PATH="BUILD_STR($(mandir_SQ))" CFLAGS_builtin-help.o += $(paths) CFLAGS_builtin-timechart.o += $(paths) + +libperf-y += util/ +libperf-y += arch/
tools/perf/Makefile.perf +13 -123
192 lines not on this page · raw message
tools/perf/arch/Build new file +1 -0
@@ -0,0 +1 @@ +libperf-y += common.o
tools/perf/config/Makefile +5 -0
@@ -122,6 +122,8 @@ ifdef PARSER_DEBUG PARSER_DEBUG_BISON := -t PARSER_DEBUG_FLEX := -d CFLAGS += -DPARSER_DEBUG + $(call detected_var,PARSER_DEBUG_BISON) + $(call detected_var,PARSER_DEBUG_FLEX) endif ifndef NO_LIBPYTHON
@@ -829,3 +831,6 @@ endif $(call detected_var,htmldir_SQ) $(call detected_var,infodir_SQ) $(call detected_var,mandir_SQ) +$(call detected_var,ETC_PERFCONFIG_SQ) +$(call detected_var,prefix_SQ) +$(call detected_var,perfexecdir_SQ)
tools/perf/util/Build new file +112 -0
112 lines not on this page · raw message
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 10/36 perf build: Add probe objects building
In reply to Jiri OlsaMove the probe objects building under build framework to be included in the libperf build object.
--- tools/perf/Build | 1 + tools/perf/Makefile.perf | 19 +------------------ tools/perf/config/Makefile | 1 + tools/perf/util/Build | 7 +++++++ 4 files changed, 10 insertions(+), 18 deletions(-)
tools/perf/Build +1 -0
@@ -20,6 +20,7 @@ perf-y += builtin-inject.o perf-y += builtin-mem.o perf-$(CONFIG_AUDIT) += builtin-trace.o +perf-$(CONFIG_LIBELF) += builtin-probe.o perf-y += bench/ perf-y += tests/
tools/perf/Makefile.perf +1 -18
@@ -325,9 +325,6 @@ LIB_H += util/data.h LIB_H += util/kvm-stat.h LIB_H += util/thread-stack.h -LIB_OBJS += $(OUTPUT)util/symbol-elf.o -LIB_OBJS += $(OUTPUT)util/probe-event.o - LIB_OBJS += $(OUTPUT)ui/setup.o LIB_OBJS += $(OUTPUT)ui/helpline.o LIB_OBJS += $(OUTPUT)ui/progress.o
@@ -335,8 +332,6 @@ LIB_OBJS += $(OUTPUT)ui/util.o LIB_OBJS += $(OUTPUT)ui/hist.o LIB_OBJS += $(OUTPUT)ui/stdio/hist.o -BUILTIN_OBJS += $(OUTPUT)builtin-probe.o - PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) # We choose to avoid "if .. else if .. else .. endif endif"
@@ -349,19 +344,7 @@ ifneq ($(OUTPUT),) CFLAGS += -I$(OUTPUT) endif -ifdef NO_LIBELF -# Remove ELF/DWARF dependent codes -LIB_OBJS := $(filter-out $(OUTPUT)util/symbol-elf.o,$(LIB_OBJS)) -LIB_OBJS := $(filter-out $(OUTPUT)util/dwarf-aux.o,$(LIB_OBJS)) -LIB_OBJS := $(filter-out $(OUTPUT)util/probe-event.o,$(LIB_OBJS)) -LIB_OBJS := $(filter-out $(OUTPUT)util/probe-finder.o,$(LIB_OBJS)) - -BUILTIN_OBJS := $(filter-out $(OUTPUT)builtin-probe.o,$(BUILTIN_OBJS)) - -# Use minimal symbol handling -LIB_OBJS += $(OUTPUT)util/symbol-minimal.o - -else # NO_LIBELF +ifndef NO_LIBELF ifndef NO_DWARF LIB_OBJS += $(OUTPUT)util/probe-finder.o LIB_OBJS += $(OUTPUT)util/dwarf-aux.o
tools/perf/config/Makefile +1 -0
@@ -365,6 +365,7 @@ endif # NO_LIBELF ifndef NO_LIBELF CFLAGS += -DHAVE_LIBELF_SUPPORT EXTLIBS += -lelf + $(call detected,CONFIG_LIBELF) ifeq ($(feature-libelf-mmap), 1) CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
tools/perf/util/Build +7 -0
@@ -75,6 +75,13 @@ libperf-y += tsc.o libperf-y += cloexec.o libperf-y += thread-stack.o +libperf-$(CONFIG_LIBELF) += symbol-elf.o +libperf-$(CONFIG_LIBELF) += probe-event.o + +ifndef CONFIG_LIBELF +libperf-y += symbol-minimal.o +endif + CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 11/36 perf build: Add dwarf objects building
In reply to Jiri OlsaMove the dwarf objects building under build framework to be included in the libperf build object.
--- tools/perf/Makefile.perf | 7 ------- tools/perf/config/Makefile | 1 + tools/perf/util/Build | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-)
tools/perf/Makefile.perf +0 -7
@@ -344,13 +344,6 @@ ifneq ($(OUTPUT),) CFLAGS += -I$(OUTPUT) endif -ifndef NO_LIBELF -ifndef NO_DWARF - LIB_OBJS += $(OUTPUT)util/probe-finder.o - LIB_OBJS += $(OUTPUT)util/dwarf-aux.o -endif # NO_DWARF -endif # NO_LIBELF - ifndef NO_LIBDW_DWARF_UNWIND LIB_OBJS += $(OUTPUT)util/unwind-libdw.o LIB_H += util/unwind-libdw.h
tools/perf/config/Makefile +1 -0
@@ -386,6 +386,7 @@ ifndef NO_LIBELF CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) LDFLAGS += $(LIBDW_LDFLAGS) EXTLIBS += -ldw + $(call detected,CONFIG_DWARF) endif # PERF_HAVE_DWARF_REGS endif # NO_DWARF endif # NO_LIBELF
tools/perf/util/Build +3 -0
@@ -82,6 +82,9 @@ ifndef CONFIG_LIBELF libperf-y += symbol-minimal.o endif +libperf-$(CONFIG_DWARF) += probe-finder.o +libperf-$(CONFIG_DWARF) += dwarf-aux.o + CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 12/36 perf build: Add dwarf unwind objects building
In reply to Jiri OlsaMove the dwarf unwind objects building under build framework to be included in the libperf build object.
--- tools/perf/Makefile.perf | 9 --------- tools/perf/config/Makefile | 2 ++ tools/perf/util/Build | 3 +++ 3 files changed, 5 insertions(+), 9 deletions(-)
tools/perf/Makefile.perf +0 -9
@@ -344,15 +344,6 @@ ifneq ($(OUTPUT),) CFLAGS += -I$(OUTPUT) endif -ifndef NO_LIBDW_DWARF_UNWIND - LIB_OBJS += $(OUTPUT)util/unwind-libdw.o - LIB_H += util/unwind-libdw.h -endif - -ifndef NO_LIBUNWIND - LIB_OBJS += $(OUTPUT)util/unwind-libunwind.o -endif - ifndef NO_SLANG LIB_OBJS += $(OUTPUT)ui/browser.o LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
tools/perf/config/Makefile +2 -0
@@ -414,9 +414,11 @@ ifdef NO_LIBUNWIND dwarf-post-unwind := 0 else dwarf-post-unwind-text := libdw + $(call detected,CONFIG_LIBDW_DWARF_UNWIND) endif else dwarf-post-unwind-text := libunwind + $(call detected,CONFIG_LIBUNWIND) # Enable libunwind support by default. ifndef NO_LIBDW_DWARF_UNWIND NO_LIBDW_DWARF_UNWIND := 1
tools/perf/util/Build +3 -0
@@ -85,6 +85,9 @@ endif libperf-$(CONFIG_DWARF) += probe-finder.o libperf-$(CONFIG_DWARF) += dwarf-aux.o +libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o +libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o + CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 13/36 perf build: Add ui objects building
In reply to Jiri OlsaMove the ui objects building under build framework to be included in the libperf build object.
--- tools/perf/Build | 1 + tools/perf/Makefile.perf | 10 ---------- tools/perf/config/Makefile | 1 + tools/perf/ui/Build | 8 ++++++++ 4 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 tools/perf/ui/Build
tools/perf/Build +1 -0
@@ -34,3 +34,4 @@ CFLAGS_builtin-timechart.o += $(paths) libperf-y += util/ libperf-y += arch/ +libperf-y += ui/
tools/perf/Makefile.perf +0 -10
@@ -325,13 +325,6 @@ LIB_H += util/data.h LIB_H += util/kvm-stat.h LIB_H += util/thread-stack.h -LIB_OBJS += $(OUTPUT)ui/setup.o -LIB_OBJS += $(OUTPUT)ui/helpline.o -LIB_OBJS += $(OUTPUT)ui/progress.o -LIB_OBJS += $(OUTPUT)ui/util.o -LIB_OBJS += $(OUTPUT)ui/hist.o -LIB_OBJS += $(OUTPUT)ui/stdio/hist.o - PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) # We choose to avoid "if .. else if .. else .. endif endif"
@@ -489,9 +482,6 @@ $(OUTPUT)%.o: %.S $(OUTPUT)%.s: %.S $(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $< -$(OUTPUT)ui/setup.o: ui/setup.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DLIBDIR='"$(libdir_SQ)"' $< - $(OUTPUT)ui/browser.o: ui/browser.c $(OUTPUT)PERF-CFLAGS $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DENABLE_SLFUTURE_CONST $<
tools/perf/config/Makefile +1 -0
@@ -838,3 +838,4 @@ $(call detected_var,mandir_SQ) $(call detected_var,ETC_PERFCONFIG_SQ) $(call detected_var,prefix_SQ) $(call detected_var,perfexecdir_SQ) +$(call detected_var,LIBDIR)
tools/perf/ui/Build new file +8 -0
@@ -0,0 +1,8 @@ +libperf-y += setup.o +libperf-y += helpline.o +libperf-y += progress.o +libperf-y += util.o +libperf-y += hist.o +libperf-y += stdio/hist.o + +CFLAGS_setup.o += -DLIBDIR="BUILD_STR($(LIBDIR))"
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 14/36 perf build: Add slang objects building
In reply to Jiri OlsaMove the slang objects building under build framework to be included in the libperf build object.
--- tools/perf/Makefile.perf | 33 --------------------------------- tools/perf/config/Makefile | 1 + tools/perf/ui/Build | 6 ++++++ tools/perf/ui/browsers/Build | 10 ++++++++++ tools/perf/ui/tui/Build | 4 ++++ 5 files changed, 21 insertions(+), 33 deletions(-) create mode 100644 tools/perf/ui/browsers/Build create mode 100644 tools/perf/ui/tui/Build
tools/perf/Makefile.perf +0 -33
@@ -337,24 +337,6 @@ ifneq ($(OUTPUT),) CFLAGS += -I$(OUTPUT) endif -ifndef NO_SLANG - LIB_OBJS += $(OUTPUT)ui/browser.o - LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o - LIB_OBJS += $(OUTPUT)ui/browsers/hists.o - LIB_OBJS += $(OUTPUT)ui/browsers/map.o - LIB_OBJS += $(OUTPUT)ui/browsers/scripts.o - LIB_OBJS += $(OUTPUT)ui/browsers/header.o - LIB_OBJS += $(OUTPUT)ui/tui/setup.o - LIB_OBJS += $(OUTPUT)ui/tui/util.o - LIB_OBJS += $(OUTPUT)ui/tui/helpline.o - LIB_OBJS += $(OUTPUT)ui/tui/progress.o - LIB_H += ui/tui/tui.h - LIB_H += ui/browser.h - LIB_H += ui/browsers/map.h - LIB_H += ui/keysyms.h - LIB_H += ui/libslang.h -endif - ifndef NO_GTK2 ALL_PROGRAMS += $(OUTPUT)libperf-gtk.so
@@ -482,21 +464,6 @@ $(OUTPUT)%.o: %.S $(OUTPUT)%.s: %.S $(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $< -$(OUTPUT)ui/browser.o: ui/browser.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DENABLE_SLFUTURE_CONST $< - -$(OUTPUT)ui/browsers/annotate.o: ui/browsers/annotate.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DENABLE_SLFUTURE_CONST $< - -$(OUTPUT)ui/browsers/hists.o: ui/browsers/hists.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DENABLE_SLFUTURE_CONST $< - -$(OUTPUT)ui/browsers/map.o: ui/browsers/map.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DENABLE_SLFUTURE_CONST $< - -$(OUTPUT)ui/browsers/scripts.o: ui/browsers/scripts.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DENABLE_SLFUTURE_CONST $< - $(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default $<
tools/perf/config/Makefile +1 -0
@@ -473,6 +473,7 @@ ifndef NO_SLANG CFLAGS += -I/usr/include/slang CFLAGS += -DHAVE_SLANG_SUPPORT EXTLIBS += -lslang + $(call detected,CONFIG_SLANG) endif endif
tools/perf/ui/Build +6 -0
@@ -6,3 +6,9 @@ libperf-y += hist.o libperf-y += stdio/hist.o CFLAGS_setup.o += -DLIBDIR="BUILD_STR($(LIBDIR))" + +libperf-$(CONFIG_SLANG) += browser.o +libperf-$(CONFIG_SLANG) += browsers/ +libperf-$(CONFIG_SLANG) += tui/ + +CFLAGS_browser.o += -DENABLE_SLFUTURE_CONST
tools/perf/ui/browsers/Build new file +10 -0
@@ -0,0 +1,10 @@ +libperf-y += annotate.o +libperf-y += hists.o +libperf-y += map.o +libperf-y += scripts.o +libperf-y += header.o + +CFLAGS_annotate.o += -DENABLE_SLFUTURE_CONST +CFLAGS_hists.o += -DENABLE_SLFUTURE_CONST +CFLAGS_map.o += -DENABLE_SLFUTURE_CONST +CFLAGS_scripts.o += -DENABLE_SLFUTURE_CONST
tools/perf/ui/tui/Build new file +4 -0
@@ -0,0 +1,4 @@ +libperf-y += setup.o +libperf-y += util.o +libperf-y += helpline.o +libperf-y += progress.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 15/36 perf build: Add gtk objects building
In reply to Jiri OlsaMove the gtk objects building under build framework.
Add new gtk build object so it's separated from the rest of the code and could be librarized.
--- tools/perf/Build | 2 ++ tools/perf/Makefile.perf | 17 +++++------------ tools/perf/config/Makefile | 1 + tools/perf/ui/gtk/Build | 9 +++++++++ 4 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 tools/perf/ui/gtk/Build
tools/perf/Build +2 -0
@@ -35,3 +35,5 @@ CFLAGS_builtin-timechart.o += $(paths) libperf-y += util/ libperf-y += arch/ libperf-y += ui/ + +gtk-y += ui/gtk/
tools/perf/Makefile.perf +5 -12
@@ -339,14 +339,7 @@ endif ifndef NO_GTK2 ALL_PROGRAMS += $(OUTPUT)libperf-gtk.so - - GTK_OBJS += $(OUTPUT)ui/gtk/browser.o - GTK_OBJS += $(OUTPUT)ui/gtk/hists.o - GTK_OBJS += $(OUTPUT)ui/gtk/setup.o - GTK_OBJS += $(OUTPUT)ui/gtk/util.o - GTK_OBJS += $(OUTPUT)ui/gtk/helpline.o - GTK_OBJS += $(OUTPUT)ui/gtk/progress.o - GTK_OBJS += $(OUTPUT)ui/gtk/annotate.o + GTK_IN := $(OUTPUT)gtk-in.o install-gtk: $(OUTPUT)libperf-gtk.so $(call QUIET_INSTALL, 'GTK UI') \
@@ -414,10 +407,10 @@ $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN) $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \ $(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@ -$(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H) - $(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $< +$(GTK_IN): FORCE + @$(MAKE) $(build)=gtk -$(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS) +$(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt
@@ -697,7 +690,7 @@ config-clean: @$(MAKE) -C config/feature-checks clean >/dev/null clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean - $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS) + $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) @find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) @$(RM) .config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
tools/perf/config/Makefile +1 -0
@@ -840,3 +840,4 @@ $(call detected_var,ETC_PERFCONFIG_SQ) $(call detected_var,prefix_SQ) $(call detected_var,perfexecdir_SQ) $(call detected_var,LIBDIR) +$(call detected_var,GTK_CFLAGS)
tools/perf/ui/gtk/Build new file +9 -0
@@ -0,0 +1,9 @@ +CFLAGS_gtk += -fPIC $(GTK_CFLAGS) + +gtk-y += browser.o +gtk-y += hists.o +gtk-y += setup.o +gtk-y += util.o +gtk-y += helpline.o +gtk-y += progress.o +gtk-y += annotate.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 16/36 perf build: Add scripts objects building
In reply to Jiri OlsaMove the scripts objects building under build framework to be included in the libperf build object.
--- tools/perf/Build | 1 + tools/perf/Makefile.perf | 22 ---------------------- tools/perf/config/Makefile | 7 +++++++ tools/perf/scripts/Build | 2 ++ tools/perf/scripts/perl/Perf-Trace-Util/Build | 3 +++ tools/perf/scripts/python/Perf-Trace-Util/Build | 3 +++ tools/perf/util/Build | 2 ++ tools/perf/util/scripting-engines/Build | 6 ++++++ 8 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 tools/perf/scripts/Build create mode 100644 tools/perf/scripts/perl/Perf-Trace-Util/Build create mode 100644 tools/perf/scripts/python/Perf-Trace-Util/Build create mode 100644 tools/perf/util/scripting-engines/Build
tools/perf/Build +1 -0
@@ -35,5 +35,6 @@ CFLAGS_builtin-timechart.o += $(paths) libperf-y += util/ libperf-y += arch/ libperf-y += ui/ +libperf-$(CONFIG_SCRIPT) += scripts/ gtk-y += ui/gtk/
tools/perf/Makefile.perf +0 -22
@@ -347,16 +347,6 @@ install-gtk: $(OUTPUT)libperf-gtk.so $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' endif -ifndef NO_LIBPERL - LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o - LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o -endif - -ifndef NO_LIBPYTHON - LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o - LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o -endif - ifeq ($(NO_PERF_REGS),0) ifeq ($(ARCH),x86) LIB_H += arch/x86/include/perf_regs.h
@@ -457,18 +447,6 @@ $(OUTPUT)%.o: %.S $(OUTPUT)%.s: %.S $(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $< -$(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default $< - -$(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default $< - -$(OUTPUT)util/scripting-engines/trace-event-python.o: util/scripting-engines/trace-event-python.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $< - -$(OUTPUT)scripts/python/Perf-Trace-Util/Context.o: scripts/python/Perf-Trace-Util/Context.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs $< - $(OUTPUT)perf-%: %.o $(PERFLIBS) $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS)
tools/perf/config/Makefile +7 -0
@@ -512,6 +512,8 @@ else else LDFLAGS += $(PERL_EMBED_LDFLAGS) EXTLIBS += $(PERL_EMBED_LIBADD) + $(call detected,CONFIG_LIBPERL) + CONFIG_SCRIPT := y endif endif
@@ -571,6 +573,8 @@ else LDFLAGS += $(PYTHON_EMBED_LDFLAGS) EXTLIBS += $(PYTHON_EMBED_LIBADD) LANG_BINDINGS += $(obj-perf)python/perf.so + $(call detected,CONFIG_LIBPYTHON) + CONFIG_SCRIPT := y endif endif endif
@@ -841,3 +845,6 @@ $(call detected_var,prefix_SQ) $(call detected_var,perfexecdir_SQ) $(call detected_var,LIBDIR) $(call detected_var,GTK_CFLAGS) +$(call detected_var,PERL_EMBED_CCOPTS) +$(call detected_var,PYTHON_EMBED_CCOPTS) +$(call detected_var,CONFIG_SCRIPT)
tools/perf/scripts/Build new file +2 -0
@@ -0,0 +1,2 @@ +libperf-$(CONFIG_LIBPERL) += perl/Perf-Trace-Util/ +libperf-$(CONFIG_LIBPYTHON) += python/Perf-Trace-Util/
tools/perf/scripts/perl/Perf-Trace-Util/Build new file +3 -0
@@ -0,0 +1,3 @@ +libperf-y += Context.o + +CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default
tools/perf/scripts/python/Perf-Trace-Util/Build new file +3 -0
@@ -0,0 +1,3 @@ +libperf-y += Context.o + +CFLAGS_Context.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs
tools/perf/util/Build +2 -0
@@ -88,6 +88,8 @@ libperf-$(CONFIG_DWARF) += dwarf-aux.o libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o +libperf-$(CONFIG_SCRIPT) += scripting-engines/ + CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
tools/perf/util/scripting-engines/Build new file +6 -0
@@ -0,0 +1,6 @@ +libperf-$(CONFIG_LIBPERL) += trace-event-perl.o +libperf-$(CONFIG_LIBPYTHON) += trace-event-python.o + +CFLAGS_trace-event-perl.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default + +CFLAGS_trace-event-python.o += $(PYTHON_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 17/36 perf build: Add perf regs objects building
In reply to Jiri OlsaMove the regs objects building under build framework to be included in the libperf build object.
--- tools/perf/Makefile.perf | 7 ------- tools/perf/config/Makefile | 4 ++++ tools/perf/util/Build | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-)
tools/perf/Makefile.perf +0 -7
@@ -347,13 +347,6 @@ install-gtk: $(OUTPUT)libperf-gtk.so $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' endif -ifeq ($(NO_PERF_REGS),0) - ifeq ($(ARCH),x86) - LIB_H += arch/x86/include/perf_regs.h - endif - LIB_OBJS += $(OUTPUT)util/perf_regs.o -endif - ifndef NO_ZLIB LIB_OBJS += $(OUTPUT)util/zlib.o endif
tools/perf/config/Makefile +4 -0
@@ -48,6 +48,10 @@ ifeq ($(ARCH),arm64) LIBUNWIND_LIBS = -lunwind -lunwind-aarch64 endif +ifeq ($(NO_PERF_REGS),0) + $(call detected,CONFIG_PERF_REGS) +endif + # So far there's only x86 and arm libdw unwind support merged in perf. # Disable it on all other architectures in case libdw unwind # support is detected in system. Add supported architectures
tools/perf/util/Build +2 -0
@@ -90,6 +90,8 @@ libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o libperf-$(CONFIG_SCRIPT) += scripting-engines/ +libperf-$(CONFIG_PERF_REGS) += perf_regs.o + CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 18/36 perf build: Add zlib objects building
In reply to Jiri OlsaMove the zlib objects building under build framework to be included in the libperf build object.
--- tools/perf/Makefile.perf | 4 ---- tools/perf/config/Makefile | 1 + tools/perf/util/Build | 1 + 3 files changed, 2 insertions(+), 4 deletions(-)
tools/perf/Makefile.perf +0 -4
@@ -347,10 +347,6 @@ install-gtk: $(OUTPUT)libperf-gtk.so $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' endif -ifndef NO_ZLIB - LIB_OBJS += $(OUTPUT)util/zlib.o -endif - ifdef ASCIIDOC8 export ASCIIDOC8 endif
tools/perf/config/Makefile +1 -0
@@ -636,6 +636,7 @@ ifndef NO_ZLIB ifeq ($(feature-zlib), 1) CFLAGS += -DHAVE_ZLIB_SUPPORT EXTLIBS += -lz + $(call detected,CONFIG_ZLIB) else NO_ZLIB := 1 endif
tools/perf/util/Build +1 -0
@@ -91,6 +91,7 @@ libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o libperf-$(CONFIG_SCRIPT) += scripting-engines/ libperf-$(CONFIG_PERF_REGS) += perf_regs.o +libperf-$(CONFIG_ZLIB) += zlib.o CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 19/36 perf build: Add perf.o object building
In reply to Jiri OlsaMove the perf object building under build framework to be included in the perf build object.
--- tools/perf/Build | 3 +++ tools/perf/Makefile.perf | 16 +++++----------- 2 files changed, 8 insertions(+), 11 deletions(-)
tools/perf/Build +3 -0
@@ -25,12 +25,15 @@ perf-$(CONFIG_LIBELF) += builtin-probe.o perf-y += bench/ perf-y += tests/ +perf-y += perf.o + paths += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))" paths += -DPERF_INFO_PATH="BUILD_STR($(infodir_SQ))" paths += -DPERF_MAN_PATH="BUILD_STR($(mandir_SQ))" CFLAGS_builtin-help.o += $(paths) CFLAGS_builtin-timechart.o += $(paths) +CFLAGS_perf.o += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))" -include $(OUTPUT)PERF-VERSION-FILE libperf-y += util/ libperf-y += arch/
tools/perf/Makefile.perf +5 -11
@@ -374,16 +374,11 @@ PERF_IN := $(OUTPUT)perf-in.o export srctree OUTPUT RM CC LD CFLAGS V BISON FLEX build := -f $(srctree)/tools/build/Makefile.build dir=. obj -$(PERF_IN): FORCE +$(PERF_IN): $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h FORCE @$(MAKE) $(build)=perf -$(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -include $(OUTPUT)PERF-VERSION-FILE \ - '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ - $(CFLAGS) -c $(filter %.c,$^) -o $@ - -$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \ +$(OUTPUT)perf: $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) \ $(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@ $(GTK_IN): FORCE
@@ -401,8 +396,7 @@ $(SCRIPTS) : % : %.sh $(QUIET_GEN)$(INSTALL) '[email protected]' '$(OUTPUT)$@' # These can record PERF_VERSION -$(OUTPUT)perf.o perf.spec \ - $(SCRIPTS) \ +perf.spec $(SCRIPTS) \ : $(OUTPUT)PERF-VERSION-FILE .SUFFIXES:
@@ -657,7 +651,7 @@ config-clean: @$(MAKE) -C config/feature-checks clean >/dev/null clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean - $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) + $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) @find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) @$(RM) .config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 20/36 perf build: Add arch x86 objects building
In reply to Jiri OlsaMove the x86 arch objects building under build framework to be included in the libperf build object.
--- tools/perf/arch/Build | 1 + tools/perf/arch/arm/Build | 0 tools/perf/arch/arm64/Build | 0 tools/perf/arch/powerpc/Build | 0 tools/perf/arch/s390/Build | 0 tools/perf/arch/sh/Build | 0 tools/perf/arch/sparc/Build | 0 tools/perf/arch/x86/Build | 2 ++ tools/perf/arch/x86/Makefile | 15 --------------- tools/perf/arch/x86/tests/Build | 2 ++ tools/perf/arch/x86/util/Build | 8 ++++++++ 11 files changed, 13 insertions(+), 15 deletions(-) create mode 100644 tools/perf/arch/arm/Build create mode 100644 tools/perf/arch/arm64/Build create mode 100644 tools/perf/arch/powerpc/Build create mode 100644 tools/perf/arch/s390/Build create mode 100644 tools/perf/arch/sh/Build create mode 100644 tools/perf/arch/sparc/Build create mode 100644 tools/perf/arch/x86/Build create mode 100644 tools/perf/arch/x86/tests/Build create mode 100644 tools/perf/arch/x86/util/Build
tools/perf/arch/Build +1 -0
@@ -1 +1,2 @@ libperf-y += common.o +libperf-y += $(ARCH)/
tools/perf/arch/arm/Build new file +0 -0
tools/perf/arch/arm64/Build new file +0 -0
tools/perf/arch/powerpc/Build new file +0 -0
tools/perf/arch/s390/Build new file +0 -0
tools/perf/arch/sh/Build new file +0 -0
tools/perf/arch/sparc/Build new file +0 -0
tools/perf/arch/x86/Build new file +2 -0
@@ -0,0 +1,2 @@ +libperf-y += util/ +libperf-$(CONFIG_DWARF_UNWIND) += tests/
tools/perf/arch/x86/Makefile +0 -15
@@ -1,19 +1,4 @@ ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o endif -ifndef NO_LIBUNWIND -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o -endif -ifndef NO_LIBDW_DWARF_UNWIND -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libdw.o -endif -ifndef NO_DWARF_UNWIND -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/regs_load.o -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/dwarf-unwind.o -endif -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/tsc.o -LIB_H += arch/$(ARCH)/util/tsc.h HAVE_KVM_STAT_SUPPORT := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/kvm-stat.o
tools/perf/arch/x86/tests/Build new file +2 -0
@@ -0,0 +1,2 @@ +libperf-y += regs_load.o +libperf-y += dwarf-unwind.o
tools/perf/arch/x86/util/Build new file +8 -0
@@ -0,0 +1,8 @@ +libperf-y += header.o +libperf-y += tsc.o +libperf-y += kvm-stat.o + +libperf-$(CONFIG_DWARF) += dwarf-regs.o + +libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o +libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 21/36 perf build: Add arch arm objects building
In reply to Jiri OlsaMove the arm arch objects building under build framework to be included in the libperf build object.
--- tools/perf/arch/arm/Build | 2 ++ tools/perf/arch/arm/Makefile | 11 ----------- tools/perf/arch/arm/tests/Build | 2 ++ tools/perf/arch/arm/util/Build | 4 ++++ 4 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 tools/perf/arch/arm/tests/Build create mode 100644 tools/perf/arch/arm/util/Build
tools/perf/arch/arm/Build +2 -0
@@ -0,0 +1,2 @@ +libperf-y += util/ +libperf-$(CONFIG_DWARF_UNWIND) += tests/
tools/perf/arch/arm/Makefile +0 -11
@@ -1,14 +1,3 @@ ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o -endif -ifndef NO_LIBUNWIND -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o -endif -ifndef NO_LIBDW_DWARF_UNWIND -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libdw.o -endif -ifndef NO_DWARF_UNWIND -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/regs_load.o -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/dwarf-unwind.o endif
tools/perf/arch/arm/tests/Build new file +2 -0
@@ -0,0 +1,2 @@ +libperf-y += regs_load.o +libperf-y += dwarf-unwind.o
tools/perf/arch/arm/util/Build new file +4 -0
@@ -0,0 +1,4 @@ +libperf-$(CONFIG_DWARF) += dwarf-regs.o + +libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o +libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 22/36 perf build: Add arch arm64 objects building
In reply to Jiri OlsaMove the arm64 arch objects building under build framework to be included in the libperf build object.
--- tools/perf/arch/arm64/Build | 3 +++ tools/perf/arch/arm64/Makefile | 4 ---- tools/perf/arch/arm64/util/Build | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 tools/perf/arch/arm64/util/Build
tools/perf/arch/arm64/Build +3 -0
@@ -0,0 +1,3 @@ +ifneq ($(CONFIG_DWARF)$(CONFIG_LIBUNWIND),) +libperf-y += util/ +endif
tools/perf/arch/arm64/Makefile +0 -4
@@ -1,7 +1,3 @@ ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o -endif -ifndef NO_LIBUNWIND -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o endif
tools/perf/arch/arm64/util/Build new file +2 -0
@@ -0,0 +1,2 @@ +libperf-$(CONFIG_DWARF) += dwarf-regs.o +libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 23/36 perf build: Add arch powerpc objects building
In reply to Jiri OlsaMove the powerpc arch objects building under build framework to be included in the libperf build object.
--- tools/perf/arch/powerpc/Build | 1 + tools/perf/arch/powerpc/Makefile | 3 --- tools/perf/arch/powerpc/util/Build | 4 ++++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 tools/perf/arch/powerpc/util/Build
tools/perf/arch/powerpc/Build +1 -0
@@ -0,0 +1 @@ +libperf-y += util/
tools/perf/arch/powerpc/Makefile +0 -3
@@ -1,6 +1,3 @@ ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/skip-callchain-idx.o endif -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o
tools/perf/arch/powerpc/util/Build new file +4 -0
@@ -0,0 +1,4 @@ +libperf-y += header.o + +libperf-$(CONFIG_DWARF) += dwarf-regs.o +libperf-$(CONFIG_DWARF) += skip-callchain-idx.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 24/36 perf build: Add arch s390 objects building
In reply to Jiri OlsaMove the s390 arch objects building under build framework to be included in the libperf build object.
--- tools/perf/arch/s390/Build | 1 + tools/perf/arch/s390/Makefile | 3 --- tools/perf/arch/s390/util/Build | 4 ++++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 tools/perf/arch/s390/util/Build
tools/perf/arch/s390/Build +1 -0
@@ -0,0 +1 @@ +libperf-y += util/
tools/perf/arch/s390/Makefile +0 -3
@@ -1,7 +1,4 @@ ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o endif -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o HAVE_KVM_STAT_SUPPORT := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/kvm-stat.o
tools/perf/arch/s390/util/Build new file +4 -0
@@ -0,0 +1,4 @@ +libperf-y += header.o +libperf-y += kvm-stat.o + +libperf-$(CONFIG_DWARF) += dwarf-regs.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 25/36 perf build: Add arch sh objects building
In reply to Jiri OlsaMove the sh arch objects building under build framework to be included in the libperf build object.
--- tools/perf/arch/sh/Build | 1 + tools/perf/arch/sh/Makefile | 1 - tools/perf/arch/sh/util/Build | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 tools/perf/arch/sh/util/Build
tools/perf/arch/sh/Build +1 -0
@@ -0,0 +1 @@ +libperf-$(CONFIG_DWARF) += util/
tools/perf/arch/sh/Makefile +0 -1
@@ -1,4 +1,3 @@ ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o endif
tools/perf/arch/sh/util/Build new file +1 -0
@@ -0,0 +1 @@ +libperf-y += dwarf-regs.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 26/36 perf build: Add arch sparc objects building
In reply to Jiri OlsaMove the sparc arch objects building under build framework to be included in the libperf build object.
--- tools/perf/arch/sparc/Build | 1 + tools/perf/arch/sparc/Makefile | 1 - tools/perf/arch/sparc/util/Build | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 tools/perf/arch/sparc/util/Build
tools/perf/arch/sparc/Build +1 -0
@@ -0,0 +1 @@ +libperf-$(CONFIG_DWARF) += util/
tools/perf/arch/sparc/Makefile +0 -1
@@ -1,4 +1,3 @@ ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 -LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o endif
tools/perf/arch/sparc/util/Build new file +1 -0
@@ -0,0 +1 @@ +libperf-y += dwarf-regs.o
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 27/36 perf build: Add single target build framework support
In reply to Jiri OlsaAdd support to build single targets, like:
$ make util/map.o # objects $ make util/map.i # preprocessor $ make util/map.s # assembly
--- tools/build/Makefile.build | 20 +++++++++++++++++++- tools/perf/Makefile.perf | 39 ++++++++++++++++++++++++++++----------- tools/perf/util/Build | 7 +++++++ 3 files changed, 54 insertions(+), 12 deletions(-)
tools/build/Makefile.build +19 -1
@@ -44,6 +44,12 @@ quiet_cmd_mkdir = MKDIR $(dir $@) quiet_cmd_cc_o_c = CC $@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< +quiet_cmd_cc_i_c = CPP $@ + cmd_cc_i_c = $(CC) $(c_flags) -E -o $@ $< + +quiet_cmd_cc_s_c = AS $@ + cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $< + # Link agregate command quiet_cmd_ld_multi = LD $@ cmd_ld_multi = $(LD) -r -o $@ $^
@@ -57,6 +63,18 @@ $(OUTPUT)%.o: %.S FORCE $(call rule_mkdir) $(call if_changed_dep,cc_o_c) +$(OUTPUT)%.i: %.c FORCE + $(call rule_mkdir) + $(call if_changed_dep,cc_i_c) + +$(OUTPUT)%.i: %.S FORCE + $(call rule_mkdir) + $(call if_changed_dep,cc_i_c) + +$(OUTPUT)%.s: %.c FORCE + $(call rule_mkdir) + $(call if_changed_dep,cc_s_c) + # Gather build data: # obj-y - list of build objects # subdir-y - list of directories to nest
@@ -94,7 +112,7 @@ FORCE: # Include all cmd files to get all the dependency rules # for all objects included -targets := $(wildcard $(sort $(obj-y))) +targets := $(wildcard $(sort $(obj-y) $(MAKECMDGOALS))) cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) ifneq ($(cmd_files),)
tools/perf/Makefile.perf +28 -11
@@ -419,16 +419,33 @@ endif # These two need to be here so that when O= is not used they take precedence # over the general rule for .o -$(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $< -$(OUTPUT)%.i: %.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $< -$(OUTPUT)%.s: %.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -S $(CFLAGS) $< -$(OUTPUT)%.o: %.S - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $< -$(OUTPUT)%.s: %.S - $(QUIET_CC)$(CC) -o $@ -E $(CFLAGS) $< +# get relative building directory (to $(OUTPUT)) +# and '.' if it's $(OUTPUT) itself +__build-dir = $(subst $(OUTPUT),,$(dir $@)) +build-dir = $(if $(__build-dir),$(__build-dir),.) + +single_dep: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h + +$(OUTPUT)%.o: %.c single_dep FORCE + @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + +$(OUTPUT)%.i: %.c single_dep FORCE + @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + +$(OUTPUT)%.s: %.c single_dep FORCE + @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + +$(OUTPUT)%-bison.o: %.c single_dep FORCE + @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + +$(OUTPUT)%-flex.o: %.c single_dep FORCE + @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + +$(OUTPUT)%.o: %.S single_dep FORCE + @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + +$(OUTPUT)%.i: %.S single_dep FORCE + @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)perf-%: %.o $(PERFLIBS) $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS)
@@ -673,5 +690,5 @@ FORCE: .PHONY: all install clean config-clean strip install-gtk .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell -.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS FORCE +.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS FORCE single_dep
tools/perf/util/Build +7 -0
@@ -97,15 +97,19 @@ CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))" $(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c + $(call rule_mkdir) @$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l $(OUTPUT)util/parse-events-bison.c: util/parse-events.y + $(call rule_mkdir) @$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_ $(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c + $(call rule_mkdir) @$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l $(OUTPUT)util/pmu-bison.c: util/pmu.y + $(call rule_mkdir) @$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_ CFLAGS_parse-events-flex.o += -w
@@ -121,10 +125,13 @@ CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ET CFLAGS_parse-events.o += -Wno-redundant-decls $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE + $(call rule_mkdir) $(call if_changed_dep,cc_o_c) $(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE + $(call rule_mkdir) $(call if_changed_dep,cc_o_c) $(OUTPUT)util/rbtree.o: ../../lib/rbtree.c FORCE + $(call rule_mkdir) $(call if_changed_dep,cc_o_c)
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 28/36 perf build: Remove directory dependency rules
In reply to Jiri OlsaRemoving subdirectories creation support from Makefile.perf as it's no longer needed, since it's properly handled by new build system.
--- tools/perf/Makefile.perf | 15 --------------- 1 file changed, 15 deletions(-)
tools/perf/Makefile.perf +0 -15
@@ -463,21 +463,6 @@ endif $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H) $(patsubst perf-%,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) -# we compile into subdirectories. if the target directory is not the source directory, they might not exists. So -# we depend the various files onto their directories. -DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(GTK_OBJS) -DIRECTORY_DEPS += $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h -# no need to add flex objects, because they depend on bison ones -DIRECTORY_DEPS += $(OUTPUT)util/parse-events-bison.c -DIRECTORY_DEPS += $(OUTPUT)util/pmu-bison.c - -OUTPUT_DIRECTORIES := $(sort $(dir $(DIRECTORY_DEPS))) - -$(DIRECTORY_DEPS): | $(OUTPUT_DIRECTORIES) -# In the second step, we make a rule to actually create these directories -$(OUTPUT_DIRECTORIES): - $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null - LIBPERF_IN := $(OUTPUT)libperf-in.o $(LIBPERF_IN): FORCE
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 29/36 perf build: Remove uneeded variables
In reply to Jiri OlsaRemoving uneeded variables from Makefile.perf:
BUILTIN_OBJS LIB_OBJS GTK_OBJS
- objects are now hold by in the build Makefiles
LIB_H
- header dependencies iare now handled by Build framework
--- tools/perf/Makefile.perf | 123 ++--------------------------------------------- 1 file changed, 5 insertions(+), 118 deletions(-)
tools/perf/Makefile.perf +5 -118
@@ -137,10 +137,6 @@ export prefix bindir sharedir sysconfdir DESTDIR SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ # Guard against environment variables -BUILTIN_OBJS = -LIB_H = -LIB_OBJS = -GTK_OBJS = PYRF_OBJS = SCRIPT_SH =
@@ -218,113 +214,6 @@ export PERL_PATH LIB_FILE=$(OUTPUT)libperf.a -LIB_H += ../lib/symbol/kallsyms.h -LIB_H += ../../include/uapi/linux/perf_event.h -LIB_H += ../../include/linux/rbtree.h -LIB_H += ../../include/linux/list.h -LIB_H += ../../include/uapi/linux/const.h -LIB_H += ../include/linux/hash.h -LIB_H += ../../include/linux/stringify.h -LIB_H += util/include/linux/bitmap.h -LIB_H += ../include/linux/bitops.h -LIB_H += ../include/asm-generic/bitops/atomic.h -LIB_H += ../include/asm-generic/bitops/find.h -LIB_H += ../include/asm-generic/bitops/fls64.h -LIB_H += ../include/asm-generic/bitops/fls.h -LIB_H += ../include/asm-generic/bitops/__ffs.h -LIB_H += ../include/asm-generic/bitops/__fls.h -LIB_H += ../include/asm-generic/bitops.h -LIB_H += ../include/linux/compiler.h -LIB_H += ../include/linux/log2.h -LIB_H += util/include/linux/const.h -LIB_H += util/include/linux/ctype.h -LIB_H += util/include/linux/kernel.h -LIB_H += util/include/linux/list.h -LIB_H += ../include/linux/export.h -LIB_H += util/include/linux/poison.h -LIB_H += util/include/linux/rbtree.h -LIB_H += util/include/linux/rbtree_augmented.h -LIB_H += util/include/linux/string.h -LIB_H += ../include/linux/types.h -LIB_H += util/include/linux/linkage.h -LIB_H += util/include/asm/asm-offsets.h -LIB_H += ../include/asm/bug.h -LIB_H += util/include/asm/byteorder.h -LIB_H += util/include/asm/hweight.h -LIB_H += util/include/asm/swab.h -LIB_H += util/include/asm/system.h -LIB_H += util/include/asm/uaccess.h -LIB_H += util/include/dwarf-regs.h -LIB_H += util/include/asm/dwarf2.h -LIB_H += util/include/asm/cpufeature.h -LIB_H += util/include/asm/unistd_32.h -LIB_H += util/include/asm/unistd_64.h -LIB_H += perf.h -LIB_H += util/annotate.h -LIB_H += util/cache.h -LIB_H += util/callchain.h -LIB_H += util/build-id.h -LIB_H += util/db-export.h -LIB_H += util/debug.h -LIB_H += util/pmu.h -LIB_H += util/event.h -LIB_H += util/evsel.h -LIB_H += util/evlist.h -LIB_H += util/exec_cmd.h -LIB_H += util/find-vdso-map.c -LIB_H += util/levenshtein.h -LIB_H += util/machine.h -LIB_H += util/map.h -LIB_H += util/parse-options.h -LIB_H += util/parse-events.h -LIB_H += util/quote.h -LIB_H += util/util.h -LIB_H += util/xyarray.h -LIB_H += util/header.h -LIB_H += util/help.h -LIB_H += util/session.h -LIB_H += util/ordered-events.h -LIB_H += util/strbuf.h -LIB_H += util/strlist.h -LIB_H += util/strfilter.h -LIB_H += util/svghelper.h -LIB_H += util/tool.h -LIB_H += util/run-command.h -LIB_H += util/sigchain.h -LIB_H += util/dso.h -LIB_H += util/symbol.h -LIB_H += util/color.h -LIB_H += util/values.h -LIB_H += util/sort.h -LIB_H += util/hist.h -LIB_H += util/comm.h -LIB_H += util/thread.h -LIB_H += util/thread_map.h -LIB_H += util/trace-event.h -LIB_H += util/probe-finder.h -LIB_H += util/dwarf-aux.h -LIB_H += util/probe-event.h -LIB_H += util/pstack.h -LIB_H += util/cpumap.h -LIB_H += util/top.h -LIB_H += $(ARCH_INCLUDE) -LIB_H += util/cgroup.h -LIB_H += $(LIB_INCLUDE)traceevent/event-parse.h -LIB_H += util/target.h -LIB_H += util/rblist.h -LIB_H += util/intlist.h -LIB_H += util/perf_regs.h -LIB_H += util/unwind.h -LIB_H += util/vdso.h -LIB_H += util/tsc.h -LIB_H += ui/helpline.h -LIB_H += ui/progress.h -LIB_H += ui/util.h -LIB_H += ui/ui.h -LIB_H += util/data.h -LIB_H += util/kvm-stat.h -LIB_H += util/thread-stack.h - PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) # We choose to avoid "if .. else if .. else .. endif endif"
@@ -377,9 +266,8 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj $(PERF_IN): $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h FORCE @$(MAKE) $(build)=perf -$(OUTPUT)perf: $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) \ - $(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@ +$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ $(GTK_IN): FORCE @$(MAKE) $(build)=gtk
@@ -460,15 +348,14 @@ $(OUTPUT)perf-read-vdsox32: perf-read-vdso.c util/find-vdso-map.c $(QUIET_CC)$(CC) -mx32 $(filter -static,$(LDFLAGS)) -Wall -Werror -o $@ perf-read-vdso.c endif -$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H) -$(patsubst perf-%,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) +$(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h) LIBPERF_IN := $(OUTPUT)libperf-in.o $(LIBPERF_IN): FORCE @$(MAKE) $(build)=libperf -$(LIB_FILE): $(LIB_OBJS) $(LIBPERF_IN) +$(LIB_FILE): $(LIBPERF_IN) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS) # libtraceevent.a
@@ -653,7 +540,7 @@ config-clean: @$(MAKE) -C config/feature-checks clean >/dev/null clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean - $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) + $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) @find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) @$(RM) .config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 30/36 perf build: Remove PERF-CFLAGS file
In reply to Jiri OlsaRemoving PERF-CFLAGS file, because the build framework stores full build command line for each object and triggers rebuilt if necessary.
--- tools/perf/Makefile.perf | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)
tools/perf/Makefile.perf +3 -14
@@ -365,7 +365,7 @@ LIBTRACEEVENT_FLAGS = $(QUIET_SUBDIR1) O=$(OUTPUT) LIBTRACEEVENT_FLAGS += CFLAGS="-g -Wall $(EXTRA_CFLAGS)" LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) -$(LIBTRACEEVENT): $(TE_SOURCES) $(OUTPUT)PERF-CFLAGS +$(LIBTRACEEVENT): $(TE_SOURCES) $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) libtraceevent.a plugins $(LIBTRACEEVENT)-clean:
@@ -444,17 +444,6 @@ cscope: $(QUIET_GEN)$(RM) cscope*; \ $(FIND) $(TAG_FOLDERS) -name '*.[hcS]' -print | xargs cscope -b $(TAG_FILES) -### Detect prefix changes -TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):\ - $(bindir_SQ):$(perfexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):$(plugindir_SQ) - -$(OUTPUT)PERF-CFLAGS: .FORCE-PERF-CFLAGS - @FLAGS='$(TRACK_CFLAGS)'; \ - if test x"$$FLAGS" != x"`cat $(OUTPUT)PERF-CFLAGS 2>/dev/null`" ; then \ - echo 1>&2 " FLAGS: * new build flags or prefix"; \ - echo "$$FLAGS" >$(OUTPUT)PERF-CFLAGS; \ - fi - ### Testing rules # GNU make supports exporting all variables by "export" without parameters.
@@ -544,7 +533,7 @@ clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean @find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) @$(RM) .config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 - $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* + $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean $(python-clean)
@@ -562,5 +551,5 @@ FORCE: .PHONY: all install clean config-clean strip install-gtk .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell -.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS FORCE single_dep +.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope FORCE single_dep
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 31/36 perf build: Add build documentation
In reply to Jiri OlsaAdding file describing the basics of perf build process.
--- tools/perf/Documentation/Build.txt | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tools/perf/Documentation/Build.txt
tools/perf/Documentation/Build.txt new file +49 -0
@@ -0,0 +1,49 @@ + +1) perf build +============= +The perf build process consists of several separated building blocks, +which are linked together to form the perf binary: + - libperf library (static) + - perf builtin commands + - traceevent library (static) + - GTK ui library + +Several makefiles govern the perf build: + + - Makefile + top level Makefile working as a wrapper that calls the main + Makefile.perf with a -j option to do parallel builds. + + - Makefile.perf + main makefile that triggers build of all perf objects including + installation and documentation processing. + + - tools/build/Makefile.build + main makefile of the build framework + + - tools/build/Build.include + build framework generic definitions + + - Build makefiles + makefiles that defines build objects + +Please refer to tools/build/Documentation/Build.txt for more +information about build framework. + + +2) perf build +============= +The Makefile.perf triggers the build framework for build objects: + perf, libperf, gtk + +resulting in following objects: + $ ls *-in.o + gtk-in.o libperf-in.o perf-in.o + +Those objects are then used in final linking: + libperf-gtk.so <- gtk-in.o libperf-in.o + perf <- perf-in.o libperf-in.o + + +NOTE this description is omitting other libraries involved, only + focusing on build framework outcomes
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 32/36 tools lib api: Use tools build framework
In reply to Jiri OlsaMove the libapikfs library building under tools
build framework.
--- tools/lib/api/Build | 2 ++ tools/lib/api/Makefile | 57 +++++++++++++++++++++--------------------------- tools/lib/api/fd/Build | 1 + tools/lib/api/fs/Build | 2 ++ tools/perf/Makefile.perf | 12 ++-------- 5 files changed, 32 insertions(+), 42 deletions(-) create mode 100644 tools/lib/api/Build create mode 100644 tools/lib/api/fd/Build create mode 100644 tools/lib/api/fs/Build
tools/lib/api/Build new file +2 -0
@@ -0,0 +1,2 @@ +libapikfs-y += fd/ +libapikfs-y += fs/
tools/lib/api/Makefile +25 -32
74 lines not on this page · raw message
tools/lib/api/fd/Build new file +1 -0
@@ -0,0 +1 @@ +libapikfs-y += array.o
tools/lib/api/fs/Build new file +2 -0
@@ -0,0 +1,2 @@ +libapikfs-y += fs.o +libapikfs-y += debugfs.o
tools/perf/Makefile.perf +2 -10
@@ -375,20 +375,12 @@ $(LIBTRACEEVENT)-clean: install-traceevent-plugins: $(LIBTRACEEVENT) $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) install_plugins -LIBAPIKFS_SOURCES = $(wildcard $(LIB_PATH)fs/*.[ch] $(LIB_PATH)fd/*.[ch]) - -# if subdir is set, we've been called from above so target has been built -# already -$(LIBAPIKFS): $(LIBAPIKFS_SOURCES) -ifeq ($(subdir),) - $(QUIET_SUBDIR0)$(LIB_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) libapikfs.a -endif +$(LIBAPIKFS): FORCE + @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapikfs.a $(LIBAPIKFS)-clean: -ifeq ($(subdir),) $(call QUIET_CLEAN, libapikfs) @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null -endif help: @echo 'Perf make targets:'
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 33/36 tools lib api: Rename libapikfs.a to libapi.a
In reply to Jiri OlsaRenaming libapikfs.a to libapi.a, because it's not just 'fs' specific library now.
--- tools/lib/api/Build | 4 ++-- tools/lib/api/Makefile | 8 ++++---- tools/lib/api/fd/Build | 2 +- tools/lib/api/fs/Build | 4 ++-- tools/perf/Makefile.perf | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-)
tools/lib/api/Build +2 -2
@@ -1,2 +1,2 @@ -libapikfs-y += fd/ -libapikfs-y += fs/ +libapi-y += fd/ +libapi-y += fs/
tools/lib/api/Makefile +4 -4
@@ -13,7 +13,7 @@ AR = $(CROSS_COMPILE)ar MAKEFLAGS += --no-print-directory -LIBFILE = $(OUTPUT)libapikfs.a +LIBFILE = $(OUTPUT)libapi.a CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
@@ -21,20 +21,20 @@ CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 RM = rm -f build := -f $(srctree)/tools/build/Makefile.build dir=. obj -API_IN := $(OUTPUT)libapikfs-in.o +API_IN := $(OUTPUT)libapi-in.o export srctree OUTPUT CC LD CFLAGS V all: $(LIBFILE) $(API_IN): FORCE - @$(MAKE) $(build)=libapikfs + @$(MAKE) $(build)=libapi $(LIBFILE): $(API_IN) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(API_IN) clean: - $(call QUIET_CLEAN, libapikfs) $(RM) $(LIBFILE); \ + $(call QUIET_CLEAN, libapi) $(RM) $(LIBFILE); \ find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) FORCE:
tools/lib/api/fd/Build +1 -1
@@ -1 +1 @@ -libapikfs-y += array.o +libapi-y += array.o
tools/lib/api/fs/Build +2 -2
@@ -1,2 +1,2 @@ -libapikfs-y += fs.o -libapikfs-y += debugfs.o +libapi-y += fs.o +libapi-y += debugfs.o
tools/perf/Makefile.perf +3 -3
@@ -161,7 +161,7 @@ endif LIBTRACEEVENT = $(TE_PATH)libtraceevent.a export LIBTRACEEVENT -LIBAPIKFS = $(LIB_PATH)libapikfs.a +LIBAPIKFS = $(LIB_PATH)libapi.a export LIBAPIKFS # python extension build directories
@@ -376,10 +376,10 @@ install-traceevent-plugins: $(LIBTRACEEVENT) $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) install_plugins $(LIBAPIKFS): FORCE - @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapikfs.a + @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a $(LIBAPIKFS)-clean: - $(call QUIET_CLEAN, libapikfs) + $(call QUIET_CLEAN, libapi) @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null help:
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 34/36 tools lib traceevent: Use tools build framework
In reply to Jiri OlsaMove the libtraceevent library building under tools build framework.
--- tools/lib/traceevent/Build | 17 +++++ tools/lib/traceevent/Makefile | 161 ++++++++++-------------------------------- tools/perf/Makefile.perf | 10 +-- 3 files changed, 59 insertions(+), 129 deletions(-) create mode 100644 tools/lib/traceevent/Build
tools/lib/traceevent/Build new file +17 -0
@@ -0,0 +1,17 @@ +libtraceevent-y += event-parse.o +libtraceevent-y += event-plugin.o +libtraceevent-y += trace-seq.o +libtraceevent-y += parse-filter.o +libtraceevent-y += parse-utils.o +libtraceevent-y += kbuffer-parse.o + +plugin_jbd2-y += plugin_jbd2.o +plugin_hrtimer-y += plugin_hrtimer.o +plugin_kmem-y += plugin_kmem.o +plugin_kvm-y += plugin_kvm.o +plugin_mac80211-y += plugin_mac80211.o +plugin_sched_switch-y += plugin_sched_switch.o +plugin_function-y += plugin_function.o +plugin_xen-y += plugin_xen.o +plugin_scsi-y += plugin_scsi.o +plugin_cfg80211-y += plugin_cfg80211.o
tools/lib/traceevent/Makefile +39 -122
230 lines not on this page · raw message
tools/perf/Makefile.perf +3 -7
@@ -358,22 +358,18 @@ $(LIBPERF_IN): FORCE $(LIB_FILE): $(LIBPERF_IN) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS) -# libtraceevent.a -TE_SOURCES = $(wildcard $(TRACE_EVENT_DIR)*.[ch]) - -LIBTRACEEVENT_FLAGS = $(QUIET_SUBDIR1) O=$(OUTPUT) LIBTRACEEVENT_FLAGS += CFLAGS="-g -Wall $(EXTRA_CFLAGS)" LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) -$(LIBTRACEEVENT): $(TE_SOURCES) - $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) libtraceevent.a plugins +$(LIBTRACEEVENT): FORCE + @$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a plugins $(LIBTRACEEVENT)-clean: $(call QUIET_CLEAN, libtraceevent) @$(MAKE) -C $(TRACE_EVENT_DIR) O=$(OUTPUT) clean >/dev/null install-traceevent-plugins: $(LIBTRACEEVENT) - $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) install_plugins + @$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins $(LIBAPIKFS): FORCE @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 35/36 tools lib lockdep: Use tools build framework
In reply to Jiri OlsaMove the lockdep library building under tools build framework.
--- tools/lib/lockdep/Build | 1 + tools/lib/lockdep/Makefile | 132 ++++++++------------------------------------- 2 files changed, 24 insertions(+), 109 deletions(-) create mode 100644 tools/lib/lockdep/Build
tools/lib/lockdep/Build new file +1 -0
@@ -0,0 +1 @@ +liblockdep-y += common.o lockdep.o preload.o rbtree.o
tools/lib/lockdep/Makefile +23 -109
190 lines not on this page · raw message
Signature · 1 line
1.9.3
Jiri Olsa
reviewerPATCH v2 36/36 perf build: Display make commands on V=1
In reply to Jiri OlsaGet more verbose output wrt displaying executed commands from make.
--- tools/perf/Makefile.perf | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-)
tools/perf/Makefile.perf +27 -21
@@ -89,13 +89,19 @@ VPATH += $(OUTPUT) export VPATH endif +ifeq ($(V),1) + Q = +else + Q = @ +endif + # Do not use make's built-in rules and variables # (this increases performance and avoids hard-to-debug behaviour); MAKEFLAGS += -rR $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD - @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) - @touch $(OUTPUT)PERF-VERSION-FILE + $(Q)$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) + $(Q)touch $(OUTPUT)PERF-VERSION-FILE CC = $(CROSS_COMPILE)gcc LD = $(CROSS_COMPILE)ld
@@ -251,7 +257,7 @@ SHELL = $(SHELL_PATH) all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) please_set_SHELL_PATH_to_a_more_modern_shell: - @$$(:) + $(Q)$$(:) shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell
@@ -264,13 +270,13 @@ export srctree OUTPUT RM CC LD CFLAGS V BISON FLEX build := -f $(srctree)/tools/build/Makefile.build dir=. obj $(PERF_IN): $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h FORCE - @$(MAKE) $(build)=perf + $(Q)$(MAKE) $(build)=perf $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ $(GTK_IN): FORCE - @$(MAKE) $(build)=gtk + $(Q)$(MAKE) $(build)=gtk $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS)
@@ -315,25 +321,25 @@ build-dir = $(if $(__build-dir),$(__build-dir),.) single_dep: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h $(OUTPUT)%.o: %.c single_dep FORCE - @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)%.i: %.c single_dep FORCE - @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)%.s: %.c single_dep FORCE - @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)%-bison.o: %.c single_dep FORCE - @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)%-flex.o: %.c single_dep FORCE - @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)%.o: %.S single_dep FORCE - @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)%.i: %.S single_dep FORCE - @$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ + $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ $(OUTPUT)perf-%: %.o $(PERFLIBS) $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(filter %.o,$^) $(LIBS)
@@ -353,7 +359,7 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h) LIBPERF_IN := $(OUTPUT)libperf-in.o $(LIBPERF_IN): FORCE - @$(MAKE) $(build)=libperf + $(Q)$(MAKE) $(build)=libperf $(LIB_FILE): $(LIBPERF_IN) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS)
@@ -362,21 +368,21 @@ LIBTRACEEVENT_FLAGS += CFLAGS="-g -Wall $(EXTRA_CFLAGS)" LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) $(LIBTRACEEVENT): FORCE - @$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a plugins + $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a plugins $(LIBTRACEEVENT)-clean: $(call QUIET_CLEAN, libtraceevent) - @$(MAKE) -C $(TRACE_EVENT_DIR) O=$(OUTPUT) clean >/dev/null + $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) O=$(OUTPUT) clean >/dev/null install-traceevent-plugins: $(LIBTRACEEVENT) - @$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins + $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins $(LIBAPIKFS): FORCE - @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a + $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a $(LIBAPIKFS)-clean: $(call QUIET_CLEAN, libapi) - @$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null + $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null help: @echo 'Perf make targets:'
@@ -514,12 +520,12 @@ $(INSTALL_DOC_TARGETS): # config-clean: $(call QUIET_CLEAN, config) - @$(MAKE) -C config/feature-checks clean >/dev/null + $(Q)$(MAKE) -C config/feature-checks clean >/dev/null clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) - @find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) - @$(RM) .config-detected + $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM) + $(Q)$(RM) .config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
Signature · 1 line
1.9.3
Quoted 19 lines · Jiri Olsa
Since it's actually small portion of kbuild that perf needs, I realized it's actually better to steal it than 'reconfigure' kbuild to be usable for perf.
Also this patchset is kind of incremental version of the latest:
perf tools: Add kbuild support into Makefile.kbuild
so it should be easier to review.NOTE I couldn't find any copyright/credit messages in the kbuild system, but would be happy to include it if someone suggests one.
The stolen parts are in files:
Makefile.kbuild
Build.includeThe idea and more details are explained in the '
Documentation/Build' file. The basic idea is the same as in kbuild system, with some minor changes to allow for multiple binaries build definitions.
Quoted 8 lines
User provides 'Build' files with objects definitions like:
perf-y += perf.o perf-y += builtin-bench.o ... libperf-y += util/ ...
It is not obvious to me how this works. Users provide a .config file for building perf? Or do users provide Build files like you state above? If it is a .config file then what if a .config file is not present is it auto generated using the current autoprobing?
David
Quoted 7 lines
and the build framework outputs files:
perf-in.o
libperf-in.owhich are then linked into appropriate binaries/libraries. (perf libperf.a libperf-gtk.so)
Quoted 25 lines · David Ahern
Quoted 24 lines · Jiri Olsa
Since it's actually small portion of kbuild that perf needs, I realized it's actually better to steal it than 'reconfigure' kbuild to be usable for perf.
Also this patchset is kind of incremental version of the latest:
perf tools: Add kbuild support into Makefile.kbuild
so it should be easier to review.NOTE I couldn't find any copyright/credit messages in the kbuild system, but would be happy to include it if someone suggests one.
The stolen parts are in files:
Makefile.kbuild
Build.includeThe idea and more details are explained in the '
Documentation/Build' file. The basic idea is the same as in kbuild system, with some minor changes to allow for multiple binaries build definitions.User provides 'Build' files with objects definitions like:
perf-y += perf.o
perf-y += builtin-bench.o
...
Quoted 8 lines
Quoted 3 lines
libperf-y += util/
...It is not obvious to me how this works. Users provide a .config file for building perf? Or do users provide Build files like you state above? If it is a .config file then what if a .config file is not present is it auto generated using the current autoprobing?
so far users provide 'Build' files, which defines list of objects to be built for specific outputs, like following Build file:
---
perf-y += perf.o
perf-y += builtin-bench.o
libperf-y += util/
---
means that build framework's output will be 2 files:
- 'perf-in.o' that contains (links) perf.o and builtin-bench.o objects
- 'libperf-in.o' that contains (links) whatever is defined under 'util/'
also user can provide '.config-detected' file that will get included into the Makefile.build to get the environment changed and refer to it in the 'Build' files
I'll update docs with more details..
jirka
Quoted 13 lines · Jiri Olsa
hi,
I'm following up on latest post from Alexis:
http://marc.info/?l=linux-kernel&m=141427580405357&w=2v2 changes:
- build Makefiles librarized and moved to 'tools/build' [Ingo]
- several minor fixies [Namhyung]
- tested on other archs now -x86_64, i386, powerpc
- movedtools/lib/*under new build framework to show that it's possible ;-)
included traceevent/lockdep maintainers to get the feedback
- omitted last 2 patches
Quoted 7 lines
The patchset is also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/buildAll tests/make tests passed.
Any feedback from ARM guys would be great ;-)
[adding Mark Rutland to Cc]
I'll try and take this for a spin on some arm64 hardware too.
Will
Mark Rutland
reviewerQuoted 18 lines · Will Deacon
Quoted 17 lines · Jiri Olsa
hi,
I'm following up on latest post from Alexis:
http://marc.info/?l=linux-kernel&m=141427580405357&w=2v2 changes:
- build Makefiles librarized and moved to 'tools/build' [Ingo]
- several minor fixies [Namhyung]
- tested on other archs now -x86_64, i386, powerpc
- movedtools/lib/*under new build framework to show that it's possible ;-)
included traceevent/lockdep maintainers to get the feedback
- omitted last 2 patchesThe patchset is also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/build
Quoted 5 lines
Quoted 3 lines
All tests/make tests passed.
Any feedback from ARM guys would be great ;-)
[adding Mark Rutland to Cc]
Cheers.
I just tried a cross-build for arm, and that blew up when trying to do something with arch/arm/util/libperf-in.o (log below). I bisected that to f169fbc4c59dd9d4 "perf build: Add arch x86 objects building". I'm looking into why now.
Thanks,
Mark.
[mark@leverpostej:~/src/linux/tools/perf]% make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
BUILD: Doing 'make -j8' parallel build
config/Makefile:341: No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev config/Makefile:417: Disabling post unwind, no support found.
config/Makefile:458: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev config/Makefile:473: slang not found, disables TUI support. Please install slang-devel or libslang-dev config/Makefile:487: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev config/Makefile:515: Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed config/Makefile:560: No Python.h (for Python 2.x) was found
config/Makefile:560: Python support will not be built
config/Makefile:653: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev
Auto-detecting system features:
... dwarf: [ OFF ]
... glibc: [ on ]
... gtk2: [ OFF ]
... libaudit: [ OFF ]
... libbfd: [ OFF ]
... libelf: [ OFF ]
... libnuma: [ OFF ]
... libperl: [ OFF ]
... libpython: [ OFF ]
... libslang: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ OFF ]
... zlib: [ OFF ]
CC arch/common.o CC util/alias.o CC util/abspath.o CC ui/setup.o CC event-parse.o CC fd/array.o LD arch/arm/libperf-in.o
arm-linux-gnueabihf-ld: cannot find arch/arm/util/libperf-in.o: No such file or directory make[4]: *** [arch/arm/libperf-in.o] Error 1
make[3]: *** [arm] Error 2
make[3]: *** Waiting for unfinished jobs....
GEN common-cmds.h LD fd/libapi-in.o CC fs/fs.o CC fs/debugfs.o CC util/annotate.o CC ui/helpline.o CC ui/progress.o CC ui/util.o LD fs/libapi-in.o LD libapi-in.o AR libapi.a CC ui/hist.o
make[2]: *** [arch] Error 2
make[2]: *** Waiting for unfinished jobs....
CC ui/stdio/hist.o
CC plugin_jbd2.o
PERF_VERSION = 3.19.rc2.gcdb397
CC plugin_hrtimer.o CC plugin_kmem.o LD plugin_jbd2-in.o CC plugin_kvm.o LD plugin_hrtimer-in.o CC plugin_mac80211.o CC event-plugin.o LD plugin_kmem-in.o CC trace-seq.o LD plugin_mac80211-in.o LD plugin_kvm-in.o CC parse-filter.o CC plugin_sched_switch.o CC parse-utils.o CC kbuffer-parse.o CC plugin_function.o LD plugin_sched_switch-in.o CC plugin_xen.o CC plugin_scsi.o LD plugin_xen-in.o LD plugin_function-in.o CC plugin_cfg80211.o LINK plugin_jbd2.so LINK plugin_hrtimer.so LINK plugin_kmem.so LINK plugin_kvm.so LD plugin_cfg80211-in.o CC builtin-bench.o LD plugin_scsi-in.o LINK plugin_mac80211.so LINK plugin_sched_switch.so CC builtin-annotate.o LD libtraceevent-in.o LINK plugin_function.so LINK plugin_xen.so LINK plugin_scsi.so LINK plugin_cfg80211.so CC util/build-id.o CC util/config.o LINK libtraceevent.a GEN perf-archive GEN perf-with-kcore CC util/ctype.o CC builtin-diff.o CC util/db-export.o CC util/environment.o CC builtin-evlist.o CC util/event.o CC util/evlist.o CC util/evsel.o CC util/exec_cmd.o CC builtin-help.o CC util/find_next_bit.o CC builtin-sched.o CC util/help.o CC builtin-buildid-list.o CC builtin-buildid-cache.o CC util/kallsyms.o CC builtin-list.o CC util/levenshtein.o CC util/parse-options.o LD ui/libperf-in.o BISON util/parse-events-bison.c CC builtin-record.o CC builtin-report.o CC util/path.o CC util/rbtree.o CC util/bitmap.o CC util/hweight.o CC util/run-command.o CC util/quote.o CC builtin-stat.o CC util/strbuf.o CC builtin-timechart.o CC builtin-top.o CC util/string.o CC util/strlist.o CC builtin-script.o CC builtin-kmem.o CC util/strfilter.o CC util/top.o CC builtin-lock.o CC util/usage.o CC util/wrapper.o CC util/sigchain.o CC builtin-kvm.o CC util/dso.o CC util/symbol.o CC util/color.o CC builtin-inject.o CC util/pager.o CC util/header.o CC builtin-mem.o CC util/callchain.o CC bench/sched-messaging.o CC bench/sched-pipe.o CC util/values.o CC util/debug.o CC util/machine.o CC tests/builtin-test.o CC bench/mem-memcpy.o CC util/map.o CC util/pstack.o CC tests/parse-events.o CC bench/futex-hash.o CC perf.o CC util/session.o CC bench/futex-wake.o CC util/ordered-events.o CC bench/futex-requeue.o CC tests/dso-data.o CC tests/attr.o CC util/comm.o CC util/thread.o LD bench/perf-in.o CC util/thread_map.o CC util/trace-event-parse.o CC tests/vmlinux-kallsyms.o CC tests/open-syscall.o CC tests/open-syscall-all-cpus.o CC util/parse-events-bison.o BISON util/pmu-bison.c CC util/trace-event-read.o CC tests/open-syscall-tp-fields.o CC util/trace-event-info.o CC util/trace-event-scripting.o CC util/trace-event.o CC util/svghelper.o CC tests/mmap-basic.o CC util/sort.o CC util/hist.o CC util/util.o CC util/xyarray.o CC tests/perf-record.o CC util/cpumap.o CC tests/rdpmc.o CC util/cgroup.o CC util/target.o CC tests/evsel-roundtrip-name.o CC tests/evsel-tp-sched.o CC util/rblist.o CC util/intlist.o CC util/vdso.o CC tests/fdarray.o CC util/stat.o CC util/record.o CC util/srcline.o CC tests/pmu.o CC util/data.o CC util/tsc.o CC util/cloexec.o CC util/thread-stack.o CC tests/hists_common.o CC util/symbol-minimal.o CC util/perf_regs.o FLEX util/parse-events-flex.c CC tests/hists_link.o FLEX util/pmu-flex.c CC util/pmu-bison.o CC util/parse-events.o CC util/parse-events-flex.o CC util/pmu.o CC tests/hists_filter.o CC util/pmu-flex.o CC tests/hists_output.o CC tests/hists_cumulate.o CC tests/python-use.o CC tests/bp_signal.o CC tests/bp_signal_overflow.o CC tests/task-exit.o CC tests/sw-clock.o CC tests/mmap-thread-lookup.o CC tests/thread-mg-share.o CC tests/switch-tracking.o CC tests/keep-tracking.o CC tests/code-reading.o CC tests/sample-parsing.o CC tests/parse-no-sample-id-all.o LD util/libperf-in.o
make[1]: *** [libperf-in.o] Error 2
make[1]: *** Waiting for unfinished jobs....
LD tests/perf-in.o
LD perf-in.o
make: *** [all] Error 2
[
Quoted 23 lines · Mark Rutland
Quoted 22 lines · Will Deacon
Quoted 20 lines · Jiri Olsa
hi,
I'm following up on latest post from Alexis:
http://marc.info/?l=linux-kernel&m=141427580405357&w=2v2 changes:
- build Makefiles librarized and moved to 'tools/build' [Ingo]
- several minor fixies [Namhyung]
- tested on other archs now -x86_64, i386, powerpc
- movedtools/lib/*under new build framework to show that it's possible ;-)
included traceevent/lockdep maintainers to get the feedback
- omitted last 2 patchesThe patchset is also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/buildAll tests/make tests passed.
Any feedback from ARM guys would be great ;-)
Quoted 8 lines
Quoted 1 line
[adding Mark Rutland to Cc]
Cheers.
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.
I get a similar failure doing a native arm64 build. I think the problem is because the arch/ files for arm and arm64 aren't always required (i.e. there are configurations where nothing is built under there) and, consequently, libperf-in.o isn't actually needed and we try to link against something that doesn't exist.
Will
Quoted 244 lines
Thanks,
Mark.[mark@leverpostej:~/src/linux/tools/perf]% make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
BUILD: Doing 'make -j8' parallel build
config/Makefile:341: No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev config/Makefile:417: Disabling post unwind, no support found.
config/Makefile:458: Nolibaudit.hfound, disables 'trace' tool, please install audit-libs-devel or libaudit-dev config/Makefile:473: slang not found, disables TUI support. Please install slang-devel or libslang-dev config/Makefile:487: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev config/Makefile:515: Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed config/Makefile:560: NoPython.h(for Python 2.x) was found
config/Makefile:560: Python support will not be built
config/Makefile:653: Nonuma.hfound, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-devAuto-detecting system features:
... dwarf: [ OFF ]
... glibc: [ on ]
... gtk2: [ OFF ]
... libaudit: [ OFF ]
... libbfd: [ OFF ]
... libelf: [ OFF ]
... libnuma: [ OFF ]
... libperl: [ OFF ]
... libpython: [ OFF ]
... libslang: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ OFF ]
... zlib: [ OFF ]CC arch/common.o CC util/alias.o CC util/abspath.o CC ui/setup.o CC event-parse.o CC fd/array.o LD arch/arm/libperf-in.oarm-linux-gnueabihf-ld: cannot find
arch/arm/util/libperf-in.o: No such file or directory make[4]: *** [arch/arm/libperf-in.o] Error 1
make[3]: *** [arm] Error 2
make[3]: *** Waiting for unfinished jobs....GEN common-cmds.h LD fd/libapi-in.o CC fs/fs.o CC fs/debugfs.o CC util/annotate.o CC ui/helpline.o CC ui/progress.o CC ui/util.o LD fs/libapi-in.o LD libapi-in.o AR libapi.a CC ui/hist.omake[2]: *** [arch] Error 2
make[2]: *** Waiting for unfinished jobs....
CCui/stdio/hist.o
CC plugin_jbd2.o
PERF_VERSION= 3.19.rc2.gcdb397CC plugin_hrtimer.o CC plugin_kmem.o LD plugin_jbd2-in.o CC plugin_kvm.o LD plugin_hrtimer-in.o CC plugin_mac80211.o CC event-plugin.o LD plugin_kmem-in.o CC trace-seq.o LD plugin_mac80211-in.o LD plugin_kvm-in.o CC parse-filter.o CC plugin_sched_switch.o CC parse-utils.o CC kbuffer-parse.o CC plugin_function.o LD plugin_sched_switch-in.o CC plugin_xen.o CC plugin_scsi.o LD plugin_xen-in.o LD plugin_function-in.o CC plugin_cfg80211.o LINK plugin_jbd2.so LINK plugin_hrtimer.so LINK plugin_kmem.so LINK plugin_kvm.so LD plugin_cfg80211-in.o CC builtin-bench.o LD plugin_scsi-in.o LINK plugin_mac80211.so LINK plugin_sched_switch.so CC builtin-annotate.o LD libtraceevent-in.o LINK plugin_function.so LINK plugin_xen.so LINK plugin_scsi.so LINK plugin_cfg80211.so CC util/build-id.o CC util/config.o LINK libtraceevent.a GEN perf-archive GEN perf-with-kcore CC util/ctype.o CC builtin-diff.o CC util/db-export.o CC util/environment.o CC builtin-evlist.o CC util/event.o CC util/evlist.o CC util/evsel.o CC util/exec_cmd.o CC builtin-help.o CC util/find_next_bit.o CC builtin-sched.o CC util/help.o CC builtin-buildid-list.o CC builtin-buildid-cache.o CC util/kallsyms.o CC builtin-list.o CC util/levenshtein.o CC util/parse-options.o LD ui/libperf-in.o BISON util/parse-events-bison.c CC builtin-record.o CC builtin-report.o CC util/path.o CC util/rbtree.o CC util/bitmap.o CC util/hweight.o CC util/run-command.o CC util/quote.o CC builtin-stat.o CC util/strbuf.o CC builtin-timechart.o CC builtin-top.o CC util/string.o CC util/strlist.o CC builtin-script.o CC builtin-kmem.o CC util/strfilter.o CC util/top.o CC builtin-lock.o CC util/usage.o CC util/wrapper.o CC util/sigchain.o CC builtin-kvm.o CC util/dso.o CC util/symbol.o CC util/color.o CC builtin-inject.o CC util/pager.o CC util/header.o CC builtin-mem.o CC util/callchain.o CC bench/sched-messaging.o CC bench/sched-pipe.o CC util/values.o CC util/debug.o CC util/machine.o CC tests/builtin-test.o CC bench/mem-memcpy.o CC util/map.o CC util/pstack.o CC tests/parse-events.o CC bench/futex-hash.o CC perf.o CC util/session.o CC bench/futex-wake.o CC util/ordered-events.o CC bench/futex-requeue.o CC tests/dso-data.o CC tests/attr.o CC util/comm.o CC util/thread.o LD bench/perf-in.o CC util/thread_map.o CC util/trace-event-parse.o CC tests/vmlinux-kallsyms.o CC tests/open-syscall.o CC tests/open-syscall-all-cpus.o CC util/parse-events-bison.o BISON util/pmu-bison.c CC util/trace-event-read.o CC tests/open-syscall-tp-fields.o CC util/trace-event-info.o CC util/trace-event-scripting.o CC util/trace-event.o CC util/svghelper.o CC tests/mmap-basic.o CC util/sort.o CC util/hist.o CC util/util.o CC util/xyarray.o CC tests/perf-record.o CC util/cpumap.o CC tests/rdpmc.o CC util/cgroup.o CC util/target.o CC tests/evsel-roundtrip-name.o CC tests/evsel-tp-sched.o CC util/rblist.o CC util/intlist.o CC util/vdso.o CC tests/fdarray.o CC util/stat.o CC util/record.o CC util/srcline.o CC tests/pmu.o CC util/data.o CC util/tsc.o CC util/cloexec.o CC util/thread-stack.o CC tests/hists_common.o CC util/symbol-minimal.o CC util/perf_regs.o FLEX util/parse-events-flex.c CC tests/hists_link.o FLEX util/pmu-flex.c CC util/pmu-bison.o CC util/parse-events.o CC util/parse-events-flex.o CC util/pmu.o CC tests/hists_filter.o CC util/pmu-flex.o CC tests/hists_output.o CC tests/hists_cumulate.o CC tests/python-use.o CC tests/bp_signal.o CC tests/bp_signal_overflow.o CC tests/task-exit.o CC tests/sw-clock.o CC tests/mmap-thread-lookup.o CC tests/thread-mg-share.o CC tests/switch-tracking.o CC tests/keep-tracking.o CC tests/code-reading.o CC tests/sample-parsing.o CC tests/parse-no-sample-id-all.o LD util/libperf-in.omake[1]: *** [libperf-in.o] Error 2
make[1]: *** Waiting for unfinished jobs....
LDtests/perf-in.o
LD perf-in.o
make: *** [all] Error 2
[
Quoted 33 lines · Will Deacon
Quoted 23 lines · Mark Rutland
Quoted 22 lines · Will Deacon
Quoted 20 lines · Jiri Olsa
hi,
I'm following up on latest post from Alexis:
http://marc.info/?l=linux-kernel&m=141427580405357&w=2v2 changes:
- build Makefiles librarized and moved to 'tools/build' [Ingo]
- several minor fixies [Namhyung]
- tested on other archs now -x86_64, i386, powerpc
- movedtools/lib/*under new build framework to show that it's possible ;-)
included traceevent/lockdep maintainers to get the feedback
- omitted last 2 patchesThe patchset is also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/buildAll tests/make tests passed.
Any feedback from ARM guys would be great ;-)
Quoted 8 lines
Quoted 1 line
[adding Mark Rutland to Cc]
Cheers.
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.
Quoted 5 lines
I get a similar failure doing a native arm64 build. I think the problem is because the
arch/files for arm and arm64 aren't always required (i.e. there are configurations where nothing is built under there) and, consequently, libperf-in.o isn't actually needed and we try to link against something that doesn't exist.
exactly ;-) I'll spin v3 shortly..
thanks,
jirka
Quoted 34 lines · Jiri Olsa
Quoted 33 lines · Will Deacon
Quoted 31 lines · Mark Rutland
Quoted 18 lines · Will Deacon
Quoted 17 lines · Jiri Olsa
hi,
I'm following up on latest post from Alexis:
http://marc.info/?l=linux-kernel&m=141427580405357&w=2v2 changes:
- build Makefiles librarized and moved to 'tools/build' [Ingo]
- several minor fixies [Namhyung]
- tested on other archs now -x86_64, i386, powerpc
- movedtools/lib/*under new build framework to show that it's possible ;-)
included traceevent/lockdep maintainers to get the feedback
- omitted last 2 patchesThe patchset is also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/buildQuoted 5 lines
Quoted 3 lines
All tests/make tests passed.
Any feedback from ARM guys would be great ;-)
[adding Mark Rutland to Cc]
Cheers.
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.
Quoted 7 lines
Quoted 5 lines
I get a similar failure doing a native arm64 build. I think the problem is because the
arch/files for arm and arm64 aren't always required (i.e. there are configurations where nothing is built under there) and, consequently, libperf-in.o isn't actually needed and we try to link against something that doesn't exist.exactly ;-) I'll spin v3 shortly..
this fixes the issue for me
jirka
---
tools/build/Makefile.build +1 -1
@@ -52,7 +52,7 @@ quiet_cmd_cc_s_c = AS $@ # Link agregate command quiet_cmd_ld_multi = LD $@ - cmd_ld_multi = $(LD) -r -o $@ $^ + cmd_ld_multi = $(LD) -r -o $@ $(wildcard $^) # Build rules $(OUTPUT)%.o: %.c FORCE
Will Deacon
Tested-byQuoted 14 lines · Jiri Olsa
Quoted 13 lines · Jiri Olsa
Quoted 11 lines · Will Deacon
Quoted 4 lines · Mark Rutland
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.I get a similar failure doing a native arm64 build. I think the problem is because the
arch/files for arm and arm64 aren't always required (i.e. there are configurations where nothing is built under there) and, consequently, libperf-in.o isn't actually needed and we try to link against something that doesn't exist.
Quoted 3 lines
Quoted 1 line
exactly ;-) I'll spin v3 shortly..
this fixes the issue for me
Same for me, thanks!
Will
Quoted 15 lines
---
tools/build/Makefile.build +1
-1@@ -52,7 +52,7 @@ quiet_cmd_cc_s_c = AS $@ # Link agregate command quiet_cmd_ld_multi = LD $@ - cmd_ld_multi = $(LD) -r -o $@ $^ + cmd_ld_multi = $(LD) -r -o $@ $(wildcard $^) # Build rules $(OUTPUT)%.o: %.c FORCE
Mark Rutland
reviewerHi,
[...]
Quoted 25 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.Quoted 7 lines
Quoted 5 lines
I get a similar failure doing a native arm64 build. I think the problem is because the
arch/files for arm and arm64 aren't always required (i.e. there are configurations where nothing is built under there) and, consequently, libperf-in.o isn't actually needed and we try to link against something that doesn't exist.exactly ;-) I'll spin v3 shortly..
this fixes the issue for me
jirka
---
tools/build/Makefile.build +0
-0
tools/build/Makefile.build quiet_cmd_cc_s_c = AS $@ · line 58
Quoted 8 lines
tools/build/Makefile.build +1
-1@@ -52,7 +52,7 @@ quiet_cmd_cc_s_c = AS $@ # Link agregate command quiet_cmd_ld_multi = LD $@ - cmd_ld_multi = $(LD) -r -o $@ $^ + cmd_ld_multi = $(LD) -r -o $@ $(wildcard $^) # Build rules $(OUTPUT)%.o: %.c FORCE
Unfortunately that doesn't seem to be sufficient for me when cross-compiling. It looks like it supresses the warning from Make, but then LD explodes anyway because it wasn't provided any input files (log below).
Thanks,
Mark.
[mark@leverpostej:~/src/linux/tools/perf]% uselinaro 14.09 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
BUILD: Doing 'make -j8' parallel build
config/Makefile:341: No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev config/Makefile:417: Disabling post unwind, no support found.
config/Makefile:458: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev config/Makefile:473: slang not found, disables TUI support. Please install slang-devel or libslang-dev config/Makefile:487: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev config/Makefile:515: Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed config/Makefile:560: No Python.h (for Python 2.x) was found
config/Makefile:560: Python support will not be built
config/Makefile:653: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev
Auto-detecting system features:
... dwarf: [ OFF ]
... glibc: [ on ]
... gtk2: [ OFF ]
... libaudit: [ OFF ]
... libbfd: [ OFF ]
... libelf: [ OFF ]
... libnuma: [ OFF ]
... libperl: [ OFF ]
... libpython: [ OFF ]
... libslang: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ OFF ]
... zlib: [ OFF ]
SUBDIR /home/mark/src/linux/tools/lib/api/ FLAGS: * new build flags or prefix GEN common-cmds.h MKDIR libapi_dirs SUBDIR /home/mark/src/linux/tools/lib/traceevent/ CC fs/debugfs.o CC arch/common.o CC fs/fs.o CC fd/array.o CC util/abspath.o FLAGS: * new build flags or cross compiler CC ui/setup.o CC ui/helpline.o CC ui/progress.o AR libapikfs.a CC util/alias.o CC util/annotate.o CC ui/util.o CC ui/hist.o CC ui/stdio/hist.o
PERF_VERSION = 3.19.rc2.gb7973a
CC builtin-bench.o
LD arch/libperf-in.o
arm-linux-gnueabihf-ld: no input files
make[3]: *** [arch/libperf-in.o] Error 1
make[2]: *** [arch] Error 2
make[2]: *** Waiting for unfinished jobs....
CC builtin-annotate.o CC util/build-id.o CC FPIC event-parse.o CC FPIC event-plugin.o CC FPIC trace-seq.o CC builtin-diff.o CC FPIC parse-filter.o CC builtin-evlist.o CC util/config.o CC util/ctype.o CC FPIC parse-utils.o CC util/db-export.o CC FPIC kbuffer-parse.o CC builtin-help.o CC util/environment.o CC FPIC plugin_jbd2.o CC FPIC plugin_hrtimer.o CC util/event.o CC FPIC plugin_kmem.o CC FPIC plugin_kvm.o CC FPIC plugin_mac80211.o CC util/evlist.o CC FPIC plugin_sched_switch.o CC builtin-sched.o CC util/evsel.o CC util/exec_cmd.o CC FPIC plugin_function.o CC FPIC plugin_xen.o CC builtin-buildid-list.o CC FPIC plugin_scsi.o CC FPIC plugin_cfg80211.o CC builtin-buildid-cache.o LINK libtraceevent.a LINK plugin_jbd2.so GEN perf-archive CC util/find_next_bit.o LINK plugin_hrtimer.so LINK plugin_kmem.so LINK plugin_kvm.so CC util/help.o LINK plugin_mac80211.so CC util/kallsyms.o LINK plugin_sched_switch.so LINK plugin_function.so LINK plugin_xen.so LD ui/libperf-in.o CC builtin-list.o arm-linux-gnueabihf-ld: no input files make[3]: *** [ui/libperf-in.o] Error 1 make[2]: *** [ui] Error 2 CC builtin-record.o LINK plugin_scsi.so LINK plugin_cfg80211.so GEN perf-with-kcore CC builtin-report.o CC builtin-stat.o CC builtin-timechart.o CC util/levenshtein.o CC builtin-top.o CC builtin-script.o CC builtin-kmem.o CC builtin-lock.o CC util/parse-options.o CC builtin-kvm.o CC builtin-inject.o CC builtin-mem.o CC bench/sched-messaging.o CC tests/builtin-test.o CC perf.o BISON util/parse-events-bison.c CC util/path.o CC util/rbtree.o CC util/bitmap.o CC tests/parse-events.o CC bench/sched-pipe.o CC util/hweight.o CC util/run-command.o CC bench/mem-memcpy.o CC bench/futex-hash.o CC bench/futex-wake.o CC util/quote.o CC bench/futex-requeue.o CC tests/dso-data.o CC util/strbuf.o CC util/string.o CC util/strlist.o CC tests/attr.o CC tests/vmlinux-kallsyms.o LD bench/perf-in.o
arm-linux-gnueabihf-ld: no input files
make[3]: *** [bench/perf-in.o] Error 1
make[2]: *** [bench] Error 2
make[2]: *** Waiting for unfinished jobs....
CC tests/open-syscall.o CC util/strfilter.o CC util/top.o CC util/usage.o CC tests/open-syscall-all-cpus.o CC tests/open-syscall-tp-fields.o CC tests/mmap-basic.o CC tests/perf-record.o CC util/wrapper.o CC tests/rdpmc.o CC util/sigchain.o CC tests/evsel-roundtrip-name.o CC tests/evsel-tp-sched.o CC tests/fdarray.o CC util/dso.o CC tests/pmu.o CC tests/hists_common.o CC util/symbol.o CC tests/hists_link.o CC tests/hists_filter.o CC tests/hists_output.o CC tests/hists_cumulate.o CC tests/python-use.o CC tests/bp_signal.o CC util/color.o CC tests/bp_signal_overflow.o CC tests/task-exit.o CC util/pager.o CC util/header.o CC util/callchain.o CC tests/sw-clock.o CC tests/mmap-thread-lookup.o CC util/values.o CC tests/thread-mg-share.o CC tests/switch-tracking.o CC tests/keep-tracking.o CC tests/code-reading.o CC util/debug.o CC tests/sample-parsing.o CC util/machine.o CC tests/parse-no-sample-id-all.o CC util/map.o CC util/pstack.o CC util/session.o CC util/ordered-events.o LD tests/perf-in.o
arm-linux-gnueabihf-ld: no input files
make[3]: *** [tests/perf-in.o] Error 1
make[2]: *** [tests] Error 2
make[1]: *** [perf-in.o] Error 2
make[1]: *** Waiting for unfinished jobs....
CC util/comm.o CC util/thread.o CC util/thread_map.o CC util/trace-event-parse.o CC util/parse-events-bison.o BISON util/pmu-bison.c CC util/trace-event-read.o CC util/trace-event-info.o CC util/trace-event-scripting.o CC util/trace-event.o CC util/svghelper.o CC util/sort.o CC util/hist.o CC util/util.o CC util/xyarray.o CC util/cpumap.o CC util/cgroup.o CC util/target.o CC util/rblist.o CC util/intlist.o CC util/vdso.o CC util/stat.o CC util/record.o CC util/srcline.o CC util/data.o CC util/tsc.o CC util/cloexec.o CC util/thread-stack.o CC util/symbol-minimal.o CC util/perf_regs.o FLEX util/parse-events-flex.c FLEX util/pmu-flex.c CC util/pmu-bison.o CC util/parse-events.o CC util/parse-events-flex.o CC util/pmu.o CC util/pmu-flex.o LD util/libperf-in.o
arm-linux-gnueabihf-ld: no input files
make[3]: *** [util/libperf-in.o] Error 1
make[2]: *** [util] Error 2
make[1]: *** [libperf-in.o] Error 2
make: *** [all] Error 2
Quoted 34 lines · Mark Rutland
Hi,
[...]
Quoted 30 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.Quoted 7 lines
Quoted 5 lines
I get a similar failure doing a native arm64 build. I think the problem is because the
arch/files for arm and arm64 aren't always required (i.e. there are configurations where nothing is built under there) and, consequently, libperf-in.o isn't actually needed and we try to link against something that doesn't exist.exactly ;-) I'll spin v3 shortly..
this fixes the issue for me
jirka
---
tools/build/Makefile.build +1
-1@@ -52,7 +52,7 @@ quiet_cmd_cc_s_c = AS $@ # Link agregate command quiet_cmd_ld_multi = LD $@ - cmd_ld_multi = $(LD) -r -o $@ $^ + cmd_ld_multi = $(LD) -r -o $@ $(wildcard $^)
Quoted 8 lines
tools/build/Makefile.build quiet_cmd_cc_s_c = AS $@ · line 58
Quoted 3 lines
tools/build/Makefile.build +0
-0# Build rules $(OUTPUT)%.o: %.c FORCEUnfortunately that doesn't seem to be sufficient for me when cross-compiling. It looks like it supresses the warning from Make, but then LD explodes anyway because it wasn't provided any input files (log below).
argh.. right, when there are no source objects at all :-\ fix is comming ;-)
thanks,
jirka
Quoted 44 lines · Jiri Olsa
Quoted 34 lines · Mark Rutland
Hi,
[...]
Quoted 30 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.Quoted 7 lines
Quoted 5 lines
I get a similar failure doing a native arm64 build. I think the problem is because the
arch/files for arm and arm64 aren't always required (i.e. there are configurations where nothing is built under there) and, consequently, libperf-in.o isn't actually needed and we try to link against something that doesn't exist.exactly ;-) I'll spin v3 shortly..
this fixes the issue for me
jirka
---
tools/build/Makefile.build +1
-1@@ -52,7 +52,7 @@ quiet_cmd_cc_s_c = AS $@ # Link agregate command quiet_cmd_ld_multi = LD $@ - cmd_ld_multi = $(LD) -r -o $@ $^ + cmd_ld_multi = $(LD) -r -o $@ $(wildcard $^)Quoted 8 lines
tools/build/Makefile.build quiet_cmd_cc_s_c = AS $@ · line 58
Quoted 3 lines
tools/build/Makefile.build +0
-0# Build rules $(OUTPUT)%.o: %.c FORCEUnfortunately that doesn't seem to be sufficient for me when cross-compiling. It looks like it supresses the warning from Make, but then LD explodes anyway because it wasn't provided any input files (log below).
Quoted 1 line
argh.. right, when there are no source objects at all :-\ fix is comming ;-)
ok, for a minute I forgot I'm stealing this from kbuild.. aaand they have a solution of course ;-)
so I'm now always creating $(obj)-in.o objects (even empty ones), and it seems to work nicely.. as in kbuild ;-)
the update 'perf/build' branch' with the fix is in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/build
I tried on arm64,ppc64,s390,x86_64,i386
I'll spin v3 shortly (after doc updates), but any testing would be great
thanks,
jirka
Quoted 23 lines · Mark Rutland
Quoted 22 lines · Will Deacon
Quoted 20 lines · Jiri Olsa
hi,
I'm following up on latest post from Alexis:
http://marc.info/?l=linux-kernel&m=141427580405357&w=2v2 changes:
- build Makefiles librarized and moved to 'tools/build' [Ingo]
- several minor fixies [Namhyung]
- tested on other archs now -x86_64, i386, powerpc
- movedtools/lib/*under new build framework to show that it's possible ;-)
included traceevent/lockdep maintainers to get the feedback
- omitted last 2 patchesThe patchset is also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/buildAll tests/make tests passed.
Any feedback from ARM guys would be great ;-)
Quoted 8 lines
Quoted 1 line
[adding Mark Rutland to Cc]
Cheers.
I just tried a cross-build for arm, and that blew up when trying to do something with
arch/arm/util/libperf-in.o(log below). I bisected that tof169fbc4c59dd9d4"perf build: Add arch x86 objects building". I'm looking into why now.
hum, looks like you dont have anything to be built in arch directory, so the libperf-in.o is not created:
arch/arm/Build:
libperf-y += util/
libperf-$(CONFIG_DWARF_UNWIND) += tests/
arch/arm/util/Build:
libperf-$(CONFIG_DWARF) += dwarf-regs.o
libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
if none of CONFIG_DWARF_UNWIND,CONFIG_LIBUNWIND,CONFIG_LIBDW_DWARF_UNWIND is defined then the final 'arch/arm/util/libperf-in.o' is not created, because there are no objects for it.. and build fails
I'll come up with the fix
thanks for testing,
jirka
Quoted 244 lines
Thanks,
Mark.[mark@leverpostej:~/src/linux/tools/perf]% make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
BUILD: Doing 'make -j8' parallel build
config/Makefile:341: No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev config/Makefile:417: Disabling post unwind, no support found.
config/Makefile:458: Nolibaudit.hfound, disables 'trace' tool, please install audit-libs-devel or libaudit-dev config/Makefile:473: slang not found, disables TUI support. Please install slang-devel or libslang-dev config/Makefile:487: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev config/Makefile:515: Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed config/Makefile:560: NoPython.h(for Python 2.x) was found
config/Makefile:560: Python support will not be built
config/Makefile:653: Nonuma.hfound, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-devAuto-detecting system features:
... dwarf: [ OFF ]
... glibc: [ on ]
... gtk2: [ OFF ]
... libaudit: [ OFF ]
... libbfd: [ OFF ]
... libelf: [ OFF ]
... libnuma: [ OFF ]
... libperl: [ OFF ]
... libpython: [ OFF ]
... libslang: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ OFF ]
... zlib: [ OFF ]CC arch/common.o CC util/alias.o CC util/abspath.o CC ui/setup.o CC event-parse.o CC fd/array.o LD arch/arm/libperf-in.oarm-linux-gnueabihf-ld: cannot find
arch/arm/util/libperf-in.o: No such file or directory make[4]: *** [arch/arm/libperf-in.o] Error 1
make[3]: *** [arm] Error 2
make[3]: *** Waiting for unfinished jobs....GEN common-cmds.h LD fd/libapi-in.o CC fs/fs.o CC fs/debugfs.o CC util/annotate.o CC ui/helpline.o CC ui/progress.o CC ui/util.o LD fs/libapi-in.o LD libapi-in.o AR libapi.a CC ui/hist.omake[2]: *** [arch] Error 2
make[2]: *** Waiting for unfinished jobs....
CCui/stdio/hist.o
CC plugin_jbd2.o
PERF_VERSION= 3.19.rc2.gcdb397CC plugin_hrtimer.o CC plugin_kmem.o LD plugin_jbd2-in.o CC plugin_kvm.o LD plugin_hrtimer-in.o CC plugin_mac80211.o CC event-plugin.o LD plugin_kmem-in.o CC trace-seq.o LD plugin_mac80211-in.o LD plugin_kvm-in.o CC parse-filter.o CC plugin_sched_switch.o CC parse-utils.o CC kbuffer-parse.o CC plugin_function.o LD plugin_sched_switch-in.o CC plugin_xen.o CC plugin_scsi.o LD plugin_xen-in.o LD plugin_function-in.o CC plugin_cfg80211.o LINK plugin_jbd2.so LINK plugin_hrtimer.so LINK plugin_kmem.so LINK plugin_kvm.so LD plugin_cfg80211-in.o CC builtin-bench.o LD plugin_scsi-in.o LINK plugin_mac80211.so LINK plugin_sched_switch.so CC builtin-annotate.o LD libtraceevent-in.o LINK plugin_function.so LINK plugin_xen.so LINK plugin_scsi.so LINK plugin_cfg80211.so CC util/build-id.o CC util/config.o LINK libtraceevent.a GEN perf-archive GEN perf-with-kcore CC util/ctype.o CC builtin-diff.o CC util/db-export.o CC util/environment.o CC builtin-evlist.o CC util/event.o CC util/evlist.o CC util/evsel.o CC util/exec_cmd.o CC builtin-help.o CC util/find_next_bit.o CC builtin-sched.o CC util/help.o CC builtin-buildid-list.o CC builtin-buildid-cache.o CC util/kallsyms.o CC builtin-list.o CC util/levenshtein.o CC util/parse-options.o LD ui/libperf-in.o BISON util/parse-events-bison.c CC builtin-record.o CC builtin-report.o CC util/path.o CC util/rbtree.o CC util/bitmap.o CC util/hweight.o CC util/run-command.o CC util/quote.o CC builtin-stat.o CC util/strbuf.o CC builtin-timechart.o CC builtin-top.o CC util/string.o CC util/strlist.o CC builtin-script.o CC builtin-kmem.o CC util/strfilter.o CC util/top.o CC builtin-lock.o CC util/usage.o CC util/wrapper.o CC util/sigchain.o CC builtin-kvm.o CC util/dso.o CC util/symbol.o CC util/color.o CC builtin-inject.o CC util/pager.o CC util/header.o CC builtin-mem.o CC util/callchain.o CC bench/sched-messaging.o CC bench/sched-pipe.o CC util/values.o CC util/debug.o CC util/machine.o CC tests/builtin-test.o CC bench/mem-memcpy.o CC util/map.o CC util/pstack.o CC tests/parse-events.o CC bench/futex-hash.o CC perf.o CC util/session.o CC bench/futex-wake.o CC util/ordered-events.o CC bench/futex-requeue.o CC tests/dso-data.o CC tests/attr.o CC util/comm.o CC util/thread.o LD bench/perf-in.o CC util/thread_map.o CC util/trace-event-parse.o CC tests/vmlinux-kallsyms.o CC tests/open-syscall.o CC tests/open-syscall-all-cpus.o CC util/parse-events-bison.o BISON util/pmu-bison.c CC util/trace-event-read.o CC tests/open-syscall-tp-fields.o CC util/trace-event-info.o CC util/trace-event-scripting.o CC util/trace-event.o CC util/svghelper.o CC tests/mmap-basic.o CC util/sort.o CC util/hist.o CC util/util.o CC util/xyarray.o CC tests/perf-record.o CC util/cpumap.o CC tests/rdpmc.o CC util/cgroup.o CC util/target.o CC tests/evsel-roundtrip-name.o CC tests/evsel-tp-sched.o CC util/rblist.o CC util/intlist.o CC util/vdso.o CC tests/fdarray.o CC util/stat.o CC util/record.o CC util/srcline.o CC tests/pmu.o CC util/data.o CC util/tsc.o CC util/cloexec.o CC util/thread-stack.o CC tests/hists_common.o CC util/symbol-minimal.o CC util/perf_regs.o FLEX util/parse-events-flex.c CC tests/hists_link.o FLEX util/pmu-flex.c CC util/pmu-bison.o CC util/parse-events.o CC util/parse-events-flex.o CC util/pmu.o CC tests/hists_filter.o CC util/pmu-flex.o CC tests/hists_output.o CC tests/hists_cumulate.o CC tests/python-use.o CC tests/bp_signal.o CC tests/bp_signal_overflow.o CC tests/task-exit.o CC tests/sw-clock.o CC tests/mmap-thread-lookup.o CC tests/thread-mg-share.o CC tests/switch-tracking.o CC tests/keep-tracking.o CC tests/code-reading.o CC tests/sample-parsing.o CC tests/parse-no-sample-id-all.o LD util/libperf-in.omake[1]: *** [libperf-in.o] Error 2
make[1]: *** Waiting for unfinished jobs....
LDtests/perf-in.o
LD perf-in.o
make: *** [all] Error 2
[