ebpf_softirq.h 999 B

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