• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Performance issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance issue


  • Subject: Re: Performance issue
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 26 Aug 2010 13:37:36 -0500

On Aug 26, 2010, at 8:39 AM, Uli Kusterer wrote:

> On Aug 26, 2010, at 12:48 PM, Vijayakumar_Thota wrote:
>> I am working on the performance issues of an application. I am facing a difficulty in finding out how many times a method is called in different contexts.
>>
>> Suppose there is a method called 'setItem'. I need the report which tells something like the method 'setItem' is called 12 times at runtime in specific event action.
>>
>> Is there any tool in MAC which gives the report on how many times a method is called. I have seen the different templates in instruments tool, but I am not getting, which will give the right solution.
>>
>> Please share any information if you have something or correct me if anything I am doing wrong.
>
>
> Have a look at Instruments, and Shark. they came with Xcode in your Dev Tools installation.

Shark and most of the instruments in Instruments are statistical samplers, not exact function-call measurement.  Also, Vijay already mentioned familiarity with Instruments.

Vijay, you might want to look into Saturn and the function instrumentation features of gcc.  They are documented here: <http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/SaturnUserGuide/>.

Another tool is DTrace.  You can use it manually or build a custom instrument in Instruments using DTrace as the underlying engine.  A quick one-liner example:

sudo dtrace -n 'objc$target:MyClass:-setItem?:entry { ustack(); }' -p <pid of my process>


However, it is pretty rare that the statistical tools are not sufficient for performance analysis, so you might want to reconsider whether you really need an exact function-call measurement.

Regards,
Ken

_______________________________________________

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

  • Follow-Ups:
    • Re: Performance issue
      • From: Uli Kusterer <email@hidden>
References: 
 >Performance issue (From: Vijayakumar_Thota <email@hidden>)
 >Re: Performance issue (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: invoke menu tracking programmatically
  • Next by Date: Re: NSOpenPanel -setAllowedFileTypes
  • Previous by thread: Re: Performance issue
  • Next by thread: Re: Performance issue
  • Index(es):
    • Date
    • Thread