Debugging Linux Kernel Using SystemTap Part-9 - Probing interrupts
In Linux, do_IRQ() function is called on each interrupt, which calls handle_IRQ_event(), which finally calls the handlers registered with request_irq() call.
Systemtap already provides scripts/tapset for irq (/usr/local/share/systemtap/tapset/linux/irq.stp)
Script:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
probe irq_handler.entry, irq_handler.exit { | |
printf("%s:%-16s %s irq %d dev %s\n",ctime(gettimeofday_s()), pn(), symname(handler), | |
irq, kernel_string(dev_name)) | |
} |
Output:
Notes:
1. symname function will print out the raw address
2. kernel_string will get the string at the address passed as argument
3. pn() returns the active probe name
1. symname function will print out the raw address
2. kernel_string will get the string at the address passed as argument
3. pn() returns the active probe name
Comments
Post a Comment