ebpf_softirq.h 949 B

123456789101112131415161718192021222324252627282930313233
  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_CONFIG_FILE "softirq.conf"
  18. typedef struct sofirq_val {
  19. uint64_t latency;
  20. char *name;
  21. } softirq_val_t;
  22. extern struct config softirq_config;
  23. void *ebpf_softirq_thread(void *ptr);
  24. #endif /* NETDATA_EBPF_SOFTIRQ_H */