Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8156737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:03:11+00:00 2026-06-06T17:03:11+00:00

I’m doing some number crunching in C++, and I’m seeing a vast difference in

  • 0

I’m doing some number crunching in C++, and I’m seeing a vast difference in CPU % usage when using -Os optimization in my Debug build. I would therefore like to profile my code with optimizations enabled, so that I don’t waste time optimizing code that the compiler already optimizes well.

When I try to profile with -Os optimization, I can’t get Instruments to symbolicate my code (even when I manually specify the location of my .dSYM file). It won’t even show my top-level C++ member functions that are not templated or inlined.

I can get it to symbolicate fine when I specify the default -O0 optimization level.

So, is it even possible to profile with optimizations enabled? If so, then what’s the trick to make it work?

I’m using XCode 4.3.3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:03:13+00:00Added an answer on June 6, 2026 at 5:03 pm

    Time Profiler did indeed symbolicate when using -Os. The optimizer did it’s job so well, that my C++ DSP code got inlined and speeded up to the point where the profiler would not sample any of it in the short amount of time that I let it run. All I could see in the call tree were system calls.

    When I tried running the profiler for longer, the profiler caught a few blips of my DSP code. It only showed my top-level DSP function called by some NSOperationQueue handler. The rest underneath seemed to be all inlined.

    I got more useful results when I compiled with -O2. More of my DSP subroutines were left intact (instead of being inlined), so I was better able to gauge where my DSP algorithm was spending its time. But all that is moot, because now I can see that the app is spending vastly more time in housekeeping system calls than in my DSP code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am doing a simple coin flipping experiment for class that involves flipping a
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.