From: Arnaldo Carvalho de Melo acme@ghostprotocols.net
Hi Ingo,
The first 20 patches in this series are the same as in the previous one, so I'm not reposting them now.
This series has the code style/constification changes you suggested in the symbols code and then a reworked fix to the basename problem plus some more patches not present in the previous series.
Please let me know if you find any further problems,
Best Regards,
- Arnaldo
The following changes since commit 6d65894bc028d0342829ea1e64c9e9efad571124:
tools lib traceevent: Update kvm plugin with is_writable_pte helper (2013-12-04 15:38:14 -0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
for you to fetch changes up to 1448fef40af6079de38380c3a81bcf9994a1037d:
perf unwinding: Use the per-feature check flags (2013-12-10 16:51:12 -0300)
---------------------------------------------------------------- perf/core improvements and fixes:
. Add an option in 'perf script' to print the source line number, from Adrian Hunter
. Add --header/--header-only options to 'script' and 'report', the default is not tho show the header info, but as this has been the default for some time, leave a single line explaining how to obtain that information, from Jiri Olsa.
. Fix symoff printing in callchains in 'perf script', from Adrian Hunter.
. Assorted mmap_pages handling fixes, from Adrian Hunter.
. Fix summary percentage when processing files in 'perf trace', fom David Ahern.
. Handle old kernels where the "raw_syscalls" tracepoints were called plan "syscalls", in 'perf trace', from David Ahern.
. Several man pages typo fixes from Dongsheng Yang.
. Add '-v' option to 'perf kvm', from Dongsheng Yang.
. Make perf kvm diff support --guestmount, from Dongsheng Yang.
. Get rid of several die() calls in libtraceevent, from Namhyung Kim.
. Use basename() in a more robust way, to avoid problems related to different system library implementations for that function, from Stephane Eranian.
. Remove open coded management of short_name_allocated member, from Adrian Hunter
. Several cleanups in the "dso" methods, constifying some parameters and renaming some fields to clarify its purpose.
. Add per-feature check flags, fixing libunwind related build problems on some architectures, from Jean Pihet.
Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com
---------------------------------------------------------------- Adrian Hunter (7): perf script: Fix symoff printing in callchains perf script: Add an option to print the source line number perf record: Fix display of incorrect mmap pages perf evlist: Remove unnecessary parentheses perf evlist: Fix max mmap_pages perf evlist: Fix mmap pages rounding to power of 2 perf symbols: Remove open coded management of short_name_allocated member
Arnaldo Carvalho de Melo (8): perf symbols: Rename [sl]name_alloc to match the members they refer to perf machine: Don't open code assign dso->short_name perf symbols: Set alloc flag close to setting the long_name perf symbols: Remove open coded management of long_name_allocated member perf symbols: Constify dso->long_name perf symbols: Set freed members to NULL in dso destructor perf symbols: Constify some DSO methods parameters perf symbols: Rename filename argument
David Ahern (2): perf trace: Add support for syscalls vs raw_syscalls perf trace: Fix summary percentage when processing files
Dongsheng Yang (6): perf kvm: Introduce option -v for perf kvm command. perf kvm: Fix bug in 'stat report' perf archive: Remove duplicated 'runs' in man page perf annotate: Fix typo perf kvm: Move code to generate filename for perf-kvm to function. perf kvm: Make perf kvm diff support --guestmount.
Jean Pihet (2): perf tools: Add per-feature check flags perf unwinding: Use the per-feature check flags
Jiri Olsa (2): perf report: Add --header/--header-only options perf script: Add --header/--header-only options
Namhyung Kim (5): tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_alloc() tools lib traceevent: Get rid of malloc_or_die() in add_event() tools lib traceevent: Get rid of die() in create_arg_item() tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_add_filter_str() tools lib traceevent: Get rid of die() in pevent_filter_clear_trivial()
Stephane Eranian (1): perf symbols: Fix bug in usage of the basename() function
Steven Rostedt (1): tools lib traceevent: Report better error message on bad function args
tools/lib/traceevent/event-parse.c | 28 +++++--- tools/lib/traceevent/event-parse.h | 2 +- tools/lib/traceevent/parse-filter.c | 57 +++++++++++---- tools/perf/Documentation/perf-archive.txt | 6 +- tools/perf/Documentation/perf-kvm.txt | 7 +- tools/perf/Documentation/perf-report.txt | 9 +++ tools/perf/Documentation/perf-script.txt | 8 ++- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-diff.c | 3 +- tools/perf/builtin-kvm.c | 11 ++- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-report.c | 22 +++++- tools/perf/builtin-script.c | 23 +++++- tools/perf/builtin-trace.c | 32 ++++++++- tools/perf/config/Makefile | 52 ++++++++------ tools/perf/config/feature-checks/Makefile | 8 +-- tools/perf/util/annotate.c | 2 +- tools/perf/util/build-id.c | 2 +- tools/perf/util/build-id.h | 2 +- tools/perf/util/dso.c | 112 ++++++++++++++++++++---------- tools/perf/util/dso.h | 16 ++--- tools/perf/util/evlist.c | 10 +-- tools/perf/util/header.c | 6 +- tools/perf/util/machine.c | 6 +- tools/perf/util/map.c | 17 +++++ tools/perf/util/map.h | 2 + tools/perf/util/probe-event.c | 2 +- tools/perf/util/session.c | 15 +++- tools/perf/util/session.h | 1 + tools/perf/util/srcline.c | 2 +- tools/perf/util/symbol.c | 38 ++++------ tools/perf/util/symbol.h | 3 +- tools/perf/util/util.c | 14 ++++ tools/perf/util/util.h | 14 ++++ tools/perf/util/vdso.c | 2 +- 35 files changed, 375 insertions(+), 163 deletions(-)
From: Jean Pihet jean.pihet@linaro.org
Add CFLAGS and LDFLAGS for each feature to be checked. This allows to pass flags and parameters to the feature checks compilation. Also simplifies the feature check makefile, to come in a subsequent patch.
Signed-off-by: Jean Pihet jean.pihet@linaro.org Acked-by: Ingo Molnar mingo@kernel.org Acked-by: Jiri Olsa jolsa@redhat.com Cc: Ingo Molnar mingo@kernel.org Cc: Jiri Olsa jolsa@redhat.com Cc: Will Deacon will.deacon@arm.com Cc: linaro-kernel@lists.linaro.org Cc: patches@linaro.org Link: http://lkml.kernel.org/r/1386678244-13535-2-git-send-email-jean.pihet@linaro... Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com --- tools/perf/config/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index bae10720a136..2afb132db51a 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -102,7 +102,7 @@ endif
feature_check = $(eval $(feature_check_code)) define feature_check_code - feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBUNWIND_LIBS="$(LIBUNWIND_LIBS)" -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0) + feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" LIBUNWIND_LIBS="$(LIBUNWIND_LIBS)" -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0) endef
feature_set = $(eval $(feature_set_code))
From: Jean Pihet jean.pihet@linaro.org
Use the per-feature check flags for the unwinding feature in order to correctly compile the test-all, libunwind and libunwind-debug-frame feature checks.
Tested on x86_64, ARMv7 and ARMv8 with and without LIBUNWIND_DIR set in 'make -C tools/perf'
Signed-off-by: Jean Pihet jean.pihet@linaro.org Acked-by: Ingo Molnar mingo@kernel.org Acked-by: Jiri Olsa jolsa@redhat.com Cc: Ingo Molnar mingo@kernel.org Cc: Jiri Olsa jolsa@redhat.com Cc: Will Deacon will.deacon@arm.com Cc: linaro-kernel@lists.linaro.org Cc: patches@linaro.org Link: http://lkml.kernel.org/r/1386678244-13535-3-git-send-email-jean.pihet@linaro... Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com --- tools/perf/config/Makefile | 52 ++++++++++++++++++------------- tools/perf/config/feature-checks/Makefile | 8 ++--- 2 files changed, 34 insertions(+), 26 deletions(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 2afb132db51a..5a1f4df3c3a8 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -36,6 +36,30 @@ ifeq ($(ARCH),arm) LIBUNWIND_LIBS = -lunwind -lunwind-arm endif
+ifeq ($(LIBUNWIND_LIBS),) + NO_LIBUNWIND := 1 +else + # + # For linking with debug library, run like: + # + # make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/ + # + ifdef LIBUNWIND_DIR + LIBUNWIND_CFLAGS = -I$(LIBUNWIND_DIR)/include + LIBUNWIND_LDFLAGS = -L$(LIBUNWIND_DIR)/lib + endif + LIBUNWIND_LDFLAGS += $(LIBUNWIND_LIBS) + + # Set per-feature check compilation flags + FEATURE_CHECK_CFLAGS-libunwind = $(LIBUNWIND_CFLAGS) + FEATURE_CHECK_LDFLAGS-libunwind = $(LIBUNWIND_LDFLAGS) + FEATURE_CHECK_CFLAGS-libunwind-debug-frame = $(LIBUNWIND_CFLAGS) + FEATURE_CHECK_LDFLAGS-libunwind-debug-frame = $(LIBUNWIND_LDFLAGS) + # and the flags for the test-all case + FEATURE_CHECK_CFLAGS-all += $(LIBUNWIND_CFLAGS) + FEATURE_CHECK_LDFLAGS-all += $(LIBUNWIND_LDFLAGS) +endif + ifeq ($(NO_PERF_REGS),0) CFLAGS += -DHAVE_PERF_REGS_SUPPORT endif @@ -102,7 +126,7 @@ endif
feature_check = $(eval $(feature_check_code)) define feature_check_code - feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" LIBUNWIND_LIBS="$(LIBUNWIND_LIBS)" -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0) + feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0) endef
feature_set = $(eval $(feature_set_code)) @@ -305,21 +329,7 @@ ifndef NO_LIBELF endif # NO_DWARF endif # NO_LIBELF
-ifeq ($(LIBUNWIND_LIBS),) - NO_LIBUNWIND := 1 -endif - ifndef NO_LIBUNWIND - # - # For linking with debug library, run like: - # - # make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/ - # - ifdef LIBUNWIND_DIR - LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include - LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib - endif - ifneq ($(feature-libunwind), 1) msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1); NO_LIBUNWIND := 1 @@ -334,14 +344,12 @@ ifndef NO_LIBUNWIND # non-ARM has no dwarf_find_debug_frame() function: CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME endif - endif -endif
-ifndef NO_LIBUNWIND - CFLAGS += -DHAVE_LIBUNWIND_SUPPORT - EXTLIBS += $(LIBUNWIND_LIBS) - CFLAGS += $(LIBUNWIND_CFLAGS) - LDFLAGS += $(LIBUNWIND_LDFLAGS) + CFLAGS += -DHAVE_LIBUNWIND_SUPPORT + EXTLIBS += $(LIBUNWIND_LIBS) + CFLAGS += $(LIBUNWIND_CFLAGS) + LDFLAGS += $(LIBUNWIND_LDFLAGS) + endif # ifneq ($(feature-libunwind), 1) endif
ifndef NO_LIBAUDIT diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile index b8bb749c3392..bc86462e80a2 100644 --- a/tools/perf/config/feature-checks/Makefile +++ b/tools/perf/config/feature-checks/Makefile @@ -32,12 +32,12 @@ CC := $(CC) -MD
all: $(FILES)
-BUILD = $(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT)$@ $@.c +BUILD = $(CC) $(CFLAGS) -o $(OUTPUT)$@ $@.c $(LDFLAGS)
###############################
test-all: - $(BUILD) -Werror -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma $(LIBUNWIND_LIBS) -lelf -laudit -I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl + $(BUILD) -Werror -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl
test-hello: $(BUILD) @@ -70,10 +70,10 @@ test-libnuma: $(BUILD) -lnuma
test-libunwind: - $(BUILD) $(LIBUNWIND_LIBS) -lelf + $(BUILD) -lelf
test-libunwind-debug-frame: - $(BUILD) $(LIBUNWIND_LIBS) -lelf + $(BUILD) -lelf
test-libaudit: $(BUILD) -laudit
* Arnaldo Carvalho de Melo acme@infradead.org wrote:
From: Arnaldo Carvalho de Melo acme@ghostprotocols.net
Hi Ingo,
The first 20 patches in this series are the same as in the previous one, so I'm not reposting them now.
This series has the code style/constification changes you suggested in the symbols code and then a reworked fix to the basename problem plus some more patches not present in the previous series.
Please let me know if you find any further problems,
Best Regards,
- Arnaldo
The following changes since commit 6d65894bc028d0342829ea1e64c9e9efad571124:
tools lib traceevent: Update kvm plugin with is_writable_pte helper (2013-12-04 15:38:14 -0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
for you to fetch changes up to 1448fef40af6079de38380c3a81bcf9994a1037d:
perf unwinding: Use the per-feature check flags (2013-12-10 16:51:12 -0300)
perf/core improvements and fixes:
. Add an option in 'perf script' to print the source line number, from Adrian Hunter
. Add --header/--header-only options to 'script' and 'report', the default is not tho show the header info, but as this has been the default for some time, leave a single line explaining how to obtain that information, from Jiri Olsa.
. Fix symoff printing in callchains in 'perf script', from Adrian Hunter.
. Assorted mmap_pages handling fixes, from Adrian Hunter.
. Fix summary percentage when processing files in 'perf trace', fom David Ahern.
. Handle old kernels where the "raw_syscalls" tracepoints were called plan "syscalls", in 'perf trace', from David Ahern.
. Several man pages typo fixes from Dongsheng Yang.
. Add '-v' option to 'perf kvm', from Dongsheng Yang.
. Make perf kvm diff support --guestmount, from Dongsheng Yang.
. Get rid of several die() calls in libtraceevent, from Namhyung Kim.
. Use basename() in a more robust way, to avoid problems related to different system library implementations for that function, from Stephane Eranian.
. Remove open coded management of short_name_allocated member, from Adrian Hunter
. Several cleanups in the "dso" methods, constifying some parameters and renaming some fields to clarify its purpose.
. Add per-feature check flags, fixing libunwind related build problems on some architectures, from Jean Pihet.
Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com
Adrian Hunter (7): perf script: Fix symoff printing in callchains perf script: Add an option to print the source line number perf record: Fix display of incorrect mmap pages perf evlist: Remove unnecessary parentheses perf evlist: Fix max mmap_pages perf evlist: Fix mmap pages rounding to power of 2 perf symbols: Remove open coded management of short_name_allocated member
Arnaldo Carvalho de Melo (8): perf symbols: Rename [sl]name_alloc to match the members they refer to perf machine: Don't open code assign dso->short_name perf symbols: Set alloc flag close to setting the long_name perf symbols: Remove open coded management of long_name_allocated member perf symbols: Constify dso->long_name perf symbols: Set freed members to NULL in dso destructor perf symbols: Constify some DSO methods parameters perf symbols: Rename filename argument
David Ahern (2): perf trace: Add support for syscalls vs raw_syscalls perf trace: Fix summary percentage when processing files
Dongsheng Yang (6): perf kvm: Introduce option -v for perf kvm command. perf kvm: Fix bug in 'stat report' perf archive: Remove duplicated 'runs' in man page perf annotate: Fix typo perf kvm: Move code to generate filename for perf-kvm to function. perf kvm: Make perf kvm diff support --guestmount.
Jean Pihet (2): perf tools: Add per-feature check flags perf unwinding: Use the per-feature check flags
Jiri Olsa (2): perf report: Add --header/--header-only options perf script: Add --header/--header-only options
Namhyung Kim (5): tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_alloc() tools lib traceevent: Get rid of malloc_or_die() in add_event() tools lib traceevent: Get rid of die() in create_arg_item() tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_add_filter_str() tools lib traceevent: Get rid of die() in pevent_filter_clear_trivial()
Stephane Eranian (1): perf symbols: Fix bug in usage of the basename() function
Steven Rostedt (1): tools lib traceevent: Report better error message on bad function args
tools/lib/traceevent/event-parse.c | 28 +++++--- tools/lib/traceevent/event-parse.h | 2 +- tools/lib/traceevent/parse-filter.c | 57 +++++++++++---- tools/perf/Documentation/perf-archive.txt | 6 +- tools/perf/Documentation/perf-kvm.txt | 7 +- tools/perf/Documentation/perf-report.txt | 9 +++ tools/perf/Documentation/perf-script.txt | 8 ++- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-diff.c | 3 +- tools/perf/builtin-kvm.c | 11 ++- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-report.c | 22 +++++- tools/perf/builtin-script.c | 23 +++++- tools/perf/builtin-trace.c | 32 ++++++++- tools/perf/config/Makefile | 52 ++++++++------ tools/perf/config/feature-checks/Makefile | 8 +-- tools/perf/util/annotate.c | 2 +- tools/perf/util/build-id.c | 2 +- tools/perf/util/build-id.h | 2 +- tools/perf/util/dso.c | 112 ++++++++++++++++++++---------- tools/perf/util/dso.h | 16 ++--- tools/perf/util/evlist.c | 10 +-- tools/perf/util/header.c | 6 +- tools/perf/util/machine.c | 6 +- tools/perf/util/map.c | 17 +++++ tools/perf/util/map.h | 2 + tools/perf/util/probe-event.c | 2 +- tools/perf/util/session.c | 15 +++- tools/perf/util/session.h | 1 + tools/perf/util/srcline.c | 2 +- tools/perf/util/symbol.c | 38 ++++------ tools/perf/util/symbol.h | 3 +- tools/perf/util/util.c | 14 ++++ tools/perf/util/util.h | 14 ++++ tools/perf/util/vdso.c | 2 +- 35 files changed, 375 insertions(+), 163 deletions(-)
Pulled, thanks a lot Arnaldo!
Ingo
linaro-kernel@lists.linaro.org