Jesús Cea Avión
(个人博客:https://blog.jcea.es/,为python
开发DTrace probe
的工程师)近日做了一个关于DTrace
和Python
的演讲,下载地址在这里:http://pan.baidu.com/s/1bo4IGYb,感兴趣的朋友可以看看。
Jesús Cea Avión
(个人博客:https://blog.jcea.es/,为python
开发DTrace probe
的工程师)近日做了一个关于DTrace
和Python
的演讲,下载地址在这里:http://pan.baidu.com/s/1bo4IGYb,感兴趣的朋友可以看看。
Pedro Giffuni
日前将FreeBSD
系统的libdtrace
模块中的分配内存代码做了修改(commit ID
:https://svnweb.freebsd.org/base?view=revision&revision=296816):以前是malloc
一块内存,然后用bzero
将这块内存清0
;现在统一用calloc
函数来完成上述操作。Pedro Giffuni
本人的说法是“calloc(3) is faster and occasionally safer than malloc(3) + bzero(3).
”。下面就看illumos
社区是否会做同样的改动了。[……]
Jim Mauro
写过一个度量系统调用执行时间的DTrace
脚本(参考这里:Measuring the execution of each system call):
#!/usr/sbin/dtrace -qs
syscall:::entry
/pid == $target/
{
@count[probefunc] = count();
self->st[probefunc] = timestamp;
}
syscall:::return
/self->st[probefunc]/
{
this-&[......]
以下面脚本(hello.d
)为例,讲述执行DTrace
脚本的方法:
BEGIN
{
/* This is a C-style comment */
trace("hello, world");
exit(0);
}
(1)在命令行运行dtrace -s hello.d
命令:
# dtrace -s hello.d
dtrace: script 'hello.d' matched 1 probe
CPU ID FUNCTION:NAME
0 1[......]
Dynamic Tracing with DTrace & SystemTap的作者Sergey Klyaus
又整理发布了DTrace & SystemTap cheatsheet,这份cheatsheet
不仅对比介绍了DTrace
和SystemTap
,而且还是图文并茂,是一本很实用的参考手册