Still can't understand -profile numbers

Ary Manzana ary at esperanto.org.ar
Sat Aug 11 08:22:09 PDT 2007


Take a look at this trace.log file:

------------------
	    1	foo
	    6	foo2
bar	7	199	49
	    4	someMethod
------------------
	    1	main
foo	1	50	9
	    1	bar
------------------
	    5	foo3
	    1	main
foo2	6	212	54
	    6	bar
------------------
	    5	someMethod
foo3	5	209	45
	    5	foo2
------------------
	    4	bar
	    1	main
someMethod	5	254	45
	    5	foo3
------------------
main	0	230	28
	    1	foo
	    1	foo2
	    1	someMethod

======== Timer Is 3579545 Ticks/Sec, Times are in Microsecs ========

   Num          Tree        Func        Per
   Calls        Time        Time        Call

       6          59          15           2     foo2
       7          55          13           1     bar
       5          70          12           2     someMethod
       5          58          12           2     foo3
       1          64           7           7     main
       1          13           2           2     foo
---

I can't understand why main has a tree time of 64 and someMethod, which 
is invoked by main, has 70. An invoked method can't spend more time in 
total than the function that invoked it. Or yes?

Well, maybe looking at the tree ticks... main has 230, but then again, 
someMethod has 254.


More information about the Digitalmars-d-learn mailing list