• 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: Cocoa application running very slow under 64 bit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa application running very slow under 64 bit


  • Subject: Re: Cocoa application running very slow under 64 bit
  • From: Frank Illenberger <email@hidden>
  • Date: Thu, 11 Sep 2008 13:01:05 +0200


Hi there,

I migrated an existing cocoa application to run under x86_64 with Xcode 3.1 / Mac OS 10.5.4. The app still runs fine under 32 bit but when started in x86_64 mode, it runs about 3-4 times slower.
A shark profile reveals the following hot traces:


8.9% libgcc_s.1.dylib _Unwind_GetIPInfo
7.6% libgcc_s.1.dylib _Unwind_GetIPInfo
7.6% libgcc_s.1.dylib _Unwind_Backtrace
7.6% libobjc.A.dylib objc_addExceptionHandler
7.5% Unknown Library _CFDoExceptionOperation
7.2% Unknown Library _NSAppKitLock
1.5% Unknown Library -[NSView nextKeyView]
1.2% Unknown Library -[NSView _primitiveSetNextKeyView:]
0.8% Unknown Library +[NSControl cellClass] [unknown]
0.7% Unknown Library -[NSCell setMnemonicLocation:]
0.6% Unknown Library SetPlaceholderString
0.5% Unknown Library -[NSView previousKeyView]
0.2% Unknown Library -[NSControl _setControlTextDelegateFromOld:toNew:]



These hot traces do not show up when I profile the app running under 32 bit.


Does anybody know why a 64 bit app could be spending so much time in these methods?


Is your program throwing a lots of exceptions ? The exception handling mechanism is not the same between 32 bits and 64 bits runtime. IIRC throwing an exception on the 64 bits runtime os a lot more than on the 32 bits one.
With the 64bits runtime, it will properly unwind the stack and call C ++ dtor when needed (even if a pure objc program does not require it), but with the 32bits runtime, it's just a longjmp call.

I am not throwing any exceptions in my code. If there are any, they must get thrown from within the Cocoa frameworks. Is there a way to track this? I added breakpoints at


objc_exception_throw

and

 -[NSException initWithName:reason:userInfo:]

but they were not hit.

Cheers

Frank

_______________________________________________

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: Cocoa application running very slow under 64 bit
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Cocoa application running very slow under 64 bit (From: Frank Illenberger <email@hidden>)
 >Re: Cocoa application running very slow under 64 bit (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: BOOL array
  • Next by Date: Preferencepane and user defaults
  • Previous by thread: Re: Cocoa application running very slow under 64 bit
  • Next by thread: Re: Cocoa application running very slow under 64 bit
  • Index(es):
    • Date
    • Thread