ebpf_softirq.h 1.1 KB

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