Re: viewing method calls
Re: viewing method calls
- Subject: Re: viewing method calls
- From: "Owen Yamauchi" <email@hidden>
- Date: Mon, 30 Jun 2008 00:23:30 -0700
On Sun, Jun 29, 2008 at 10:18 PM, Nick Zitzmann <email@hidden> wrote:
>
> On Jun 29, 2008, at 3:25 PM, John Murphy wrote:
>
>> How do I view the messages (method calls) that are sent during the loading
>> of an application?
>
>
> You can do this using a profiler, such as Shark.
A DTrace script will serve you a lot better than Shark. Shark does
statistical profiling. If you take a time profile using Shark, all it
does is periodically (every millisecond, by default) interrupt your
application and check to see what it's doing. From this it assembles a
picture of where your app is spending its time. This is obviously not
guaranteed to see every message-send that happens: some very
short-running ones might just happen to occur between two Shark
interruptions, every time, and Shark will never see it.
With DTrace, you can automate collecting data *every* time
objc_msgSend is called, with perfect reliability. (Instruments is
backed by DTrace, for an idea of the scope of capabilities DTrace
has.)
Owen
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden