Skip to content

bpftrace examples fixes#2565

Open
natoscott wants to merge 2 commits intoperformancecopilot:mainfrom
natoscott:bpftrace-examples-fixes
Open

bpftrace examples fixes#2565
natoscott wants to merge 2 commits intoperformancecopilot:mainfrom
natoscott:bpftrace-examples-fixes

Conversation

@natoscott
Copy link
Copy Markdown
Member

No description provided.

TASK_RUNNING is a C preprocessor #define macro (not a type or enum),
so it is not captured in BPF Type Format.  Modern bpftrace uses BTF/
vmlinux for kernel type resolution rather than actually preprocessing
header files — so #include <linux/sched.h> no longer expands macros
into the bpftrace script's symbol table.

Replaced the macro with its literal numeric value - TASK_RUNNING has
been 0 since the dawn of time in the Linux scheduler.
Kernel block IO function used (kprobe) has been removed and
stable tracepoints now exist with new functions - use those.
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.

1 participant