• Kirill Smelkov's avatar
    X pinglat: Fix for recent kernels · 9fd77679
    Kirill Smelkov authored
    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
    9fd77679
pinglat.py 4.33 KB