[Python-Dev] Python 3 optimizations continued...
Cesare Di Mauro
cesare.di.mauro at gmail.com
Thu Sep 1 14:38:19 CEST 2011
2011/9/1 Mark Shannon <mark at hotpy.org>
> Cesare Di Mauro wrote:
>
>> 2011/9/1 Ned Batchelder <ned at nedbatchelder.com <mailto:
>> ned at nedbatchelder.com>>
>>
>>
>> When the switchover to the new instruction format happens, what
>> happens to sys.settrace() tracing? Will it report the same sequence
>> of line numbers? For a small but important class of program
>> executions, this is more important than speed.
>>
>> --Ned
>>
>>
>> A simple solution: when tracing is enabled, the new instruction format
>> will never be executed (and information tracking disabled as well).
>>
>> What happens if tracing is enabled *during* the execution of the new
> instruction format?
> Some sort of deoptimisation will be required in order to recover the
> correct VM state.
>
> Cheers,
> Mark.
>
Sure. I don't think that the regular ceval.c loop will be "dropped" when
executing the new instruction format, so we can "intercept" a change like
this using the "why" variable, for example, or something similar that is
normally used to break the regular loop execution.
Anyway, we need to take a look at the code.
Cheers,
Cesare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110901/8cdaab9b/attachment.html>
More information about the Python-Dev
mailing list