diff options
author | Wang Nan <wangnan0@huawei.com> | 2016-04-10 07:55:10 +0000 |
---|---|---|
committer | Wang Nan <wangnan0@huawei.com> | 2016-04-15 11:30:50 +0000 |
commit | 0e69af17b78861710b1640d3c3ac77f90e670d32 (patch) | |
tree | 3dd10ba02711047a56a2df159390858ed8657888 | |
parent | 7ed42a02ad556e6fd030fab3cc9de4ef6d131d98 (diff) | |
download | linux-perf/overwrite.tar.gz |
perf tools: Add ubpf feature testperf/overwrite
-rw-r--r-- | tools/build/Makefile.feature | 6 | ||||
-rw-r--r-- | tools/build/feature/Makefile | 6 | ||||
-rw-r--r-- | tools/build/feature/test-ubpf.c | 11 | ||||
-rw-r--r-- | tools/lib/bpf/Makefile | 4 |
4 files changed, 22 insertions, 5 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 9f878619077aeb..eb84b6aa957992 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -56,7 +56,8 @@ FEATURE_TESTS_BASIC := \ zlib \ lzma \ get_cpuid \ - bpf + bpf \ + ubpf # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list # of all feature tests @@ -96,7 +97,8 @@ FEATURE_DISPLAY ?= \ zlib \ lzma \ get_cpuid \ - bpf + bpf \ + ubpf # Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features. # If in the future we need per-feature checks/flags for features not diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 4ae94dbfdab98d..7480e0f4be6855 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -37,7 +37,8 @@ FILES= \ test-zlib.bin \ test-lzma.bin \ test-bpf.bin \ - test-get_cpuid.bin + test-get_cpuid.bin \ + test-ubpf.bin FILES := $(addprefix $(OUTPUT),$(FILES)) @@ -182,6 +183,9 @@ $(OUTPUT)test-get_cpuid.bin: $(OUTPUT)test-bpf.bin: $(BUILD) +$(OUTPUT)test-ubpf.bin: + $(BUILD) -lubpf + -include $(OUTPUT)*.d ############################### diff --git a/tools/build/feature/test-ubpf.c b/tools/build/feature/test-ubpf.c new file mode 100644 index 00000000000000..3c0a257d286b29 --- /dev/null +++ b/tools/build/feature/test-ubpf.c @@ -0,0 +1,11 @@ +#include <stdlib.h> +#include <ubpf.h> + +int main(void) +{ + struct ubpf_vm *vm; + + vm = ubpf_create(); + ubpf_destroy(vm); + return 0; +} diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index fc1bc75ae56d4f..8dfa51276b1404 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -65,8 +65,8 @@ ifndef VERBOSE endif FEATURE_USER = .libbpf -FEATURE_TESTS = libelf libelf-getphdrnum libelf-mmap bpf -FEATURE_DISPLAY = libelf bpf +FEATURE_TESTS = libelf libelf-getphdrnum libelf-mmap bpf ubpf +FEATURE_DISPLAY = libelf bpf ubpf INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES) |