Skip to content

Commit 5087bb0

Browse files
authored
docs: Update bpftrace-tutorial README.md (#166)
In Lesson 12, point number 4, guard `#include` with backticks so that it is not interpreted as a heading and keeps text formatting consistent.
1 parent f2c6458 commit 5087bb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bpftrace-tutorial/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ This uses kernel dynamic tracing of the vfs_open() function, which has a (struct
319319
- kprobe: As mentioned earlier, this is the kernel dynamic tracing probe type, which traces the entry of kernel functions (use kretprobe to trace their returns).
320320
- `arg0` is a builtin variable containing the first probe argument, the meaning of which is defined by the probe type. For `kprobe`, it is the first argument to the function. Other arguments can be accessed as arg1, ..., argN.
321321
- `((struct path *)arg0)->dentry->d_name.name`: this casts `arg0` as `struct path *`, then dereferences dentry, etc.
322-
- #include: these are necessary to include struct definitions for path and dentry on systems where the kernel was built without BTF (BPF Type Format) data.
322+
- `#include`: these are necessary to include struct definitions for path and dentry on systems where the kernel was built without BTF (BPF Type Format) data.
323323

324324
The kernel struct support is the same as bcc, making use of kernel headers. This means that many structs are available, but not everything, and sometimes it might be necessary to manually include a struct. For an example of this, see the [dcsnoop tool](https://github.com/iovisor/bpftrace/blob/master/docs/../tools/dcsnoop.bt), which includes a portion of struct nameidata manually as it wasn't in the available headers. If the kernel has BTF data, all kernel structs are always available.
325325

0 commit comments

Comments
 (0)