Commit 98e56f5
bpf: Support fentry/fexit for functions with union args
Currently, functions with 'union' arguments cannot be traced with
fentry/fexit:
bpftrace -e 'fentry:release_pages { exit(); }' -v
AST node count: 6
Attaching 1 probe...
ERROR: Error loading BPF program for fentry_vmlinux_release_pages_1.
Kernel error log:
The function release_pages arg0 type UNION is unsupported.
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
ERROR: Loading BPF object(s) failed.
The type of the 'release_pages' argument is defined as:
typedef union {
struct page **pages;
struct folio **folios;
struct encoded_page **encoded_pages;
} release_pages_arg __attribute__ ((__transparent_union__));
This patch relaxes the restriction by allowing function arguments of type
'union' to be traced.
Signed-off-by: Leon Hwang <[email protected]>1 parent 05282f4 commit 98e56f5
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6762 | 6762 | | |
6763 | 6763 | | |
6764 | 6764 | | |
6765 | | - | |
| 6765 | + | |
6766 | 6766 | | |
6767 | 6767 | | |
6768 | 6768 | | |
| |||
7334 | 7334 | | |
7335 | 7335 | | |
7336 | 7336 | | |
7337 | | - | |
| 7337 | + | |
7338 | 7338 | | |
7339 | 7339 | | |
7340 | 7340 | | |
| |||
0 commit comments