Commit bca047d2 authored by Matthew Ahrens's avatar Matthew Ahrens Committed by GitHub

document cflags argument to BPF()

parent bce2bee9
...@@ -758,7 +758,7 @@ Constructors. ...@@ -758,7 +758,7 @@ Constructors.
### 1. BPF ### 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. Creates a BPF object. This is the main object for defining a BPF program, and interacting with its output.
...@@ -784,6 +784,9 @@ b = BPF(src_file = "vfsreadlat.c") ...@@ -784,6 +784,9 @@ b = BPF(src_file = "vfsreadlat.c")
u = USDT(pid=int(pid)) u = USDT(pid=int(pid))
[...] [...]
b = BPF(text=bpf_text, usdt_contexts=[u]) b = BPF(text=bpf_text, usdt_contexts=[u])
# add include paths:
u = BPF(text=prog, cflags=["-I/path/to/include"])
``` ```
Examples in situ: Examples in situ:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment