Linux系统上的跟踪中断
strace
命令主要用于跟踪系统调用。 有人知道 IRQ14 之类的跟踪中断的等效项吗?
谢谢
The command strace
is mainly for tracing system call.
Does someone know the equivalent for tracing interruption like IRQ14...
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
strace
仅用于跟踪用户空间活动。为了正确跟踪中断,您需要一个内核内跟踪解决方案。查看以下内容。 ftrace 可能是您最好的选择。但请注意,这些具有相当高的学习曲线,但这是预期的。http://lwn.net/Articles/370423/
http://www.mail-archive.com/[电子邮件受保护]/msg02422.html
http://lttng.org/
SystemTap 也是一个不错的选择。
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/[email protected]/msg02422.html
http://lttng.org/
SystemTap is also a good choice.
我相信您正在寻找 SystemTap。不过,您可能需要修补内核以允许 SystemTap 提取您想要的信息。有点乱。
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.
硬件中断可以使用 systemtap(或 perf 或 ftrace)进行计数:
# stap -e 'global irq;探测 kernel.trace("irq_handler_entry") {irq[$irq]<<<1}' -c WORKLOAD-COMMAND
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
您可以通过
/proc/interrupts
跟踪中断数量。如果没有特定的内核黑客攻击,这可能是您可以从用户空间获得的最好的结果。您还想追踪什么?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?查看oprofile。
Take a look at oprofile.