2021-07-31 15:16:26 +00:00
|
|
|
#include "vmlinux.h"
|
|
|
|
#include "function_vals.bpf.h"
|
2023-04-24 20:37:58 +00:00
|
|
|
#include <bpf/bpf_core_read.h>
|
2021-07-31 15:16:26 +00:00
|
|
|
#include <bpf/bpf_helpers.h>
|
|
|
|
#include <bpf/bpf_tracing.h>
|
|
|
|
|
|
|
|
#define BPF_MAX_VAR_SIZ (1 << 29)
|
|
|
|
|
|
|
|
// Ring buffer to handle communication of variable values back to userspace.
|
|
|
|
struct {
|
2023-04-24 20:37:58 +00:00
|
|
|
__uint(type, BPF_MAP_TYPE_RINGBUF);
|
|
|
|
__uint(max_entries, BPF_MAX_VAR_SIZ);
|
2021-07-31 15:16:26 +00:00
|
|
|
} events SEC(".maps");
|
|
|
|
|
2021-10-25 19:37:36 +00:00
|
|
|
// Map which uses instruction address as key and function parameter info as the value.
|
2021-07-31 15:16:26 +00:00
|
|
|
struct {
|
|
|
|
__uint(max_entries, 42);
|
|
|
|
__uint(type, BPF_MAP_TYPE_HASH);
|
|
|
|
__type(key, u64);
|
|
|
|
__type(value, function_parameter_list_t);
|
|
|
|
} arg_map SEC(".maps");
|