Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support func builtin for k(ret)func probes #2692

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

viktormalik
Copy link
Contributor

@viktormalik viktormalik commented Jul 21, 2023

Since torvalds/linux@9b99edc, kernel has the bpf_get_func_ip helper to get the value of instruction pointer from BPF_PROG_TYPE_TRACING programs. This allows to enable the func builtin in k(ret)func probes.

Resolves #2000.

Checklist
  • Language changes are updated in man/adoc/bpftrace.adoc and if needed in docs/reference_guide.md
  • User-visible and non-trivial changes updated in CHANGELOG.md
  • The new behaviour is covered by tests

@viktormalik viktormalik requested review from ajor, danobi and fbs as code owners July 21, 2023 12:47
Since [1], kernel has the 'bpf_get_func_ip' helper to get the value of
instruction pointer from BPF_PROG_TYPE_TRACING programs. This allows to
enable the `func` builtin in k(ret)func probes.

Also adding feature detection for the helper into both `--info` and
runtime tests.

[1] torvalds/linux@9b99edc
@viktormalik viktormalik merged commit 0ceaef3 into bpftrace:master Aug 3, 2023
@viktormalik viktormalik deleted the kfunc-func branch August 3, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suppport func builtin for k(ret)func probes
2 participants