Profiler, profiling DLLs, trace.log

Bjoern nanali at nospam-wanadoo.fr
Fri Jan 25 11:40:02 PST 2008


Hi,
First of all you'll have a lot of fun when you profile a DLL which is 
used to call /dmd -profile /  via process like :

export extern(Windows)
void ExecuteProcess(DisplayCallBack cb, char* _dir, char* _command, 
char* _args)
{
/// bla, bla
Process p = new Process(command, null);
p.workDir = dir;		
msg = Text.layout(buffer, "Executing %0 ", p.toString);

p.execute(); // call dmd -profile etc...
----------------------------------------

But that's another story ;)

I wonder where are the relevant information within trace.log.

PART I

I have modified the contents a bit but it starts f.i.

<TAB>    2<TAB>_ExecuteProcess at 16
_D5tango4text4Util13__T6layoutTaZ6layoutFAaAAaXAa<TAB>2<TAB>25<TAB>25

<TAB>   84<TAB>_ExecuteProcess at 16
_D5tango4text4Util14__T7indexOfTaZ7indexOfFPaakZk<TAB>84<TAB>140<TAB>140

etc.

PART II

At the bottom of the log file you'll find something like this :

   Num          Tree        Func        Per
   Calls        Time        Time        Call

       2      278961      278952      139476 
_D5tango4text6stream14StreamIterator22__T14StreamIteratorTaZ14StreamIterator7consumeMFZb
       1      288585        9347        9347     _ExecuteProcess at 16
       1        1570        1570        1570     _DllMain at 12
       2         112         112          56 
_D5tango4text6stream14StreamIterator22__T14StreamIteratorTaZ14StreamIterator3setMFC5tango2io5model8IConduit11InputStreamZC5tango4text6stream14StreamIterator22__T14StreamIteratorTaZ14StreamIterator

I guess the numeric data at the bottom part are relevant. And each of 
them is calulated based on PART I.

How ? NONSENSE ?

Last Q for the moment. What is PART I good for ? Or in other words, Can 
I use this information somehow ?

And yes I know about pTrace from Lutger, but I prefer to understand the 
log file contents instead of simply to pluggin a piece of software :)
Many thanks in advance Bjoern




More information about the Digitalmars-d mailing list