mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Initialize PythonBPF project and toolchain
This commit is contained in:
15
pythonbpf/decorators.py
Normal file
15
pythonbpf/decorators.py
Normal file
@ -0,0 +1,15 @@
|
||||
def tracepoint(name: str):
|
||||
def wrapper(fn):
|
||||
fn._section = f"tracepoint/{name}"
|
||||
return fn
|
||||
return wrapper
|
||||
|
||||
def license(name: str):
|
||||
def wrapper(fn):
|
||||
fn._license = name
|
||||
return fn
|
||||
return wrapper
|
||||
|
||||
def trace_printk(msg: str):
|
||||
# placeholder — real version lowers to IR later
|
||||
print(f"[trace_printk] {msg}")
|
||||
Reference in New Issue
Block a user