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

btf: Do not use <linux/types.h> for resolving tracepoint defs #1318

Merged
merged 3 commits into from
May 11, 2020

Conversation

danobi
Copy link
Member

@danobi danobi commented May 6, 2020

Passing --btf should mean bpftrace does not use system headers at all.
The only exception should be if the user manually does an #include.

To that end, this patch has TracepointFormatParser use the existing
BTF infrastructure to resolve basic types we used to get from
<linux/types.h> instead of doing header inclusions.

This is particularly important in container environments where kernel
headers may not be installed.

Checklist
  • Language changes are updated in docs/reference_guide.md
  • User-visible and non-trivial changes updated in CHANGELOG.md

Passing --btf should mean bpftrace does not use system headers at all.
The only exception should be if the user manually does an `#include`.

To that end, this patch has TracepointFormatParser use the existing
BTF infrastructure to resolve basic types we used to get from
<linux/types.h> instead of doing header inclusions.

This is particularly important in container environments where kernel
headers may not be installed.
@danobi danobi requested a review from olsajiri May 6, 2020 19:49
@danobi danobi force-pushed the tp_btf_no_types_h branch from 1872289 to ce314f0 Compare May 6, 2020 20:20
@olsajiri
Copy link
Contributor

makes sense and looks good

@danobi danobi merged commit 0b0c31a into bpftrace:master May 11, 2020
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.

2 participants