[comp.sys.amiga] Program profile

jack@cca.CCA.COM (Jack Orenstein) (05/18/88)

Has anyone had experience in profiling C programs on the Amiga? The
ideal tool would be something like the Sun C profiler which provides a
breakdown on each function, indicating who called what how often, how
much time per call, etc. Since this is not available, the only option
seems to be to insert calls to timers. The one function described in the
Intuition manual returns seconds and microseconds, but this function is
supposed to be inaccurate, (and it causes my system to guru).

Does anyone know of any other tools or timer functions that would be of
use?

A Sun-style profiling tool is my candidate for the Next Great Thing
after SDB (which I love).


Jack Orenstein

page@swan.ulowell.edu (Bob Page) (05/19/88)

Tom Rokicki wrote one for Manx C; it's on fish disk 48, and
comes with Manx C too.

It's available for FTP on swan.ulowell.edu - check out
/amiga/dos/profile.1of1 for the source code.

..Bob
-- 
Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page

rokicki@polya.STANFORD.EDU (Tomas G. Rokicki) (05/19/88)

> Has anyone had experience in profiling C programs on the Amiga? The
> ideal tool would be something like the Sun C profiler which provides a
> breakdown on each function, indicating who called what how often, how
> much time per call, etc. Since this is not available, the only option
> seems to be to insert calls to timers. The one function described in the
> Intuition manual returns seconds and microseconds, but this function is
> supposed to be inaccurate, (and it causes my system to guru).
> 
> Does anyone know of any other tools or timer functions that would be of
> use?

So you're already using Manx.  I released a profiler for Manx 3.4
(I believe) that should still work with 3.6, or can be easily modified
for 3.6.  If a few people ask, I may improve the way it works.  But
grab it and look at it, let me know what you need.

Oh, what fish disk is it on?  One second . . . disk 48.  And it is
for 3.30e, but like I said, the changes should be minimal.

Enjoy!

-tom
-- 
    /-- Tomas Rokicki         ///  Box 2081  Stanford, CA  94309
   / o  Radical Eye Software ///                  (415) 326-5312
\ /  |  . . . or I       \\\///   Gig 'em, Aggies! (TAMU EE '85)
 V   |  won't get dressed \XX/ Bay area Amiga Developer's GroupE

karl@sugar.UUCP (Karl Lehenbauer) (05/20/88)

> > Has anyone had experience in profiling C programs on the Amiga? ...

Tom Rokicki writes:
> So you're already using Manx.  I released a profiler for Manx 3.4
> (I believe) that should still work with 3.6, or can be easily modified
> for 3.6.  

It does work under 3.6.  It's great, everyone.  It's easy to use, gives
a report of time spent in each routine, percentage of time in that routine
and percentage of time in that routine and its children, along with some
other stuff...a *must* for speeding up those C programs.

> Oh, what fish disk is it on?  One second . . . disk 48.  And it is
> for 3.30e, but like I said, the changes should be minimal.

It is also distributed with Manx 3.6 (and was distributed with 3.4).
-- 
"Now here's something you're really going to like!" -- Rocket J. Squirrel
..!{bellcore!tness1,uunet!nuchat}!sugar!karl, Unix BBS (713) 438-5018

rmariani@watmum.waterloo.edu (Rico Mariani) (05/20/88)

In article <2846@polya.STANFORD.EDU> rokicki@polya.Stanford.EDU (Tomas G. Rokicki) writes:
>
>So you're already using Manx.  I released a profiler for Manx 3.4
>(I believe) that should still work with 3.6, or can be easily modified
>for 3.6.  If a few people ask, I may improve the way it works.  But
>grab it and look at it, let me know what you need.

It does in fact work with Aztec 3.6, I've been getting alot of mileage
out of it since I first installed it on my hard drive.  I have found
that sometimes it gets confused by the presence of machine language
routines, it uses the link instruction to hook in to a procedure it seems,
but I often have no need of this in an assembler routine so I leave it
out.  This confuses the heck out of it.  You can find p1 & p2 in one
of the example directories on your Manx originals just waiting to be compiled.
Well, it was on the 3.4 disks anyways, it might not be the 3.6 disks...

	-Rico

rokicki@polya.STANFORD.EDU (Tomas G. Rokicki) (05/21/88)

> Tom Rokicki writes:
> > So you're already using Manx.  I released a profiler for Manx 3.4
>
> It does work under 3.6.  It's great, everyone.  It's easy to use, gives

These are the comments that keep the code coming (from me, anyway.)
Folks, if you use someone's code, it's real nice to send them a
short note just saying `thanks', whether it's PD or Shareware.
It certainly helps me gauge which of my programs are in use and thus
deserve further development.

On Monday I plan to release V1.1 of the profiler; you want it.  It
now handles multiple hunks, recursion, and PAL systems (and gives
more accurate times to boot.)  I hope to have it both compiling under
and profiling Lattice by then as well . . .

-tom
-- 
    /-- Tomas Rokicki         ///  Box 2081  Stanford, CA  94309
   / o  Radical Eye Software ///                  (415) 326-5312
\ /  |  . . . or I       \\\///   Gig 'em, Aggies! (TAMU EE '85)
 V   |  won't get dressed \XX/ Bay area Amiga Developer's GroupE