The Joel on Software Discussion Group (CLOSED)

A place to discuss Joel on Software. Now closed.

This community works best when people use their real names. Please register for a free account.

Other Groups:
Joel on Software
Business of Software
Design of Software (CLOSED)
.NET Questions (CLOSED)
TechInterview.org
CityDesk
FogBugz
Fog Creek Copilot


The Old Forum


Your hosts:
Albert D. Kallal
Li-Fan Chen
Stephen Jones

Functional gprof on Mac OS X - no programming tool left behind?

Help! the gprof on my Mac OS X (10.4.5 or later) produces only zeros '0.0' in the time estimation columns. So does a recompiled version downloaded from darwin source. I've searched far and wide. Does anyone have a fix for this?

I have used gprof in many other Unix/Linux environments, and I'm not interested - for the moment - in hearing about Apple's other profilers. Please try the solution yourself (using gcc -pg, etc.) using OS X 4.5.* before posting. Thanks!

Garry in Copenhagen
Garry Paul Gippert Send private email
Wednesday, January 24, 2007
 
 
"Please try the solution yourself (using gcc -pg, etc.) using OS X 4.5.* before posting."

Well THAT will encourage me to bother helping you...
Where's your manners?
Wednesday, January 24, 2007
 
 
I wonder how long it will take for someone to point to that article (was it by Eric Raymond?) on how to get help from people in forums...
Daren Thomas Send private email
Wednesday, January 24, 2007
 
 
Drew K
Wednesday, January 24, 2007
 
 
10.4.5 is outdated. Nobody who has a good internet connection and automatic updates turned on still runs it. If you really want to limit yourself to responses from people who have your exact version and are willing to test on it, update to 10.4.8 first.

Then read the ESR article.
clcr
Wednesday, January 24, 2007
 
 
Unfortunately, Garry is out of luck.

There are bug reports filed in Apple's database for gprof on 10.4.6, 10.4.1 and 10.3.9, not counting Garry's 10.4.5.

Reading between the lines, it appears that Apple wishes to promote Shark instead, and the mailing lists suggests that Shark will do everything gprof does except measure extremely small, fast, short-lived processes. In other words it's likely the kernel has support for Shark, and no longer provides an API for gprof, hence the 0.0 times.

The last gprof related note on Apple's perfoptimization-dev mailing list is dated April 2006 which also seems to indicate that most people have accepted Shark and its workarounds, although they do acknowledge Shark measures things a little differently and will produce different timing numbers than gprof.

If Garry absolutely needs gprof, well, it's from GNU so it should be open source and he can look into what would it take to use the Shark API.
TheDavid
Wednesday, January 24, 2007
 
 
As a follow up, the help-gplusplus mailing list also confirms that gprof is broken on OS X, and there's no apparent urgency to fix it there.
TheDavid
Wednesday, January 24, 2007
 
 
Thanks for all your replies - I'm still holding out for someone who has a functioning OS X gprof - and hats off to TheDavid for relating directly to my question. In the interest of brevity! I left out a lot of background work, but for those who've used gprof much I'm pretty sure there was sufficient information in my post to recognize the issues. clcr, the notation 10.4.* was meant to have included 10.4.8, which also shows the gprof '0.0' problem. thnks.
Garry Paul Gippert Send private email
Wednesday, January 24, 2007
 
 
Ah, I see. I misunderstood because you didn't actually type "10.4.*". You typed "OS X 4.5.*".
clcr
Wednesday, January 24, 2007
 
 
Consider shark.

http://developer.apple.com/tools/sharkoptimize.html

The future is now.
grpoff?
Thursday, January 25, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz