Re: dtrace: failed to compile script trace.d: line 22: probe description pid14677::objc_msgSend:return does not match any probes
Re: dtrace: failed to compile script trace.d: line 22: probe description pid14677::objc_msgSend:return does not match any probes
- Subject: Re: dtrace: failed to compile script trace.d: line 22: probe description pid14677::objc_msgSend:return does not match any probes
- From: Hamish Allan <email@hidden>
- Date: Tue, 28 Jul 2009 22:28:20 +0100
On Tue, Jul 28, 2009 at 9:01 PM, Hamish Allan<email@hidden> wrote:
> However, I get the following error:
>
> kai:~ hamish$ sudo dtrace -F -s trace.d -p 14677 > trace.txt
> dtrace: failed to compile script trace.d: line 22: probe description
> pid14677::objc_msgSend:return does not match any probes
>
> I'm a DTrace newbie, so I'm probably missing something basic, but does
> the pid provider not publish a probe called "return" for every "entry"
> it publishes?
Sorry to reply to myself, but another of bbum's articles
(http://www.friday.com/bbum/2008/01/03/objective-c-using-dtrace-to-trace-messages-to-nil/)
contains the answer:
"Aside: objc_msgSend()’s return cannot be traced via dtrace at this
time. Not surprising given that the function doesn’t actually return —
as far as dtrace is concerned, it is nothing but preamble."
The following is my workaround. Improvements welcome!
objc$target:UIWindow:-sendEvent?:entry { self->collect = 1; }
objc$target:UIWindow:-sendEvent?:return { self->collect = 0; }
objc$target:::entry / self->collect > 0 / { ustack(1); }
objc$target:::return / self->collect > 0 / { ustack(1); }
I'll probably write a script to parse the output of this into
something more readable, if anyone's interested.
Best wishes,
Hamish
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden