github.com/cnboonhan/delve@v0.0.0-20230908061759-363f2388c2fb/pkg/proc/internal/ebpf/bpf/include/trace.bpf.h (about)

     1  #include "vmlinux.h"
     2  #include "function_vals.bpf.h"
     3  #include <bpf/bpf_core_read.h>
     4  #include <bpf/bpf_helpers.h>
     5  #include <bpf/bpf_tracing.h>
     6  
     7  #define BPF_MAX_VAR_SIZ	(1 << 29)
     8  
     9  // Ring buffer to handle communication of variable values back to userspace.
    10  struct {
    11      __uint(type, BPF_MAP_TYPE_RINGBUF);
    12      __uint(max_entries, BPF_MAX_VAR_SIZ);
    13  } events SEC(".maps");
    14  
    15  // Map which uses instruction address as key and function parameter info as the value.
    16  struct {
    17      __uint(max_entries, 42);
    18      __uint(type, BPF_MAP_TYPE_HASH);
    19      __type(key, u64);
    20      __type(value, function_parameter_list_t);
    21  } arg_map SEC(".maps");