Skip to content

Commit 37d1e1b

Browse files
committed
Add sys_sync BCC example
1 parent edc3373 commit 37d1e1b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

BCC-Examples/sys_sync.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pythonbpf import bpf, section, bpfglobal, compile
1+
from pythonbpf import bpf, section, bpfglobal, BPF, trace_pipe
22
from ctypes import c_void_p, c_int64
33

44

@@ -15,5 +15,6 @@ def LICENSE() -> str:
1515
return "GPL"
1616

1717

18-
compile()
18+
BPF().load_and_attach()
1919
print("Tracing sys_sync()... Ctrl-C to end.")
20+
trace_pipe()

0 commit comments

Comments
 (0)