mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add sys_sync BCC example
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
from pythonbpf import bpf, section, bpfglobal, compile
|
from pythonbpf import bpf, section, bpfglobal, BPF, trace_pipe
|
||||||
from ctypes import c_void_p, c_int64
|
from ctypes import c_void_p, c_int64
|
||||||
|
|
||||||
|
|
||||||
@ -15,5 +15,6 @@ def LICENSE() -> str:
|
|||||||
return "GPL"
|
return "GPL"
|
||||||
|
|
||||||
|
|
||||||
compile()
|
BPF().load_and_attach()
|
||||||
print("Tracing sys_sync()... Ctrl-C to end.")
|
print("Tracing sys_sync()... Ctrl-C to end.")
|
||||||
|
trace_pipe()
|
||||||
|
|||||||
Reference in New Issue
Block a user