Commit Graph

6 Commits

Author SHA1 Message Date
Dominique Martinet
0bf9c7660f bpftrace: fix tcp*.bt/runqlat.bt scripts
tcp*.bt scripts tried to include glibc headers, which didn't work on
nixos because bpftrace tried to call clang-major with some options to
get the paths, but we never told it where to find it.
Give bpftrace the path directly instead of giving it a path to clang.

runqlat.bt doesn't work with glibc headers and requires kernel headers
which are no longer extracted, just provide its value.

Note the default clang output also had some clang-internal headers, but
these seem to be included anyway through libclang API without having to
give them here, so we only pass the glibc ones.

While here:
- also backport another bpftrace patch that made the tcp*.bt tools to
actually not require these includes
- and add tests that we can include these.

Co-authored-by: Arian van Putten <arian.vanputten@gmail.com>
2024-06-23 21:07:42 +09:00
Dominique Martinet
5e8a27296b nixosTests.bpf: disable kfunc test on aarch64
commit fd5d7b2586 ("tests/bpf: add module BTF test") added a new test
for module BTF, but that test does not work on aarch64. (merged in
https://github.com/NixOS/nixpkgs/pull/214001 )

This is not a regression (kfuncs didn't work on bpftrace 0.16,
even if you do not use features requiring BTF like argument name
or type), so just disable the test on aarch64 until it is fixed.
2023-05-06 06:40:30 +09:00
Dominique Martinet
fd5d7b2586 tests/bpf: add module BTF test
bpftrace 0.17 added module BTF support, check this works.

On bpftrace 0.16, this failed with the following error:
> ERROR: kfunc:nft_trans_alloc_gfp: no BTF data for the function
2023-02-03 16:53:17 -06:00
Robert Hensing
aa0f27abb0 treewide: machine -> nodes.machine 2022-03-28 14:11:58 +02:00
Dominique Martinet
824d26d395 bcc: 0.23.0 -> 0.24.0
Also add an extra test in nixos/tests/bpf.nix for BTF usage in bpftrace

Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2022-02-11 20:37:39 +09:00
Dominique Martinet
559fe43665 nixos/tests: add bpf test
test bcc and bpftrace briefly
2021-12-04 21:12:07 +09:00