Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shark takes forever the first time after launching it



Remember that Shark profiles all running executables when in Everything mode. That means it will try to process symbols for all binaries that it saw executing.

Now, STABS and DWARF both use the same code path and could be suffering a performance problem. I haven't heard of it taking this long, but a 54MB binary is no small application and plowing through 735MB of binary can take a while. You can also run command-line Shark or sample while GUI shark is processing samples to get an idea of where it is spending its time. I have a good idea of where already, but a session would help.
--
Rick Altherr
Architecture and Performance Group
email@hidden



On Jul 25, 2006, at 2:45 AM, Stefan Haller wrote:

My application is not excessively large; when compiled with dwarf
symbols, the unstripped binary is 54 MB.  (With Stabs, it is 735 MB.
Doesn't seem to make a difference for Shark's performance.)

On the quad G5, I'm sharking the same application, but built with
CodeWarrior; the executable is 28 MB, and the xSYM file is 34 MB.  In
this case, it takes only some seconds for Shark to display the results
window, even the first time after launching.

I can't believe I'm the only one having this problem; other developers
must have applications of similar size.


Rick Altherr <email@hidden> wrote:

I would guess that you have symbols for some of the applications that
are running and that they have _lots_ of symbols.  When Shark is
processing samples, it is spending most of its time trying to find
symbols and source information for program addresses that it saw
executing during sampling.  Internally, Shark caches these entries so
that it only needs to be looked up once per launch unless the program
changes.  So, the first time you sample, the processing will need to
collect the symbols for all of the programs that Shark saw executing
during the sample, but subsequent sessions will frequently hit in the
cache.
--
Rick Altherr
Architecture and Performance Group
email@hidden


On Jul 24, 2006, at 10:03 AM, Stefan Haller wrote:

When I launch Shark and try to sample my application (no matter for
how
long), it takes like 10 minutes until Shark opens the results window.
It displays the spinning progress bar, saying "Processing Samples" all
the time.


After that, I can sample like I'm used to while Shark is running (it
takes a couple of seconds, at most); if I quit Shark and launch it
again, it takes 10 minutes again.

I'm on a MacBook Pro, but a collegue also has this behaviour on a
G4; on
a quad G5 it works fine though.

System version is 10.4.7, Xcode 2.3, Chud 4.3.3 (4).

Any ideas?


-- Stefan Haller Ableton http://www.ableton.com/ _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/raltherr% 40apple.com

This email sent to email@hidden


--
Stefan Haller
Ableton
http://www.ableton.com/

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Re: Shark takes forever the first time after launching it (From: email@hidden (Stefan Haller))



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.