Skip to content

Commit 0a8d4ae

Browse files
generatedunixname1734921407115435meta-codesync[bot]
authored andcommitted
Sync pre-release CPython main branch from GitHub (2026-05-05)
Summary: Imported python/cpython `3.15.0a8+` from upstream rev [`5dd2161`](https://www.github.com/python/cpython/commit/5dd21617164cf69e848a70e3d7e32faf0bc3f279) (committed 2026-05-05 03:30:03+00:00). # Commit Info Base: (`3.15.0a8+`) - [`7acee98`](https://www.github.com/python/cpython/commit/7acee984e8e2a88bcfb7a83e9c472902e340e5be) (commit date: 2026-05-04 21:38:07+00:00) Imported: (`3.15.0a8+`) - [`5dd2161`](https://www.github.com/python/cpython/commit/5dd21617164cf69e848a70e3d7e32faf0bc3f279) (commit date: 2026-05-05 03:30:03+00:00) # Noteworthy file changes - Stdlib files (1 added) - Test files (3 removed) - Low-signal files (10 added) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GGlp_h7ZdaLfBB0GAK_KiUQZRq0lbr0LAAAz Differential Revision: D103793452 fbshipit-source-id: 49e143ad692be104f37c23071443b45e6fe1ea14
1 parent c975d7b commit 0a8d4ae

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

cinderx/Interpreter/3.15/Includes/Python/ceval_macros.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,24 @@ GETITEM(PyObject *v, Py_ssize_t i) {
328328
#define CONSTS() _PyFrame_GetCode(frame)->co_consts
329329
#define NAMES() _PyFrame_GetCode(frame)->co_names
330330

331+
#if defined(WITH_DTRACE) && !defined(Py_BUILD_CORE_MODULE)
332+
static void dtrace_function_entry(_PyInterpreterFrame *);
333+
static void dtrace_function_return(_PyInterpreterFrame *);
334+
331335
#define DTRACE_FUNCTION_ENTRY() \
332336
if (PyDTrace_FUNCTION_ENTRY_ENABLED()) { \
333337
dtrace_function_entry(frame); \
334338
}
335339

340+
#define DTRACE_FUNCTION_RETURN() \
341+
if (PyDTrace_FUNCTION_RETURN_ENABLED()) { \
342+
dtrace_function_return(frame); \
343+
}
344+
#else
345+
#define DTRACE_FUNCTION_ENTRY() ((void)0)
346+
#define DTRACE_FUNCTION_RETURN() ((void)0)
347+
#endif
348+
336349
/* This takes a uint16_t instead of a _Py_BackoffCounter,
337350
* because it is used directly on the cache entry in generated code,
338351
* which is always an integral type. */

cinderx/Interpreter/3.15/Includes/generated_cases.c.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9335,6 +9335,7 @@
93359335
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
93369336
_PyFrame_SetStackPointer(frame, stack_pointer);
93379337
assert(STACK_LEVEL() == 0);
9338+
DTRACE_FUNCTION_RETURN();
93389339
_Py_LeaveRecursiveCallPy(tstate);
93399340
_PyInterpreterFrame *dying = frame;
93409341
frame = tstate->current_frame = dying->previous;
@@ -9397,6 +9398,7 @@
93979398
stack_pointer += -1;
93989399
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
93999400
_PyFrame_SetStackPointer(frame, stack_pointer);
9401+
DTRACE_FUNCTION_RETURN();
94009402
tstate->exc_info = gen->gi_exc_state.previous_item;
94019403
gen->gi_exc_state.previous_item = NULL;
94029404
_Py_LeaveRecursiveCallPy(tstate);
@@ -12534,6 +12536,7 @@
1253412536
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
1253512537
_PyFrame_SetStackPointer(frame, stack_pointer);
1253612538
assert(STACK_LEVEL() == 0);
12539+
DTRACE_FUNCTION_RETURN();
1253712540
_Py_LeaveRecursiveCallPy(tstate);
1253812541
_PyInterpreterFrame *dying = frame;
1253912542
frame = tstate->current_frame = dying->previous;
@@ -14418,6 +14421,7 @@
1441814421
stack_pointer += -1;
1441914422
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
1442014423
_PyFrame_SetStackPointer(frame, stack_pointer);
14424+
DTRACE_FUNCTION_RETURN();
1442114425
tstate->exc_info = gen->gi_exc_state.previous_item;
1442214426
gen->gi_exc_state.previous_item = NULL;
1442314427
_Py_LeaveRecursiveCallPy(tstate);
@@ -14564,6 +14568,13 @@ JUMP_TO_LABEL(error);
1456414568
}
1456514569

1456614570
LABEL(exit_unwind)
14571+
{
14572+
assert(_PyErr_Occurred(tstate));
14573+
DTRACE_FUNCTION_RETURN();
14574+
JUMP_TO_LABEL(exit_unwind_notrace);
14575+
}
14576+
14577+
LABEL(exit_unwind_notrace)
1456714578
{
1456814579
assert(_PyErr_Occurred(tstate));
1456914580
_Py_LeaveRecursiveCallPy(tstate);

cinderx/Interpreter/3.15/cinderx_opcode_targets.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_pop_1_error(TAIL_CALL_PARAMS);
527527
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_error(TAIL_CALL_PARAMS);
528528
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_exception_unwind(TAIL_CALL_PARAMS);
529529
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_exit_unwind(TAIL_CALL_PARAMS);
530+
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_exit_unwind_notrace(TAIL_CALL_PARAMS);
530531
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_start_frame(TAIL_CALL_PARAMS);
531532
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_stop_tracing(TAIL_CALL_PARAMS);
532533

0 commit comments

Comments
 (0)