Commit 9fd77679 authored by Kirill Smelkov's avatar Kirill Smelkov

X pinglat: Fix for recent kernels

Need to include headers for `struct irq_desc` and `struct irq_common_data` that
irq_desc uses without appropriate include.

kirr@deco:~/src/tools/bpf/bcc/tools$ ./pinglat.py
/virtual/main.c:33:31: error: incomplete definition of type 'struct irq_desc'
    const char *irqname = desc->action->name;
                          ~~~~^
include/linux/irqnr.h:9:15: note: forward declaration of 'struct irq_desc'
extern struct irq_desc *irq_to_desc(unsigned int irq);
              ^
1 error generated.
Traceback (most recent call last):
  File "./pinglat.py", line 129, in <module>
    b = BPF(text=prog)
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 320, in __init__
    raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
parent 43cfc13b
......@@ -9,6 +9,8 @@ ifname="eth0"
prog = r"""
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdesc.h>
#include <linux/icmp.h>
// event represents 1 INTR->icmp_echo->icmp_reply event
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment