[comp.sys.mac.programmer] How does one get THINK C Profiler

gft_robert@gsbacd.uchicago.edu (12/19/90)

------
I've written a fairly substantial Macintosh app.  I'd like to get a performance
profile on it, and I was trying to use THINK C's optional Profiler() library.
When I use it a 'console' window pops up in the back of my program while it's
running and spits out the function calls (I set _trace to true), and when it's
done it spits out the stats to the 'console' window which then promptly
vanishes.  All in all fairly useless as it stands now: I don't know how to save
the stats so that I can read them.

Has anyone figured out a way to do this to a Mac (i.e. non-console-oriented)
app?  All I'd like it to do is print it to a file "Profile.out" or something.

Robert        

============================================================================
= gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "It's more fun to =
=            		         * all my opinions are *  compute"         =
=                                * mine                *  -Kraftwerk       =
============================================================================

gft_robert@gsbacd.uchicago.edu (12/19/90)

------ 

Well, with the help of a friend who's more used to std C code than I I figured
it out: just rebuild the profiler lib and replace all printf's with fprintf's
(after having opened the FILE of course).

Sorry to waste bandwidth!

Robert

============================================================================
= gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "It's more fun to =
=            		         * all my opinions are *  compute"         =
=                                * mine                *  -Kraftwerk       =
============================================================================

russell@uswest.com (01/05/91)

In article <1990Dec19.000535.20385@midway.uchicago.edu>
gft_robert@gsbacd.uchicago.edu asks about getting profiler output into a file:

I ran into the same problem just yesterday, but rather than munge around with
the profile library I just called cecho2file in the console library, like so:

     cecho2file ("profile.out", stdout);

before turning profiling on. Worked fine for me.

Russell Greenlee