132 +#define dtrace_return() |
132 +#define dtrace_return() |
133 +#endif |
133 +#endif |
134 |
134 |
135 /* Interpreter main loop */ |
135 /* Interpreter main loop */ |
136 |
136 |
137 @@ -683,9 +737,84 @@ |
137 @@ -685,9 +739,84 @@ |
138 return PyEval_EvalFrameEx(f, 0); |
138 return PyEval_EvalFrameEx(f, 0); |
139 } |
139 } |
140 |
140 |
141 +/* |
141 +/* |
142 + * These shenanigans look like utter madness, but what we're actually doing is |
142 + * These shenanigans look like utter madness, but what we're actually doing is |
229 +#endif |
229 +#endif |
230 + |
230 + |
231 co = f->f_code; |
231 co = f->f_code; |
232 names = co->co_names; |
232 names = co->co_names; |
233 consts = co->co_consts; |
233 consts = co->co_consts; |
234 @@ -2673,6 +2807,9 @@ |
234 @@ -2675,6 +2809,9 @@ |
235 PyObject **sp; |
235 PyObject **sp; |
236 PCALL(PCALL_ALL); |
236 PCALL(PCALL_ALL); |
237 sp = stack_pointer; |
237 sp = stack_pointer; |
238 +#ifdef HAVE_DTRACE |
238 +#ifdef HAVE_DTRACE |
239 + f->f_calllineno = PyCode_Addr2Line(f->f_code, f->f_lasti); |
239 + f->f_calllineno = PyCode_Addr2Line(f->f_code, f->f_lasti); |
240 +#endif |
240 +#endif |
241 #ifdef WITH_TSC |
241 #ifdef WITH_TSC |
242 x = call_function(&sp, oparg, &intr0, &intr1); |
242 x = call_function(&sp, oparg, &intr0, &intr1); |
243 #else |
243 #else |
244 @@ -2714,6 +2851,9 @@ |
244 @@ -2716,6 +2853,9 @@ |
245 } else |
245 } else |
246 Py_INCREF(func); |
246 Py_INCREF(func); |
247 sp = stack_pointer; |
247 sp = stack_pointer; |
248 +#ifdef HAVE_DTRACE |
248 +#ifdef HAVE_DTRACE |
249 + f->f_calllineno = PyCode_Addr2Line(f->f_code, f->f_lasti); |
249 + f->f_calllineno = PyCode_Addr2Line(f->f_code, f->f_lasti); |
250 +#endif |
250 +#endif |
251 READ_TIMESTAMP(intr0); |
251 READ_TIMESTAMP(intr0); |
252 x = ext_do_call(func, &sp, flags, na, nk); |
252 x = ext_do_call(func, &sp, flags, na, nk); |
253 READ_TIMESTAMP(intr1); |
253 READ_TIMESTAMP(intr1); |
254 @@ -3014,6 +3154,10 @@ |
254 @@ -3016,6 +3156,10 @@ |
255 |
255 |
256 /* pop frame */ |
256 /* pop frame */ |
257 exit_eval_frame: |
257 exit_eval_frame: |
258 +#ifdef HAVE_DTRACE |
258 +#ifdef HAVE_DTRACE |
259 + if (PYTHON_FUNCTION_RETURN_ENABLED()) |
259 + if (PYTHON_FUNCTION_RETURN_ENABLED()) |
417 +#pragma D attributes Evolving/Evolving/Common provider python provider |
417 +#pragma D attributes Evolving/Evolving/Common provider python provider |
418 +#pragma D attributes Private/Private/Common provider python module |
418 +#pragma D attributes Private/Private/Common provider python module |
419 +#pragma D attributes Private/Private/Common provider python function |
419 +#pragma D attributes Private/Private/Common provider python function |
420 +#pragma D attributes Evolving/Evolving/Common provider python name |
420 +#pragma D attributes Evolving/Evolving/Common provider python name |
421 +#pragma D attributes Evolving/Evolving/Common provider python args |
421 +#pragma D attributes Evolving/Evolving/Common provider python args |
422 --- Python-2.7.9/Lib/test/test_sys.py.~1~ 2014-12-10 07:59:47.000000000 -0800 |
422 --- Python-2.7.10/Lib/test/test_sys.py.~1~ 2015-05-10 10:17:04 -0800 |
423 +++ Python-2.7.9/Lib/test/test_sys.py 2014-12-11 09:20:26.361157717 -0800 |
423 +++ Python-2.7.10/Lib/test/test_sys.py 2015-05-18 14:35:06 -0800 |
424 @@ -619,7 +619,7 @@ |
424 @@ -620,7 +620,7 @@ |
425 nfrees = len(x.f_code.co_freevars) |
425 nfrees = len(x.f_code.co_freevars) |
426 extras = x.f_code.co_stacksize + x.f_code.co_nlocals +\ |
426 extras = x.f_code.co_stacksize + x.f_code.co_nlocals +\ |
427 ncells + nfrees - 1 |
427 ncells + nfrees - 1 |
428 - check(x, vsize('12P3i' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) |
428 - check(x, vsize('12P3i' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) |
429 + check(x, vsize('12P4i' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) |
429 + check(x, vsize('12P4i' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) |