• 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: Shark and icpc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shark and icpc


  • Subject: Re: Shark and icpc
  • From: Wade Tregaskis <email@hidden>
  • Date: Thu, 21 Aug 2008 15:36:15 -0700

I'm trying to profile an executable compiled with icpc, not g++. The actual optimizations performed for each standard optimization level (1, 2, 3) seem to differ slightly between the two compilers, but I didn't except any really dramatic differences. However, Shark has a lot of trouble with icpc generated code. Shark handles g++ - O1 code pretty well, although things get harder past -O1. With icpc -O1 code, Shark produces very strange output. I am not only referring to the "source view". I understand that source code should be difficult to interpret with high levels of optimization. I am referring to the default tree view. With icpc -O1, the tree view is a complete mess. There is effectively no tree view at all. There is next to no hierarchical nesting of function calls for example. As a matter of fact, start() and main() aren't even shown! Notice that with icpc generated code with no optimizations at all, Shark works as usual, so it is at least basically compatible (which I would expect since the various debugging meta-info standards shouldn't differ between g++ and icpc), but with -O1 it just falls over.

Does anyone have any ideas about this: either what's going on, or what might be done about it?

ICC is much more aggressive with its optimisations than gcc. I'm not familiar enough with it to know what kinds of optimisations it does at the various levels, but I wouldn't be surprised - and indeed from your description it sounds like it - if it's omitting frame pointers. Doing so is a very annoying but classic i386 optimisation to get an extra precious register, but it completely ruins backtracing. From memory it's off with gcc even up to -O3, which is why you wouldn't see the issue there.


I'm afraid I don't know for sure what the flag to icpc is to enable or disable frame pointers; gcc's is -fomit-frame-pointer, which Google leads me to believe works with icpc as well, so, make sure you're not specifying that explicitly, and try passing -fno-omit-frame-pointer to be sure.

Otherwise, if that doesn't help, file a radar with as much relevant info as possible (ideally an example app, but if nothing else a Shark session showing the issue would be useful), and we'll take a look at it. Shark is tested against and known to work with icpc, but it's quite possible that in this case there's something unusual or peculiar about the binaries it's producing, which might be giving Shark pause.

Wade
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Shark and icpc
      • From: kwiley <email@hidden>
References: 
 >Shark and icpc (From: kwiley <email@hidden>)

  • Prev by Date: Re: XCode 3.1 frequently hangs [WORKAROUND]
  • Next by Date: Re: Shark and icpc
  • Previous by thread: Shark and icpc
  • Next by thread: Re: Shark and icpc
  • Index(es):
    • Date
    • Thread