Kaydet (Commit) e2eca0b7 authored tarafından Barry Warsaw's avatar Barry Warsaw

Port from the Python 2.4 branch, patches for SF bug # 900092,

hotshot.stats.load.
üst f09582ee
...@@ -97,6 +97,7 @@ test_raise.events = [(0, 'call'), ...@@ -97,6 +97,7 @@ test_raise.events = [(0, 'call'),
(-3, 'call'), (-3, 'call'),
(-2, 'line'), (-2, 'line'),
(-2, 'exception'), (-2, 'exception'),
(-2, 'return'),
(2, 'exception'), (2, 'exception'),
(3, 'line'), (3, 'line'),
(4, 'line'), (4, 'line'),
......
...@@ -12,6 +12,9 @@ What's New in Python 2.5 alpha 1? ...@@ -12,6 +12,9 @@ What's New in Python 2.5 alpha 1?
Core and builtins Core and builtins
----------------- -----------------
- SF bug #900092: When tracing (e.g. for hotshot), restore 'return' events for
exceptions that cause a function to exit.
- The implementation of set() and frozenset() was revised to use its - The implementation of set() and frozenset() was revised to use its
own internal data structure. Memory consumption is reduced by 1/3 own internal data structure. Memory consumption is reduced by 1/3
and there are modest speed-ups as well. The API is unchanged. and there are modest speed-ups as well. The API is unchanged.
......
...@@ -2480,14 +2480,20 @@ fast_block_end: ...@@ -2480,14 +2480,20 @@ fast_block_end:
fast_yield: fast_yield:
if (tstate->use_tracing) { if (tstate->use_tracing) {
if (tstate->c_tracefunc if (tstate->c_tracefunc) {
&& (why == WHY_RETURN || why == WHY_YIELD)) { if (why == WHY_RETURN || why == WHY_YIELD) {
if (call_trace(tstate->c_tracefunc, if (call_trace(tstate->c_tracefunc,
tstate->c_traceobj, f, tstate->c_traceobj, f,
PyTrace_RETURN, retval)) { PyTrace_RETURN, retval)) {
Py_XDECREF(retval); Py_XDECREF(retval);
retval = NULL; retval = NULL;
why = WHY_EXCEPTION; why = WHY_EXCEPTION;
}
}
else if (why == WHY_EXCEPTION) {
call_trace_protected(tstate->c_tracefunc,
tstate->c_traceobj, f,
PyTrace_RETURN);
} }
} }
if (tstate->c_profilefunc) { if (tstate->c_profilefunc) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment