Skip to content

Commit 29e9060

Browse files
committed
Init bpf_get_stack emitter
1 parent 56df05a commit 29e9060

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pythonbpf/helper/bpf_helper_handler.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class BPFHelperID(Enum):
3232
BPF_GET_CURRENT_UID_GID = 15
3333
BPF_GET_CURRENT_COMM = 16
3434
BPF_PERF_EVENT_OUTPUT = 25
35+
BPF_GET_STACK = 67
3536
BPF_PROBE_READ_KERNEL_STR = 115
3637
BPF_RINGBUF_OUTPUT = 130
3738
BPF_RINGBUF_RESERVE = 131
@@ -940,6 +941,25 @@ def bpf_ringbuf_submit_emitter(
940941
return result, None
941942

942943

944+
@HelperHandlerRegistry.register(
945+
"get_stack",
946+
param_types=[ir.PointerType(ir.IntType(8)), ir.IntType(64)],
947+
return_type=ir.IntType(64),
948+
)
949+
def bpf_get_stack_emitter(
950+
call,
951+
map_ptr,
952+
module,
953+
builder,
954+
func,
955+
local_sym_tab=None,
956+
struct_sym_tab=None,
957+
map_sym_tab=None,
958+
):
959+
# TODO: Implement bpf_get_stack emitter
960+
pass
961+
962+
943963
def handle_helper_call(
944964
call,
945965
module,

0 commit comments

Comments
 (0)