> On Mar 17, 2015, at 1:52 PM, JongAm Park <jongamp...@sbcglobal.net> wrote:
> 
> Hello,
> 
> I know that questions on tools are not relevant for this cocoa-dev, but I 
> couldn’t find any relevant mailing list for tools like ‘sample’ or sampling 
> using Activity Monitor GUI tool.
> So, let me ask it here, because all Cocoa programmers use such tools whenever 
> needed.
> 
> I have a process sample like this.
> 
> Call graph:
>    1379 Thread_839846: Main Thread   DispatchQueue_<multiple>
>    + 1379 start  (in Wirecast) + 52  [0x100a31074]
>    +   1379 main  (in Wirecast) + 1070  [0x100b3e16a]
>    +     1379 eApp::Run(bool, zRecord*)  (in libeva.dylib) + 779  
> [0x101033225]
>    +       1379 eWindowManager_cocoa::MessageLoop()  (in libeva.dylib) + 70  
> [0x101037932]
>    +         1379 -[NSApplication run]  (in AppKit) + 594  [0x7fff88cd2593]
> 
> I can guess the number on the 1st (2nd?) on every row after + sign. It should 
> be number of samples or how long a method/function take.
> 
> According to MAN page for ‘sample’, it samples at every 1 msec.
> And 
> http://stackoverflow.com/questions/10709577/spindump-analysis-instructions 
> <http://stackoverflow.com/questions/10709577/spindump-analysis-instructions> 
> says, it’s the number of samples.
> 
> By looking at the numbers on children nodes, I guess so too.  But is it 
> really so?
> 
> If there is a better mailing list for this kind of inquiry, please let me 
> know.

In the trace above, "1379" is the number of samples at that location. The total 
number of samples and the sampling rate should be listed at the top of the 
report:
    Duration:        10.01s
    Steps:           1001 (10ms sampling interval)

Everything else is a description of the instruction's location. <Symbol name> 
(in <library name>) +  <byte offset> [<absolute address>]. A symbolicated trace 
may add source file and line numbers. If multiple samples hit the same symbol 
at different offsets (i.e. they were at different places in the same function) 
then they may be aggregated into a single line with multiple offsets listed.


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler



_______________________________________________

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

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

Reply via email to