Skip to content

Commit

Permalink
document cflags argument to BPF()
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrens authored Apr 25, 2018
1 parent bce2bee commit bca047d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/reference_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ Constructors.

### 1. BPF

Syntax: ```BPF({text=BPF_program | src_file=filename} [, usdt_contexts=[USDT_object, ...]])```
Syntax: ```BPF({text=BPF_program | src_file=filename} [, usdt_contexts=[USDT_object, ...]] [, cflags=[arg1, ...]])```

Creates a BPF object. This is the main object for defining a BPF program, and interacting with its output.

Expand All @@ -784,6 +784,9 @@ b = BPF(src_file = "vfsreadlat.c")
u = USDT(pid=int(pid))
[...]
b = BPF(text=bpf_text, usdt_contexts=[u])

# add include paths:
u = BPF(text=prog, cflags=["-I/path/to/include"])
```

Examples in situ:
Expand Down

0 comments on commit bca047d

Please sign in to comment.