remove ruff errors. May contain breaking changes.

This commit is contained in:
2025-10-01 00:54:04 +05:30
parent b095828ae2
commit c27da22bcb
5 changed files with 21 additions and 7 deletions

View File

@ -3,7 +3,7 @@ import time
from pythonbpf import bpf, map, section, bpfglobal, BPF
from pythonbpf.helpers import pid
from pythonbpf.maps import HashMap
from pylibbpf import *
from pylibbpf import BpfMap
from ctypes import c_void_p, c_int64, c_uint64, c_int32
import matplotlib.pyplot as plt

View File

@ -24,12 +24,13 @@ def events() -> PerfEventArray:
def hello(ctx: c_void_p) -> c_int32:
dataobj = data_t()
ts = ktime()
process_id = pid()
strobj = "hellohellohello"
dataobj.pid = pid()
dataobj.ts = ktime()
# dataobj.comm = strobj
print(f"clone called at {dataobj.ts} by pid {dataobj.pid}, comm {strobj}")
print(
f"clone called at {dataobj.ts} by pid {dataobj.pid}, comm {strobj} at time {ts}"
)
events.output(dataobj)
return c_int32(0)