--- a/Lib/profile.py Sat Nov 13 19:08:32 2010 +++ b/Lib/profile.py Fri Mar 30 11:11:57 2012 @@ -509,12 +509,7 @@ if self.__class__ is not Profile: raise TypeError("Subclasses must override .calibrate().") - saved_bias = self.bias - self.bias = 0 - try: - return self._calibrate_inner(m, verbose) - finally: - self.bias = saved_bias + return self._calibrate_inner(m, verbose) def _calibrate_inner(self, m, verbose): get_time = self.get_time @@ -546,7 +541,7 @@ # elapsed_profile <- time f(m) takes with profiling. The difference # is profiling overhead, only some of which the profiler subtracts # out on its own. - p = Profile() + p = Profile(timer=self.timer, bias=0) t0 = get_time() p.runctx('f(m)', globals(), locals()) t1 = get_time()