mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-02-11 07:30:57 +00:00
Fix exapmles/kprobes to use latest pylibbpf
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
from pythonbpf import bpf, section, bpfglobal, BPF
|
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
|
||||||
|
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ def LICENSE() -> str:
|
|||||||
|
|
||||||
|
|
||||||
b = BPF()
|
b = BPF()
|
||||||
b.load_and_attach()
|
b.load()
|
||||||
while True:
|
b.attach_all()
|
||||||
print("running")
|
print("running")
|
||||||
# Now cat /sys/kernel/debug/tracing/trace_pipe to see results of unlink kprobe.
|
trace_pipe()
|
||||||
|
|||||||
Reference in New Issue
Block a user