TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Fitzsimmons
from: Paul Edwards
date: 1995-11-10 15:05:32
subject: dossubset

PF> Watcom's profiler works by interrupting the program very rapidly,  and 
PF> seeing where cs:ip is.  This is a popular profiling method,  not not very 
PF> accurate unless the interrupt period is _very_ small -- such a small period 
PF> is not realistic with OS/2's DosDebug() api.

PF> I complained about this to Watcom a long time ago,  and they said they were 
PF> working on a solution more like IBM's.  I do not know if this made it into 
PF> 10.5 (I won't upgrade).

I wouldn't have minded very much if it had said "70% unknown"
(or similar), as I can take a guess at what the 70% is myself.
Telling me wildly inaccurate figures, and putting them all on
DosSubset, is madness.  Your explanation does not explain why
I should get such silly results from Watcom.  Is there something
I am doing wrong?  Do YOU see all your IO come up in DosSubSet?

PF> IBM's profiler works with the compiler -- the compiler inserts special 
PF> calls to the profiler library;  the library is able to keep accurate counts 

PF> Disadvantages:
PF>   - Can't break it down past the function level (unless a way is provided
PF>     to cause profile events inside a function -- Cset provides some sort

Sounds like a hook could be generated after every line of code?

PF>   - The program must be compiled in a special way.

I don't mind putting the "-Gh" on Cset any more than I mind putting
"-d2" on Watcom.  I do mind having to link with dd4extra.obj though.
Why can't "-Gh" do that for me?

PF> Someday (hopefully) IBM or Watcom will combine the two techniques to create 
PF> a truly useful profiler.

That sounds like a good idea.

PF> ps: VA C++ 3.0 will allow you to see the function (by loading the 
PF> editor),but does not break the profile down any further.

Is it the same as Cset then?  It did give a time for the function
DosWrite used by my program, despite the fact that it wasn't my
function.  That's more than Cset gives me by default, but with
options I can get 4 Dos functions profiled.  It seems to me that
it should generate hooks automatically on all the external calls
rather than make me have to jump through hoops.  Crikey, with all
the emphasis on user-friendliness!  BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.