On Wed, Jun 07, 2006 at 09:53:32AM -0400, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > Do we agree the idea can't go further? What next? > > It still needs investigation; I'm no longer convinced that the TLB-flush > theory is correct. See rest of thread. We may well have to revert the > current patch, but I'd like to be sure we understand why.
One thing I'm thinking of trying is to, instead of assuming we can estimate the duractions of all the nodes by taking the total time divided by samples. we assume that the duration of tuple X is similar in duration to tuple X+1 but not necessarily the same as all other tuples. This moves the calculation from EndLoop to StopInstr. Basically in StopInstr you do the steps: if( sampling ) { x = get time for this tuple n = number of tuples skipped cumulativetime += x*n } This would mean that we wouldn't be assuming that tuples near the end take as long as tuples near the beginning. Except we're now dealing will smaller numbers, so I'm worried about error accumlation. > If we do have to revert, I'd propose that we pursue the notion of > interrupt-driven sampling like gprof uses. How would that work? You could then estimate how much time was spent in each node, but you no longer have any idea about when they were entered or left. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.
signature.asc
Description: Digital signature