开发者

Trace interruption on a linux system

开发者 https://www.devze.com 2023-01-01 07:01 出处:网络
The command strace is mainly for tracing system call. Does someone know the equivalent for tracing interruption like IRQ14...

The command strace is mainly for tracing system call. Does someone know the equivalent for tracing interruption like IRQ14...

开发者_开发百科

Thanks


strace is only useful for tracing userspace activity. In order to trace interrupts properly you need an in-kernel tracing solution. Check out the following. ftrace is probably your best bet. Note, however, that these have a fairly high learning curve, but that is expected.

  • http://lwn.net/Articles/370423/

  • http://www.mail-archive.com/linuxkernelnewbies@googlegroups.com/msg02422.html

  • http://lttng.org/

  • SystemTap is also a good choice.


I believe you are looking for SystemTap. You may need to patch your kernel to allow SystemTap to extract the information you want, though. It's kind of a mess.


Hardware interrupts may be counted with systemtap (or perf or ftrace):

# stap -e 'global irq; probe kernel.trace("irq_handler_entry") {irq[$irq]<<<1}' -c WORKLOAD-COMMAND


You can keep track of the number of interrupts through /proc/interrupts. Without specific kernel hacking that's probably the best you can get from userland. What more would you want to trace?


Take a look at oprofile.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号