Question about simple profiling implementation
Dimitrie O. Paun
dpaun at rogers.com
Tue Dec 2 11:52:08 CST 2003
On December 2, 2003 08:52 am, Andrew de Quincey wrote:
> As you say, relay debugging adds a huge overhead... however, would you say
> that this overhead would be fairly constant for each particular function?
And herein lies the problem: we're adding a _big_ constant overhead (O)
to a variable cost (c).
> I'm thinking of not outputting the raw values as they are quite misleading;
> instead percentages would probably be better.
This will not work as you expect. Say you have 3 calls, each taking
c1, c2, c3
Without overhead, the relative cost of c1 is:
c1 / (c1 + c2 + c3)
With the overhead, the cost will be:
(c1 + O) / (c1 + c2 + c3 + 3O)
which will be much different from the above (and completely misleading).
--
Dimi.
More information about the wine-devel
mailing list