-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/16/11 3:18 PM, Sandeep wrote:
> Hi All,
> 
> This might be a weird query. but is it possible some how to get the
> exact line of code causing high cpu utilization. Like in case of the
> Instrument Leaks we are able to make out the lines of code in our
> application that is causing the memory leaks. In similar way is there
> any instrument using which we are able to get the exact method or
> lines of code where the CPU utilization goes high.

This is probably more of a dev tools question, but the first thing that
comes to my head is to use the Time Profiler instrument... it will
sample your application periodically and basically build a histogram of
CPU usage by method, letting you see which method(s) are consuming the
most CPU time.

There is also a CPU Sampler instrument, but I am less familiar with it.

Finally, I think you can do this with DTrace, but for most purposes
using the higher level Instruments will give satisfactory results with
less of a learning curve.

- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFN+oOaaOlrz5+0JdURAgNLAJ96hOczYR0/66nIhlgeZWuNMr7AkwCfTsfL
9kNEct4hygQHM9vmUVHCFx4=
=9gBf
-----END PGP SIGNATURE-----
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to