| 1 |
|
| 2 |
|
| 3 |
#pragma once |
| 4 |
|
| 5 |
#include "common.h" |
| 6 |
|
| 7 |
struct bpf_map_def hash_map __section("maps") = { |
| 8 |
.type = BPF_MAP_TYPE_HASH, |
| 9 |
.key_size = sizeof(uint32_t), |
| 10 |
.value_size = sizeof(uint64_t), |
| 11 |
.max_entries = 1, |
| 12 |
.map_flags = BPF_F_NO_PREALLOC, |
| 13 |
}; |
| 14 |
|
| 15 |
struct bpf_map_def hash_map2 __section("maps") = { |
| 16 |
.type = BPF_MAP_TYPE_HASH, |
| 17 |
.key_size = sizeof(uint32_t), |
| 18 |
.value_size = sizeof(uint64_t), |
| 19 |
.max_entries = 2, |
| 20 |
}; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
struct bpf_map_def perf_event_array __section("maps") = { |
| 27 |
.type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, |
| 28 |
.max_entries = 4096, |
| 29 |
}; |