mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
format chore
This commit is contained in:
@ -160,13 +160,18 @@ def process_vmlinux_post_ast(
|
|||||||
new_dep_node.set_field_ready(elem_name, True)
|
new_dep_node.set_field_ready(elem_name, True)
|
||||||
elif handler.has_node(containing_type_name):
|
elif handler.has_node(containing_type_name):
|
||||||
# Already processed
|
# Already processed
|
||||||
logger.debug(f"Reusing already processed {containing_type_name}")
|
logger.debug(
|
||||||
|
f"Reusing already processed {containing_type_name}"
|
||||||
|
)
|
||||||
new_dep_node.set_field_ready(elem_name, True)
|
new_dep_node.set_field_ready(elem_name, True)
|
||||||
else:
|
else:
|
||||||
# Process recursively - THIS WAS MISSING
|
# Process recursively - THIS WAS MISSING
|
||||||
new_dep_node.add_dependent(containing_type_name)
|
new_dep_node.add_dependent(containing_type_name)
|
||||||
process_vmlinux_post_ast(
|
process_vmlinux_post_ast(
|
||||||
containing_type, llvm_handler, handler, processing_stack
|
containing_type,
|
||||||
|
llvm_handler,
|
||||||
|
handler,
|
||||||
|
processing_stack,
|
||||||
)
|
)
|
||||||
new_dep_node.set_field_ready(elem_name, True)
|
new_dep_node.set_field_ready(elem_name, True)
|
||||||
elif containing_type.__module__ == ctypes.__name__:
|
elif containing_type.__module__ == ctypes.__name__:
|
||||||
@ -185,9 +190,7 @@ def process_vmlinux_post_ast(
|
|||||||
process_vmlinux_post_ast(
|
process_vmlinux_post_ast(
|
||||||
elem_type, llvm_handler, handler, processing_stack
|
elem_type, llvm_handler, handler, processing_stack
|
||||||
)
|
)
|
||||||
new_dep_node.set_field_ready(
|
new_dep_node.set_field_ready(elem_name, True)
|
||||||
elem_name, True
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"{elem_name} with type {elem_type} from module {module_name} not supported in recursive resolver"
|
f"{elem_name} with type {elem_type} from module {module_name} not supported in recursive resolver"
|
||||||
|
|||||||
@ -2,13 +2,15 @@ from pythonbpf import bpf, map, section, bpfglobal, compile_to_ir
|
|||||||
from pythonbpf.maps import HashMap
|
from pythonbpf.maps import HashMap
|
||||||
from pythonbpf.helper import XDP_PASS
|
from pythonbpf.helper import XDP_PASS
|
||||||
from vmlinux import TASK_COMM_LEN # noqa: F401
|
from vmlinux import TASK_COMM_LEN # noqa: F401
|
||||||
# from vmlinux import struct_qspinlock_0_1
|
|
||||||
|
# from vmlinux import struct_qspinlock_0_1 # noqa: F401
|
||||||
# from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
|
# from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
|
||||||
# from vmlinux import struct_posix_cputimers # noqa: F401
|
# from vmlinux import struct_posix_cputimers # noqa: F401
|
||||||
from vmlinux import struct_xdp_md
|
from vmlinux import struct_xdp_md
|
||||||
|
|
||||||
# from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
|
# from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
|
||||||
# from vmlinux import struct_ring_buffer_per_cpu # noqa: F401
|
# from vmlinux import struct_ring_buffer_per_cpu # noqa: F401
|
||||||
from vmlinux import struct_request
|
from vmlinux import struct_request # noqa: F401
|
||||||
from ctypes import c_int64
|
from ctypes import c_int64
|
||||||
|
|
||||||
# Instructions to how to run this program
|
# Instructions to how to run this program
|
||||||
|
|||||||
Reference in New Issue
Block a user