systemtap显示调用树
来源:互联网 发布:snapseed软件下载 编辑:程序博客网 时间:2024/06/06 12:39
脚本:function trace(entry_p) { if(tid() in trace) printf("%s%s%s\n",thread_indent(entry_p), (entry_p>0?"->":"<-"), probefunc())}global traceprobe kernel.function(@1).call { if (execname() == "stapio") next # skip our own helper process trace[tid()] = 1 trace(1)}probe kernel.function(@1).return { trace(-1) delete trace[tid()]}probe kernel.function(@2).call { trace(1) }probe kernel.function(@2).return { trace(-1) }
结果:
# stap para-callgraph.stp sys_read '*@fs/*.c'[...] 0 klogd(1391):->sys_read 14 klogd(1391): ->fget_light 22 klogd(1391): <-fget_light 27 klogd(1391): ->vfs_read 35 klogd(1391): ->rw_verify_area 43 klogd(1391): <-rw_verify_area 49 klogd(1391): ->kmsg_read 0 sendmail(1696):->sys_read 17 sendmail(1696): ->fget_light 26 sendmail(1696): <-fget_light 34 sendmail(1696): ->vfs_read 44 sendmail(1696): ->rw_verify_area 52 sendmail(1696): <-rw_verify_area 58 sendmail(1696): ->proc_file_read 70 sendmail(1696): ->loadavg_read_proc 84 sendmail(1696): ->proc_calc_metrics 92 sendmail(1696): <-proc_calc_metrics 95 sendmail(1696): <-loadavg_read_proc 101 sendmail(1696): <-proc_file_read 106 sendmail(1696): ->dnotify_parent 115 sendmail(1696): <-dnotify_parent 119 sendmail(1696): ->inotify_dentry_parent_queue_event 127 sendmail(1696): <-inotify_dentry_parent_queue_event 133 sendmail(1696): ->inotify_inode_queue_event 141 sendmail(1696): <-inotify_inode_queue_event 146 sendmail(1696): <-vfs_read 151 sendmail(1696):<-sys_read[...]^C
引用地址:http://sourceware.org/systemtap/wiki/WSCallGraph?highlight=
- systemtap显示调用树
- systemtap
- SystemTap
- SystemTap
- systemtap
- 【SystemTap】SystemTap的疑问
- SystemTap Beginner
- SystemTap Beginner
- systemtap安装
- SystemTap Beginner
- SYSTEMTAP安装
- SystemTap介绍
- Systemtap Install
- systemtap初探
- Systemtap简介
- systemtap安装
- 35. systemtap
- systemtap函数调用栈信息不齐的原因和解决方法 :print_backtrace
- Hibernate关联映射之多对一/一对多双向关联映射
- ipv4地址转换
- 关于android控件属性的一些使用小结
- 12 个有效的提高编程技能的方法
- ipv6地址转换
- systemtap显示调用树
- 设计模式之13适配器模式(笔记)
- Android_UI_点击按钮切换背景效果实现
- 递归应用解析
- 第十三周实验报告4
- Tomcat 抛出 Cannot serialize session attribute 异常
- 程序实现删除带空格文件夹方法
- 黑马程序员-003ADO.NET五个主要对象
- vs2010 出现错误“AxImp.exe”已退出,代码为 -1163019603。