osx - Profiling c++ on mac os x -


I'm trying to profile some C ++ code on my Mac (OS X Lion) and I do not know Have found something useful that I am looking for a profiler who will tell me how the function is picking up my CPU time (similar to a matlab profiler).

Whatever I have tried here

  • gprof it is on my linux machine, but it only gives me empty output on my mac (apparently a known problem )
  • Equipment I can not understand how to profile anything in my compiled binary for my life. And I can not find any useful tutorials.
  • (Shark detected by other searches, which is no longer available and Valgrind is for memory).

    Really appreciate the help!

    is the tool tool used. A complete description of the tool is outside the scope of this answer, but it is a quick introductory guide:

    1. Open Instruments. 1
    2. "Time Profiler" template.
    3. Choose your app in the "Target" dropdown menu 2
    4. Press the red circle ("Record")
    5. If applicable, do some things in your application that requires a profile.
    6. Hit the record button again to stop the recording.
    7. Use the tool in the tool to analyze your results.

      Of the available devices, these are often the most useful:

      • Expand the call tree
      • Focusing arrows Click on the Function Name to click on
      • Double-click on the function to view the related source
      • On the "Inward Call Tree" checkbox to the left

        1 To use an easy spot, use the device spotlight: just hit the upper right corner of the C taskbar Type lick and watch "tools" on the glass.

        2 Click "Select Target ..." and go on the path to your executable.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -