2013-09-30 19:37:10 +08:00
|
|
|
FILES= \
|
2013-12-21 13:48:11 +08:00
|
|
|
test-all.bin \
|
|
|
|
test-backtrace.bin \
|
|
|
|
test-bionic.bin \
|
|
|
|
test-dwarf.bin \
|
2016-04-05 22:33:41 +08:00
|
|
|
test-dwarf_getlocations.bin \
|
2013-12-21 13:48:11 +08:00
|
|
|
test-fortify-source.bin \
|
2014-07-14 18:02:53 +08:00
|
|
|
test-sync-compare-and-swap.bin \
|
2013-12-21 13:48:11 +08:00
|
|
|
test-glibc.bin \
|
|
|
|
test-gtk2.bin \
|
|
|
|
test-gtk2-infobar.bin \
|
|
|
|
test-hello.bin \
|
|
|
|
test-libaudit.bin \
|
|
|
|
test-libbfd.bin \
|
|
|
|
test-liberty.bin \
|
|
|
|
test-liberty-z.bin \
|
|
|
|
test-cplus-demangle.bin \
|
|
|
|
test-libelf.bin \
|
|
|
|
test-libelf-getphdrnum.bin \
|
2016-07-12 23:19:09 +08:00
|
|
|
test-libelf-gelf_getnote.bin \
|
2016-07-05 06:35:47 +08:00
|
|
|
test-libelf-getshdrstrndx.bin \
|
2013-12-21 13:48:11 +08:00
|
|
|
test-libelf-mmap.bin \
|
|
|
|
test-libnuma.bin \
|
2015-09-17 23:20:28 +08:00
|
|
|
test-numa_num_possible_cpus.bin \
|
2013-12-21 13:48:11 +08:00
|
|
|
test-libperl.bin \
|
|
|
|
test-libpython.bin \
|
|
|
|
test-libpython-version.bin \
|
|
|
|
test-libslang.bin \
|
2015-11-30 17:02:21 +08:00
|
|
|
test-libcrypto.bin \
|
2013-12-21 13:48:11 +08:00
|
|
|
test-libunwind.bin \
|
|
|
|
test-libunwind-debug-frame.bin \
|
2016-05-10 15:40:31 +08:00
|
|
|
test-libunwind-x86.bin \
|
|
|
|
test-libunwind-x86_64.bin \
|
|
|
|
test-libunwind-arm.bin \
|
|
|
|
test-libunwind-aarch64.bin \
|
2016-05-10 15:40:32 +08:00
|
|
|
test-libunwind-debug-frame-arm.bin \
|
|
|
|
test-libunwind-debug-frame-aarch64.bin \
|
2015-01-13 21:43:24 +08:00
|
|
|
test-pthread-attr-setaffinity-np.bin \
|
2013-12-21 13:48:11 +08:00
|
|
|
test-stackprotector-all.bin \
|
2014-02-19 23:52:56 +08:00
|
|
|
test-timerfd.bin \
|
2014-10-24 05:16:03 +08:00
|
|
|
test-libdw-dwarf-unwind.bin \
|
2015-02-21 06:16:58 +08:00
|
|
|
test-libbabeltrace.bin \
|
2014-10-24 05:16:03 +08:00
|
|
|
test-compile-32.bin \
|
perf tools: Add gzip decompression support for kernel module
Now my Archlinux box shows module symbols correctly.
Before:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/date, maybe install a debug package?
No kallsyms or vmlinux with build-id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 was found
[drm] with build id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 not found, continuing without symbols
No kallsyms or vmlinux with build-id edd931629094b660ca9dec09a1b635c8d87aa2ee was found
[jbd2] with build id edd931629094b660ca9dec09a1b635c8d87aa2ee not found, continuing without symbols
No kallsyms or vmlinux with build-id a7b1eada671c34933e5610bb920b2ca4945a82c3 was found
[ext4] with build id a7b1eada671c34933e5610bb920b2ca4945a82c3 not found, continuing without symbols
No kallsyms or vmlinux with build-id d69511fa3e5840e770336ef45b06c83fef8d74e3 was found
[scsi_mod] with build id d69511fa3e5840e770336ef45b06c83fef8d74e3 not found, continuing without symbols
No kallsyms or vmlinux with build-id af0430af13461af058770ee9b87afc07922c2e77 was found
[libata] with build id af0430af13461af058770ee9b87afc07922c2e77 not found, continuing without symbols
No kallsyms or vmlinux with build-id aaeedff8160ce631a5f0333591c6ff291201d29f was found
[libahci] with build id aaeedff8160ce631a5f0333591c6ff291201d29f not found, continuing without symbols
No kallsyms or vmlinux with build-id c57907712becaf662dc4981824bb372c0441d605 was found
[mac80211] with build id c57907712becaf662dc4981824bb372c0441d605 not found, continuing without symbols
No kallsyms or vmlinux with build-id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f was found
[iwldvm] with build id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f not found, continuing without symbols
No kallsyms or vmlinux with build-id 2d86086bf136bf374a2f029cf85a48194f9b950b was found
[cfg80211] with build id 2d86086bf136bf374a2f029cf85a48194f9b950b not found, continuing without symbols
No kallsyms or vmlinux with build-id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 was found
[iwlwifi] with build id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 not found, continuing without symbols
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ....................... ........................................................
#
0.03% swapper [ext4] [k] 0x000000000000fe2e
0.03% swapper [kernel.kallsyms] [k] account_entity_enqueue
0.03% swapper [ext4] [k] 0x000000000000fc2b
0.03% irq/50-iwlwifi [iwlwifi] [k] 0x000000000000200b
0.03% swapper [kernel.kallsyms] [k] ktime_add_safe
0.03% swapper [kernel.kallsyms] [k] elv_completed_request
0.03% swapper [libata] [k] 0x0000000000003997
0.03% swapper [libahci] [k] 0x0000000000001f25
0.03% swapper [kernel.kallsyms] [k] rb_next
0.03% swapper [kernel.kallsyms] [k] blk_finish_request
0.03% swapper [ext4] [k] 0x0000000000010248
0.00% perf [kernel.kallsyms] [k] native_write_msr_safe
After:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/tr, maybe install a debug package?
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ........................... ......................................................
#
0.04% kworker/u16:3 [ext4] [k] ext4_read_block_bitmap
0.03% kworker/u16:0 [mac80211] [k] ieee80211_sta_reset_beacon_monitor
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_get_bssid
0.02% firefox [e1000e] [k] __ew32_prepare
0.02% swapper [libahci] [k] ahci_handle_port_interrupt
0.02% emacs libglib-2.0.so.0.4000.0 [.] g_mutex_unlock
0.02% swapper [e1000e] [k] e1000_clean_tx_irq
0.02% dwm [kernel.kallsyms] [k] __schedule
0.02% gnome-terminal- [vdso] [.] __vdso_clock_gettime
0.02% swapper [e1000e] [k] e1000_alloc_rx_buffers
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_rx
0.01% firefox [vdso] [.] __vdso_gettimeofday
0.01% irq/50-iwlwifi [iwlwifi] [k] iwl_pcie_rxq_restock.part.13
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/87h9yexshi.fsf@sejong.aot.lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-10-31 15:51:38 +08:00
|
|
|
test-compile-x32.bin \
|
2015-03-04 18:35:47 +08:00
|
|
|
test-zlib.bin \
|
bpf tools: Introduce 'bpf' library and add bpf feature check
This is the first patch of libbpf. The goal of libbpf is to create a
standard way for accessing eBPF object files. This patch creates
'Makefile' and 'Build' for it, allows 'make' to build libbpf.a and
libbpf.so, 'make install' to put them into proper directories.
Most part of Makefile is borrowed from traceevent.
Before building, it checks the existence of libelf in Makefile, and deny
to build if not found. Instead of throwing an error if libelf not found,
the error raises in a phony target "elfdep". This design is to ensure
'make clean' still workable even if libelf is not found.
Because libbpf requires 'kern_version' field set for 'union bpf_attr'
(bpfdep" is used for that dependency), Kernel BPF API is also checked
by intruducing a new feature check 'bpf' into tools/build/feature,
which checks the existence and version of linux/bpf.h. When building
libbpf, it searches that file from include/uapi/linux in kernel source
tree (controlled by FEATURE_CHECK_CFLAGS-bpf). Since it searches kernel
source tree it reside, installing of newest kernel headers is not
required, except we are trying to port these files to an old kernel.
To avoid checking that file when perf building, the newly introduced
'bpf' feature check doesn't added into FEATURE_TESTS and
FEATURE_DISPLAY by default in tools/build/Makefile.feature, but added
into libbpf's specific.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kaixu Xia <xiakaixu@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Zefan Li <lizefan@huawei.com>
Bcc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1435716878-189507-4-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-07-01 10:13:51 +08:00
|
|
|
test-lzma.bin \
|
2015-09-17 23:54:30 +08:00
|
|
|
test-bpf.bin \
|
2016-07-12 18:05:56 +08:00
|
|
|
test-get_cpuid.bin \
|
2016-09-26 15:26:56 +08:00
|
|
|
test-sdt.bin \
|
2016-11-02 21:35:48 +08:00
|
|
|
test-cxx.bin \
|
|
|
|
test-jvmti.bin
|
2013-09-30 16:08:24 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
FILES := $(addprefix $(OUTPUT),$(FILES))
|
|
|
|
|
2014-01-15 18:44:08 +08:00
|
|
|
CC := $(CROSS_COMPILE)gcc -MD
|
2016-09-26 15:26:56 +08:00
|
|
|
CXX := $(CROSS_COMPILE)g++ -MD
|
2014-01-15 18:44:08 +08:00
|
|
|
PKG_CONFIG := $(CROSS_COMPILE)pkg-config
|
2016-11-26 15:03:31 +08:00
|
|
|
LLVM_CONFIG ?= llvm-config
|
2013-09-30 19:51:28 +08:00
|
|
|
|
2013-09-30 16:08:24 +08:00
|
|
|
all: $(FILES)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
|
|
|
|
BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
|
2013-09-30 16:08:24 +08:00
|
|
|
|
2016-09-26 15:26:56 +08:00
|
|
|
__BUILDXX = $(CXX) $(CXXFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
|
|
|
|
BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1
|
|
|
|
|
2013-09-30 16:08:24 +08:00
|
|
|
###############################
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-all.bin:
|
2015-03-04 18:35:47 +08:00
|
|
|
$(BUILD) -fstack-protector-all -O2 -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 -lz -llzma
|
2013-10-01 20:14:31 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-hello.bin:
|
2013-09-30 16:08:24 +08:00
|
|
|
$(BUILD)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
|
2015-02-28 17:16:27 +08:00
|
|
|
$(BUILD) -D_GNU_SOURCE -lpthread
|
2015-01-13 21:43:24 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-stackprotector-all.bin:
|
2015-02-28 17:16:27 +08:00
|
|
|
$(BUILD) -fstack-protector-all
|
2013-09-30 19:48:44 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-fortify-source.bin:
|
2015-02-28 17:16:27 +08:00
|
|
|
$(BUILD) -O2 -D_FORTIFY_SOURCE=2
|
2013-10-07 15:38:28 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-bionic.bin:
|
2013-09-30 20:11:46 +08:00
|
|
|
$(BUILD)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libelf.bin:
|
2013-09-30 20:20:25 +08:00
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-glibc.bin:
|
2013-10-07 16:34:20 +08:00
|
|
|
$(BUILD)
|
|
|
|
|
2015-08-13 06:48:37 +08:00
|
|
|
DWARFLIBS := -ldw
|
|
|
|
ifeq ($(findstring -static,${LDFLAGS}),-static)
|
|
|
|
DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
|
|
|
|
endif
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-dwarf.bin:
|
2015-08-13 06:48:37 +08:00
|
|
|
$(BUILD) $(DWARFLIBS)
|
2013-10-07 16:35:39 +08:00
|
|
|
|
2016-04-05 22:33:41 +08:00
|
|
|
$(OUTPUT)test-dwarf_getlocations.bin:
|
|
|
|
$(BUILD) $(DWARFLIBS)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libelf-mmap.bin:
|
2013-09-30 21:02:28 +08:00
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libelf-getphdrnum.bin:
|
2013-09-30 20:35:27 +08:00
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2016-07-12 23:19:09 +08:00
|
|
|
$(OUTPUT)test-libelf-gelf_getnote.bin:
|
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2016-07-05 06:35:47 +08:00
|
|
|
$(OUTPUT)test-libelf-getshdrstrndx.bin:
|
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libnuma.bin:
|
2013-09-30 19:37:10 +08:00
|
|
|
$(BUILD) -lnuma
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-numa_num_possible_cpus.bin:
|
2015-09-17 23:20:28 +08:00
|
|
|
$(BUILD) -lnuma
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libunwind.bin:
|
2013-12-10 20:24:04 +08:00
|
|
|
$(BUILD) -lelf
|
2013-09-30 20:45:44 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libunwind-debug-frame.bin:
|
2013-12-10 20:24:04 +08:00
|
|
|
$(BUILD) -lelf
|
2016-05-10 15:40:31 +08:00
|
|
|
$(OUTPUT)test-libunwind-x86.bin:
|
|
|
|
$(BUILD) -lelf -lunwind-x86
|
|
|
|
|
|
|
|
$(OUTPUT)test-libunwind-x86_64.bin:
|
|
|
|
$(BUILD) -lelf -lunwind-x86_64
|
|
|
|
|
|
|
|
$(OUTPUT)test-libunwind-arm.bin:
|
|
|
|
$(BUILD) -lelf -lunwind-arm
|
|
|
|
|
|
|
|
$(OUTPUT)test-libunwind-aarch64.bin:
|
|
|
|
$(BUILD) -lelf -lunwind-aarch64
|
|
|
|
|
2016-05-10 15:40:32 +08:00
|
|
|
$(OUTPUT)test-libunwind-debug-frame-arm.bin:
|
|
|
|
$(BUILD) -lelf -lunwind-arm
|
|
|
|
|
|
|
|
$(OUTPUT)test-libunwind-debug-frame-aarch64.bin:
|
|
|
|
$(BUILD) -lelf -lunwind-aarch64
|
2013-11-14 15:25:24 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libaudit.bin:
|
2013-09-30 20:55:31 +08:00
|
|
|
$(BUILD) -laudit
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libslang.bin:
|
2013-09-30 20:57:54 +08:00
|
|
|
$(BUILD) -I/usr/include/slang -lslang
|
|
|
|
|
2015-11-30 17:02:21 +08:00
|
|
|
$(OUTPUT)test-libcrypto.bin:
|
|
|
|
$(BUILD) -lcrypto
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-gtk2.bin:
|
2014-01-15 18:44:08 +08:00
|
|
|
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
|
2013-09-30 21:01:56 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-gtk2-infobar.bin:
|
2014-01-15 18:44:08 +08:00
|
|
|
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
|
2013-09-30 21:08:30 +08:00
|
|
|
|
2013-09-30 21:15:36 +08:00
|
|
|
grep-libs = $(filter -l%,$(1))
|
|
|
|
strip-libs = $(filter-out -l%,$(1))
|
|
|
|
|
|
|
|
PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
|
|
|
|
PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
|
|
|
|
PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
|
|
|
|
PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
|
|
|
|
FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libperl.bin:
|
2013-09-30 21:15:36 +08:00
|
|
|
$(BUILD) $(FLAGS_PERL_EMBED)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libpython.bin:
|
2014-07-29 14:57:19 +08:00
|
|
|
$(BUILD)
|
2013-09-30 21:18:37 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libpython-version.bin:
|
2014-07-29 14:57:19 +08:00
|
|
|
$(BUILD)
|
2013-09-30 21:40:04 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libbfd.bin:
|
2014-01-12 03:42:51 +08:00
|
|
|
$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
|
2013-09-30 21:53:31 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-liberty.bin:
|
|
|
|
$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
|
2013-10-02 21:15:09 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-liberty-z.bin:
|
|
|
|
$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
|
2013-10-02 21:15:09 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-cplus-demangle.bin:
|
2013-10-02 21:15:09 +08:00
|
|
|
$(BUILD) -liberty
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-backtrace.bin:
|
2013-09-30 22:49:38 +08:00
|
|
|
$(BUILD)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-timerfd.bin:
|
2013-10-30 00:43:16 +08:00
|
|
|
$(BUILD)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libdw-dwarf-unwind.bin:
|
2015-02-21 06:16:58 +08:00
|
|
|
$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-libbabeltrace.bin:
|
2015-02-21 06:16:58 +08:00
|
|
|
$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
|
2014-02-19 23:52:56 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-sync-compare-and-swap.bin:
|
2015-02-28 17:16:27 +08:00
|
|
|
$(BUILD)
|
2014-07-14 18:02:53 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-compile-32.bin:
|
|
|
|
$(CC) -m32 -o $@ test-compile.c
|
2014-10-24 05:16:03 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-compile-x32.bin:
|
|
|
|
$(CC) -mx32 -o $@ test-compile.c
|
2014-10-24 05:16:03 +08:00
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-zlib.bin:
|
perf tools: Add gzip decompression support for kernel module
Now my Archlinux box shows module symbols correctly.
Before:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/date, maybe install a debug package?
No kallsyms or vmlinux with build-id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 was found
[drm] with build id 7b4ea0a49ae2111925857099aaf05c3246ff33e0 not found, continuing without symbols
No kallsyms or vmlinux with build-id edd931629094b660ca9dec09a1b635c8d87aa2ee was found
[jbd2] with build id edd931629094b660ca9dec09a1b635c8d87aa2ee not found, continuing without symbols
No kallsyms or vmlinux with build-id a7b1eada671c34933e5610bb920b2ca4945a82c3 was found
[ext4] with build id a7b1eada671c34933e5610bb920b2ca4945a82c3 not found, continuing without symbols
No kallsyms or vmlinux with build-id d69511fa3e5840e770336ef45b06c83fef8d74e3 was found
[scsi_mod] with build id d69511fa3e5840e770336ef45b06c83fef8d74e3 not found, continuing without symbols
No kallsyms or vmlinux with build-id af0430af13461af058770ee9b87afc07922c2e77 was found
[libata] with build id af0430af13461af058770ee9b87afc07922c2e77 not found, continuing without symbols
No kallsyms or vmlinux with build-id aaeedff8160ce631a5f0333591c6ff291201d29f was found
[libahci] with build id aaeedff8160ce631a5f0333591c6ff291201d29f not found, continuing without symbols
No kallsyms or vmlinux with build-id c57907712becaf662dc4981824bb372c0441d605 was found
[mac80211] with build id c57907712becaf662dc4981824bb372c0441d605 not found, continuing without symbols
No kallsyms or vmlinux with build-id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f was found
[iwldvm] with build id e0589077cc0ec8c3e4c40eb9f2d9e69d236bee8f not found, continuing without symbols
No kallsyms or vmlinux with build-id 2d86086bf136bf374a2f029cf85a48194f9b950b was found
[cfg80211] with build id 2d86086bf136bf374a2f029cf85a48194f9b950b not found, continuing without symbols
No kallsyms or vmlinux with build-id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 was found
[iwlwifi] with build id 4493c48599bdb3d91d0f8db5150e0be33fdd9221 not found, continuing without symbols
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ....................... ........................................................
#
0.03% swapper [ext4] [k] 0x000000000000fe2e
0.03% swapper [kernel.kallsyms] [k] account_entity_enqueue
0.03% swapper [ext4] [k] 0x000000000000fc2b
0.03% irq/50-iwlwifi [iwlwifi] [k] 0x000000000000200b
0.03% swapper [kernel.kallsyms] [k] ktime_add_safe
0.03% swapper [kernel.kallsyms] [k] elv_completed_request
0.03% swapper [libata] [k] 0x0000000000003997
0.03% swapper [libahci] [k] 0x0000000000001f25
0.03% swapper [kernel.kallsyms] [k] rb_next
0.03% swapper [kernel.kallsyms] [k] blk_finish_request
0.03% swapper [ext4] [k] 0x0000000000010248
0.00% perf [kernel.kallsyms] [k] native_write_msr_safe
After:
$ perf report --stdio
Failed to open /tmp/perf-3477.map, continuing without symbols
no symbols found in /usr/bin/tr, maybe install a debug package?
...
#
# Overhead Command Shared Object Symbol
# ........ ............... ........................... ......................................................
#
0.04% kworker/u16:3 [ext4] [k] ext4_read_block_bitmap
0.03% kworker/u16:0 [mac80211] [k] ieee80211_sta_reset_beacon_monitor
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_get_bssid
0.02% firefox [e1000e] [k] __ew32_prepare
0.02% swapper [libahci] [k] ahci_handle_port_interrupt
0.02% emacs libglib-2.0.so.0.4000.0 [.] g_mutex_unlock
0.02% swapper [e1000e] [k] e1000_clean_tx_irq
0.02% dwm [kernel.kallsyms] [k] __schedule
0.02% gnome-terminal- [vdso] [.] __vdso_clock_gettime
0.02% swapper [e1000e] [k] e1000_alloc_rx_buffers
0.02% irq/50-iwlwifi [mac80211] [k] ieee80211_rx
0.01% firefox [vdso] [.] __vdso_gettimeofday
0.01% irq/50-iwlwifi [iwlwifi] [k] iwl_pcie_rxq_restock.part.13
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/87h9yexshi.fsf@sejong.aot.lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-10-31 15:51:38 +08:00
|
|
|
$(BUILD) -lz
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-lzma.bin:
|
2015-03-04 18:35:47 +08:00
|
|
|
$(BUILD) -llzma
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-get_cpuid.bin:
|
2015-09-17 23:54:30 +08:00
|
|
|
$(BUILD)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
$(OUTPUT)test-bpf.bin:
|
bpf tools: Introduce 'bpf' library and add bpf feature check
This is the first patch of libbpf. The goal of libbpf is to create a
standard way for accessing eBPF object files. This patch creates
'Makefile' and 'Build' for it, allows 'make' to build libbpf.a and
libbpf.so, 'make install' to put them into proper directories.
Most part of Makefile is borrowed from traceevent.
Before building, it checks the existence of libelf in Makefile, and deny
to build if not found. Instead of throwing an error if libelf not found,
the error raises in a phony target "elfdep". This design is to ensure
'make clean' still workable even if libelf is not found.
Because libbpf requires 'kern_version' field set for 'union bpf_attr'
(bpfdep" is used for that dependency), Kernel BPF API is also checked
by intruducing a new feature check 'bpf' into tools/build/feature,
which checks the existence and version of linux/bpf.h. When building
libbpf, it searches that file from include/uapi/linux in kernel source
tree (controlled by FEATURE_CHECK_CFLAGS-bpf). Since it searches kernel
source tree it reside, installing of newest kernel headers is not
required, except we are trying to port these files to an old kernel.
To avoid checking that file when perf building, the newly introduced
'bpf' feature check doesn't added into FEATURE_TESTS and
FEATURE_DISPLAY by default in tools/build/Makefile.feature, but added
into libbpf's specific.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kaixu Xia <xiakaixu@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Zefan Li <lizefan@huawei.com>
Bcc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1435716878-189507-4-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-07-01 10:13:51 +08:00
|
|
|
$(BUILD)
|
|
|
|
|
2016-07-12 18:05:56 +08:00
|
|
|
$(OUTPUT)test-sdt.bin:
|
|
|
|
$(BUILD)
|
|
|
|
|
2016-09-26 15:26:56 +08:00
|
|
|
$(OUTPUT)test-cxx.bin:
|
|
|
|
$(BUILDXX) -std=gnu++11
|
|
|
|
|
2016-11-02 21:35:48 +08:00
|
|
|
$(OUTPUT)test-jvmti.bin:
|
|
|
|
$(BUILD)
|
|
|
|
|
2016-11-26 15:03:31 +08:00
|
|
|
$(OUTPUT)test-llvm.bin:
|
|
|
|
$(BUILDXX) -std=gnu++11 \
|
|
|
|
-I$(shell $(LLVM_CONFIG) --includedir) \
|
|
|
|
-L$(shell $(LLVM_CONFIG) --libdir) \
|
|
|
|
$(shell $(LLVM_CONFIG) --libs Core BPF) \
|
|
|
|
$(shell $(LLVM_CONFIG) --system-libs)
|
|
|
|
|
2016-11-26 15:03:32 +08:00
|
|
|
$(OUTPUT)test-clang.bin:
|
|
|
|
$(BUILDXX) -std=gnu++11 \
|
|
|
|
-I$(shell $(LLVM_CONFIG) --includedir) \
|
|
|
|
-L$(shell $(LLVM_CONFIG) --libdir) \
|
|
|
|
-Wl,--start-group -lclangBasic -lclangDriver \
|
|
|
|
-lclangFrontend -lclangEdit -lclangLex \
|
|
|
|
-lclangAST -Wl,--end-group \
|
|
|
|
$(shell $(LLVM_CONFIG) --libs Core option) \
|
|
|
|
$(shell $(LLVM_CONFIG) --system-libs)
|
|
|
|
|
2015-12-15 23:39:32 +08:00
|
|
|
-include $(OUTPUT)*.d
|
2013-09-30 19:51:28 +08:00
|
|
|
|
2013-09-30 16:08:24 +08:00
|
|
|
###############################
|
|
|
|
|
|
|
|
clean:
|
2015-12-15 23:39:32 +08:00
|
|
|
rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
|