master
h 36 lines 1.07 KB
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_EBPF_SOFTIRQ_H
4 #define NETDATA_EBPF_SOFTIRQ_H 1
5
6 // Module observation
7 #define NETDATA_EBPF_SOFTIRQ_MODULE_DESC "Show time spent servicing individual software interrupt requests (soft IRQs)."
8
9 /*****************************************************************
10 * copied from kernel-collectors repo, with modifications needed
11 * for inclusion here.
12 *****************************************************************/
13
14 #define NETDATA_SOFTIRQ_MAX_IRQS 10
15
16 typedef struct softirq_ebpf_val {
17 uint64_t latency;
18 uint64_t ts;
19 } softirq_ebpf_val_t;
20
21 /*****************************************************************
22 * below this is eBPF plugin-specific code.
23 *****************************************************************/
24
25 #define NETDATA_EBPF_MODULE_NAME_SOFTIRQ "softirq"
26 #define NETDATA_SOFTIRQ_CONFIG_FILE "softirq.conf"
27
28 typedef struct softirq_val {
29 uint64_t latency;
30 char *name;
31 } softirq_val_t;
32
33 extern struct config softirq_config;
34 void ebpf_softirq_thread(void *ptr);
35
36 #endif /* NETDATA_EBPF_SOFTIRQ_H */