Re: [Q] gprof
Re: [Q] gprof
- Subject: Re: [Q] gprof
- From: Mark de Jong <email@hidden>
- Date: Thu, 19 Sep 2002 18:33:56 -0700
I got this going, thanks to Matt Majka.
Two things messed me up:
1. I needed to add "-pg" to the linker phase (you'd think selecting
"Generate profiling code" would ensure that gets handled)
2. I need to launch the program from Terminal using "open" and
opening the actual binary in ../Contents/MacOS/<binary>
Once I did this it all worked.
Thanks,
-- Mark
On Thursday, September 19, 2002, at 05:55 PM, Cameron Hayne wrote:
On Thursday, September 19, 2002, at 03:02 pm, Mark de Jong wrote:
I saw this question posed in the archives:
Could anyone point me to a description on how to use gprof with a
Cocoa progam?
I tried to set OTHER_CFLAGS to -pg in the Build Settings (Project
Builder) but I can nowhere find the gmon.out file.
but there weren't any responses (that I could find).
I tried the same thing as the previous person (above) did to no avail.
I've also tried setting the "Generate profiling code" checkbox.
("Generate debugging symbols" is checked.)
Unfortunately, still no "gmon.out"
First of all, you can read about gprof (and other performance analysis
tools) at:
file://localhost/Developer/Documentation/Essentials/Performance/
PerformanceTools/index.html
You should look at the detailed build log (in PB, open the split pane
that is just below the build summary) and check that -pg does appear
on each of the compile command lines. And then run your program,
taking it through a typical usage, and you should find the gmon.out
file in the build directory. (I'm guessing on which directory it will
appear in from experience on other UNIXen - I haven't tried it on OS
X.)
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.