Skip to content

Commit 78cf0c1

Browse files
committed
fixup! gh-98894: Restore function entry/exit DTrace probes
1 parent b1e8453 commit 78cf0c1

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

Python/bytecodes.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5532,6 +5532,12 @@ dummy_func(
55325532
}
55335533

55345534
spilled label(exit_unwind) {
5535+
assert(_PyErr_Occurred(tstate));
5536+
DTRACE_FUNCTION_RETURN();
5537+
goto exit_unwind_notrace;
5538+
}
5539+
5540+
spilled label(exit_unwind_notrace) {
55355541
assert(_PyErr_Occurred(tstate));
55365542
_Py_LeaveRecursiveCallPy(tstate);
55375543
assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
@@ -5564,7 +5570,7 @@ dummy_func(
55645570
spilled label(start_frame) {
55655571
int too_deep = _Py_EnterRecursivePy(tstate);
55665572
if (too_deep) {
5567-
goto exit_unwind;
5573+
goto exit_unwind_notrace;
55685574
}
55695575
DTRACE_FUNCTION_ENTRY();
55705576
next_instr = frame->instr_ptr;
@@ -5654,6 +5660,7 @@ dummy_func(
56545660
error:
56555661
exception_unwind:
56565662
exit_unwind:
5663+
exit_unwind_notrace:
56575664
handle_eval_breaker:
56585665
resume_frame:
56595666
start_frame:

Python/ceval.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
15631563
if (_Py_EnterRecursivePy(tstate)) {
15641564
goto early_exit;
15651565
}
1566-
DTRACE_FUNCTION_ENTRY();
15671566
#ifdef Py_GIL_DISABLED
15681567
/* Load thread-local bytecode */
15691568
if (frame->tlbc_index != ((_PyThreadStateImpl *)tstate)->tlbc_index) {

Python/generated_cases.c.h

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/opcode_targets.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)