Date: Tue, 22 Jan 2013 11:41:32 -0800 From: Yuri <yuri@rawbw.com> To: hackers@freebsd.org Subject: Why DTrace sensor is listed but not called? Message-ID: <50FEEB6C.7090303@rawbw.com>
next in thread | raw e-mail | index | archive | help
I tried to create my own DTrace sensors (for debugging purposes) through
adding of the simple function like this:
static u_int
xxx_my_trace(int arg) {
return 1;
}
It is listed in dtrace -l with its entry and return sensors.
8143 fbt kernel xxx_my_trace entry
8144 fbt kernel xxx_my_trace return
This function is called, I know for sure because it is called from
another procedure which does get traced by DTrace.
However, these sensors are never triggered when run through dtrace(1M)
#!/usr/sbin/dtrace -s
::xxx_my_trace:entry
{
printf("xxx_my_trace");
}
It does print the following, but nothing else:
dtrace: script './dt.d' matched 1 probe
Adding __attribute__((noinline)) doesn't help.
What is the problem? Why dtrace sensors aren't invoked?
Yuri
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50FEEB6C.7090303>
