- 08 Feb, 2019 1 commit
-
-
Kirill Smelkov authored
Currently bpftrace uses only /lib/modules/`uname -r`/source/ if it exists. This however leads to failures Debian where generated kernel headers, such as include/generated/autoconf.h are put into a separate directory, for example: ---- 8< ---- (fuse_vs_mmapsem.bt) #include <linux/path.h> #include <linux/dcache.h> #include <linux/sched.h> #include <linux/mm_types.h> kprobe:fuse_readpage,kprobe:fuse_readpages { printf("%s (%d) %s\n", probe, ((task_struct *)curtask)->mm->mmap_sem.count.counter, kstack); } ---- 8< ---- # ./bpftrace fuse_vs_mmapsem.bt /lib/modules/4.19.0-2-amd64/source/include/linux/kconfig.h:5:10: fatal error: 'generated/autoconf.h' file not found Unknown struct/union: 'task_struct' Fix it by using both /lib/modules/`uname -r`/source/ and /lib/modules/`uname -r`/build/ if both are present. /cc @vincentbernat P.S. I was not using C++ for ages, so please forgive me in advance if I missed something.
-
- 07 Feb, 2019 6 commits
-
-
Brendan Gregg authored
make map stack indentation 4 chars
-
Brendan Gregg authored
Prevent empty trigger functions to be optimized away with -O2 (#218)
-
Augusto Caringi authored
From the gcc manual: 'noinline - This function attribute prevents a function from being considered for inlining. If the function does not have side effects, there are optimizations other than inlining that cause function calls to be optimized away, although the function call is live. To keep such calls from being optimized away, put asm ("");' (https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html)
-
Brendan Gregg authored
-
Brendan Gregg authored
-D__BPF_TRACING__
-
Kirill Smelkov authored
I was trying bpftrace on my example[1] with updated kernel (4.19.16) and got: /lib/modules/4.19.0-2-amd64/source/arch/x86/include/asm/cpufeature.h:150:2: warning: "Compiler lacks ASM_GOTO support. Add -D __BPF_TRACING__ to your compiler arguments" [-W#warnings] This was added in https://git.kernel.org/linus/b1ae32dbab which also adds -D__BPF_TRACING__ to samples/bpf/Makefile in kernel. [1] https://github.com/iovisor/bpftrace/issues/252#issuecomment-440346608
-
- 06 Feb, 2019 3 commits
-
-
Brendan Gregg authored
Re-enable subset of build warnings and fix some related warnings #316
-
Augusto Caringi authored
-
Brendan Gregg authored
Cleanup enforce_infinite_rlimits
-
- 05 Feb, 2019 3 commits
-
-
Brendan Gregg authored
Add support for arm64 (aarch64)
-
T K Sourab authored
: removed getrlimit() : Added error description using strerror() Signed-off-by: T K Sourab <sourabhtk37@gmail.com>
-
Ali Saidi authored
Fixes issue #338
-
- 04 Feb, 2019 2 commits
-
-
Brendan Gregg authored
probe type aliases don't work with -l
-
-
- 29 Jan, 2019 1 commit
-
-
Brendan Gregg authored
follow the new libbcc interface: bcc_{create_map, prog_load}
-
- 25 Jan, 2019 3 commits
-
-
Brendan Gregg authored
all abort()s should print an error message
-
-
Xiaozhou Liu authored
libbcc has renamed the following API recently (see bcc pr#2149): bpf_create_map => bcc_create_map bpf_prog_load => bcc_prog_load Let's use the new API whenever possible and fall back to the old otherwise.
-
- 23 Jan, 2019 1 commit
-
-
Dan Xu authored
This patch fixes the docker builds (`./build.sh` and `./build-debug.sh`). Two main things were broken: * Alpine was missing a bcc-devel package. The temporary fix is to clone bcc, build, and install into the container * Static linking against bcc was broken. I've made some cmake config changes to support this.
-
- 22 Jan, 2019 2 commits
-
-
Brendan Gregg authored
Add support to list tracepoint arguments (#323)
-
Augusto Caringi authored
-
- 21 Jan, 2019 1 commit
-
-
Brendan Gregg authored
ksym() alias/replacement to sym()
-
- 18 Jan, 2019 3 commits
-
-
-
Brendan Gregg authored
Lesson 9: Replace "stack" to "kstack".
-
CavemanWork authored
Fix warning issue for Lesson 9: the stack is deprecated and will be removed in the future. Use kstack instead
-
- 17 Jan, 2019 11 commits
-
-
Brendan Gregg authored
kstack alias/replacement to stack
-
williangaspar authored
-
Brendan Gregg authored
fix tracepoint wildcards
-
Brendan Gregg authored
cmake: add BUILD_TESTING support
-
Brendan Gregg authored
Probe list optimizations and improvements
-
Brendan Gregg authored
-
Brendan Gregg authored
use structs with semicolons
-
williangaspar authored
-
Augusto Caringi authored
- Moved regex init code outside search_probe function (avoiding to be called again at every invocation) - inlined search_probe function - Added std::regex::optimize flag to regex - Fixed search of "software*" and "hardware*" Before: time ./bpftrace -l '*xfs*'|wc -l 2363 real 0m1.841s user 0m1.576s sys 0m0.261s After: time ./bpftrace -l '*xfs*'|wc -l 2363 real 0m1.179s user 0m0.904s sys 0m0.271s
-
williangaspar authored
-
-
- 16 Jan, 2019 3 commits
-
-
Brendan Gregg authored
-
Brendan Gregg authored
struct definitions that end with semicolons
-
Matheus Marchini authored
If we use clang to build bpftrace instead of GCC, it will complain about trying to use the `-std-c++14` flag to comile headers.c. If we force cmake to skip this flag on `.c` files, clang is not able to link libresources.a correctly. This patch changes the resources workflow to generate a .cpp file instead, and to have a `src/headers.h` with all headers we currently use. With this approach we get a safer linkage because the same definition for the header strings is being used in clang_parser.cpp and in headers.cpp. Fixes: https://github.com/iovisor/bpftrace/issues/350
-