diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-29 20:10:15 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-29 20:10:15 +0300 |
commit | 09f73a1ab8207481d1d6bd91ab7d0125c6722005 (patch) | |
tree | 7d067275e1089d28b7d77b1adefd16bb2c3e8d3d /tools/build | |
parent | 664a393a2663a0f62fc1b18157ccae33dcdbb8c8 (diff) | |
parent | 9dde6cadb92b5670b23b97ec53091df0530ec38b (diff) | |
download | linux-09f73a1ab8207481d1d6bd91ab7d0125c6722005.tar.xz |
Merge tag 'perf-tools-for-v5.19-2022-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull more perf tools updates from Arnaldo Carvalho de Melo:
- Add BPF based off-CPU profiling
- Improvements for system wide recording, specially for Intel PT
- Improve DWARF unwinding on arm64
- Support Arm CoreSight trace data disassembly in 'perf script' python
- Fix build with new libbpf version, related to supporting older
versions of distro released libbpf packages
- Fix event syntax error caused by ExtSel in the JSON events infra
- Use stdio interface if slang is not supported in 'perf c2c'
- Add 'perf test' checking for perf stat CSV output
- Sync the msr-index.h copy with the kernel sources
* tag 'perf-tools-for-v5.19-2022-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (38 commits)
tools arch x86: Sync the msr-index.h copy with the kernel sources
perf scripts python: Support Arm CoreSight trace data disassembly
perf scripting python: Expose dso and map information
perf jevents: Fix event syntax error caused by ExtSel
perf tools arm64: Add support for VG register
perf unwind arm64: Decouple Libunwind register names from Perf
perf unwind: Use dynamic register set for DWARF unwind
perf tools arm64: Copy perf_regs.h from the kernel
perf unwind arm64: Use perf's copy of kernel headers
perf c2c: Use stdio interface if slang is not supported
perf test: Add a basic offcpu profiling test
perf record: Add cgroup support for off-cpu profiling
perf record: Handle argument change in sched_switch
perf record: Implement basic filtering for off-cpu
perf record: Enable off-cpu analysis with BPF
perf report: Do not extend sample type of bpf-output event
perf test: Add checking for perf stat CSV output.
perf tools: Allow system-wide events to keep their own threads
perf tools: Allow system-wide events to keep their own CPUs
libperf evsel: Add comments for booleans
...
Diffstat (limited to 'tools/build')
-rw-r--r-- | tools/build/Makefile.feature | 4 | ||||
-rw-r--r-- | tools/build/feature/Makefile | 20 | ||||
-rw-r--r-- | tools/build/feature/test-libbpf-bpf_map_create.c | 8 | ||||
-rw-r--r-- | tools/build/feature/test-libbpf-bpf_object__next_map.c | 8 | ||||
-rw-r--r-- | tools/build/feature/test-libbpf-bpf_object__next_program.c | 8 | ||||
-rw-r--r-- | tools/build/feature/test-libbpf-bpf_prog_load.c | 9 | ||||
-rw-r--r-- | tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c | 5 | ||||
-rw-r--r-- | tools/build/feature/test-libbpf-btf__raw_data.c | 8 |
8 files changed, 68 insertions, 2 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index c6a48d0ef9ff..888a0421d43b 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -99,6 +99,10 @@ FEATURE_TESTS_EXTRA := \ clang \ libbpf \ libbpf-btf__load_from_kernel_by_id \ + libbpf-bpf_prog_load \ + libbpf-bpf_object__next_program \ + libbpf-bpf_object__next_map \ + libbpf-bpf_create_map \ libpfm4 \ libdebuginfod \ clang-bpf-co-re diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index cb4a2a4fa2e4..7c2a17e23c30 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -58,6 +58,11 @@ FILES= \ test-bpf.bin \ test-libbpf.bin \ test-libbpf-btf__load_from_kernel_by_id.bin \ + test-libbpf-bpf_prog_load.bin \ + test-libbpf-bpf_map_create.bin \ + test-libbpf-bpf_object__next_program.bin \ + test-libbpf-bpf_object__next_map.bin \ + test-libbpf-btf__raw_data.bin \ test-get_cpuid.bin \ test-sdt.bin \ test-cxx.bin \ @@ -291,6 +296,21 @@ $(OUTPUT)test-libbpf.bin: $(OUTPUT)test-libbpf-btf__load_from_kernel_by_id.bin: $(BUILD) -lbpf +$(OUTPUT)test-libbpf-bpf_prog_load.bin: + $(BUILD) -lbpf + +$(OUTPUT)test-libbpf-bpf_map_create.bin: + $(BUILD) -lbpf + +$(OUTPUT)test-libbpf-bpf_object__next_program.bin: + $(BUILD) -lbpf + +$(OUTPUT)test-libbpf-bpf_object__next_map.bin: + $(BUILD) -lbpf + +$(OUTPUT)test-libbpf-btf__raw_data.bin: + $(BUILD) -lbpf + $(OUTPUT)test-sdt.bin: $(BUILD) diff --git a/tools/build/feature/test-libbpf-bpf_map_create.c b/tools/build/feature/test-libbpf-bpf_map_create.c new file mode 100644 index 000000000000..b9f550e332c8 --- /dev/null +++ b/tools/build/feature/test-libbpf-bpf_map_create.c @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <bpf/bpf.h> + +int main(void) +{ + return bpf_map_create(0 /* map_type */, NULL /* map_name */, 0, /* key_size */, + 0 /* value_size */, 0 /* max_entries */, NULL /* opts */); +} diff --git a/tools/build/feature/test-libbpf-bpf_object__next_map.c b/tools/build/feature/test-libbpf-bpf_object__next_map.c new file mode 100644 index 000000000000..64adb519e97e --- /dev/null +++ b/tools/build/feature/test-libbpf-bpf_object__next_map.c @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <bpf/libbpf.h> + +int main(void) +{ + bpf_object__next_map(NULL /* obj */, NULL /* prev */); + return 0; +} diff --git a/tools/build/feature/test-libbpf-bpf_object__next_program.c b/tools/build/feature/test-libbpf-bpf_object__next_program.c new file mode 100644 index 000000000000..8bf4fd26b545 --- /dev/null +++ b/tools/build/feature/test-libbpf-bpf_object__next_program.c @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <bpf/libbpf.h> + +int main(void) +{ + bpf_object__next_program(NULL /* obj */, NULL /* prev */); + return 0; +} diff --git a/tools/build/feature/test-libbpf-bpf_prog_load.c b/tools/build/feature/test-libbpf-bpf_prog_load.c new file mode 100644 index 000000000000..47f516d63ebc --- /dev/null +++ b/tools/build/feature/test-libbpf-bpf_prog_load.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <bpf/bpf.h> + +int main(void) +{ + return bpf_prog_load(0 /* prog_type */, NULL /* prog_name */, + NULL /* license */, NULL /* insns */, + 0 /* insn_cnt */, NULL /* opts */); +} diff --git a/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c b/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c index f7c084428735..a17647f7d5a4 100644 --- a/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c +++ b/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -#include <bpf/libbpf.h> +#include <bpf/btf.h> int main(void) { - return btf__load_from_kernel_by_id(20151128, NULL); + btf__load_from_kernel_by_id(20151128); + return 0; } diff --git a/tools/build/feature/test-libbpf-btf__raw_data.c b/tools/build/feature/test-libbpf-btf__raw_data.c new file mode 100644 index 000000000000..57da31dd7581 --- /dev/null +++ b/tools/build/feature/test-libbpf-btf__raw_data.c @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <bpf/btf.h> + +int main(void) +{ + btf__raw_data(NULL /* btf_ro */, NULL /* size */); + return 0; +} |