- Where Developers Learn, Share, & Build Careers
I'm trying to profile some C ++ code on my Mac (OS X Lion) and I do not know Have found something useful 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:
- Open Instruments. 1
- "Time Profiler" template.
- Choose your app in the "Target" dropdown menu 2
- Press the red circle ("Record")
- If applicable, do some things in your application that requires a profile.
- Hit the record button again to stop the recording.
- 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.
- Open Instruments. 1
Comments
Post a Comment