Overloading/Inheritance issue

Chris Nicholson-Sauls ibisbasenji at gmail.com
Tue Aug 7 20:52:54 PDT 2007


Walter Bright wrote:
> Jascha Wetzel wrote:
>> Walter Bright wrote:
>>> Post a snippet of the output and point out what is unclear, and I'll 
>>> try to help.
>>
>> the sections that come first, before the list of functions sorted by 
>> "func time":
>>
>> ------------------
>>     1    A
>>  1095    B
>>  1856    C
>> D      2952    122732995    3009972
>>
>> the sections appear to list the functions that are directly called by 
>> the top most in the section. but i can't figure out what the numbers 
>> mean and why there are some entries with a single one on the left and 
>> some with 3 numbers on the right of the function name.
> 
> I renamed the functions for simplicity.
> 
> D is called 2952 times. 1 of those calls comes from A. 1095 come from B. 
>  1856 come from C. Note that 1+1095+1856 = 2952. (The A, B, C counts are 
> called the "fan in".) The "fan out" is a list of counts of what D calls, 
> and follows the line for D.
> 
> The total number of timer ticks spent in D is 3009972, excluding 
> whatever D calls. The total number of timer ticks in D, including 
> whatever D calls, is 122732995.
> 
>  From this information you can not only determine where the time is 
> being consumed, but *why*, as you know where the calls are coming from. 
> You can do this to determine the runtime relationships between 
> functions, which can be used to set the link order (and this is output 
> by the profiler in the form of a .def file).

Thank you for explaining this.  (And actually, it makes perfect sense once you /know/.) 
For those like me, knowing with a certainty what numbers are what, and what the layout of 
all that data means, should breathe new life into this nifty compiler feature.

-- Chris Nicholson-Sauls



More information about the Digitalmars-d mailing list