Python/Python-ast.c generated
Python/executor_cases.c.h generated
Python/generated_cases.c.h generated
+Python/generated_tracer_cases.c.h generated
Python/optimizer_cases.c.h generated
Python/opcode_targets.h generated
Python/stdlib_module_names.h generated
#include "frameobject.h" // PyFrameLocalsProxyObject
#include "opcode.h" // EXTENDED_ARG
+#include "../Include/pytypedefs.h"
+#include "../Include/internal/pycore_optimizer.h"
#include "clinic/frameobject.c.h"
return -1;
}
+#if _Py_TIER2
_Py_Executors_InvalidateDependency(PyInterpreterState_Get(), co, 1);
+ _Py_JITTracer_InvalidateDependency(PyThreadState_GET(), co);
+#endif
_PyLocals_Kind kind = _PyLocals_GetKind(co->co_localspluskinds, i);
_PyStackRef oldvalue = fast[i];
DISPATCH();
}
}
- _PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
- ENTER_TRACING();
+ int _is_sys_tracing = (tstate->c_tracefunc != NULL) || (tstate->c_profilefunc != NULL);
+ if (!_is_sys_tracing) {
+ _PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
+ ENTER_TRACING();
+ }
// Don't add the JUMP_BACKWARD_JIT instruction to the trace.
DISPATCH();
}
} \
} while (0);
# define RECORD_TRACE_NO_DISPATCH() do { \
- int _is_sys_tracing = (tstate->c_tracefunc != NULL) || (tstate->c_profilefunc == NULL); \
- if (_is_sys_tracing || IS_JIT_TRACING() && add_to_code_trace(tstate, frame, old_code, old_func, this_instr, next_instr, opcode, oparg, _jump_taken)) { \
+ int _is_sys_tracing = (tstate->c_tracefunc != NULL) || (tstate->c_profilefunc != NULL); \
+ if (_is_sys_tracing) { \
+ LEAVE_TRACING(); \
+ } \
+ else if ((IS_JIT_TRACING() && add_to_code_trace(tstate, frame, old_code, old_func, this_instr, next_instr, opcode, oparg, _jump_taken))) { \
BAIL_TRACING_NO_DISPATCH(); \
} \
} while (0);
DISPATCH();
}
}
- _PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
- ENTER_TRACING();
+ int _is_sys_tracing = (tstate->c_tracefunc != NULL) || (tstate->c_profilefunc != NULL);
+ if (!_is_sys_tracing) {
+ _PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
+ ENTER_TRACING();
+ }
DISPATCH();
}
else {
TRACING_DISPATCH();
}
}
- _PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
- ENTER_TRACING();
+ int _is_sys_tracing = (tstate->c_tracefunc != NULL) || (tstate->c_profilefunc != NULL);
+ if (!_is_sys_tracing) {
+ _PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
+ ENTER_TRACING();
+ }
TRACING_DISPATCH();
}
else {
#include "pycore_tuple.h" // _PyTuple_FromArraySteal()
#include "opcode_ids.h"
+#include "../Include/internal/pycore_optimizer.h"
/* Uncomment this to dump debugging output when assertions fail */
_PyCode_Clear_Executors(code);
}
_Py_Executors_InvalidateDependency(interp, code, 1);
+ _Py_JITTracer_InvalidateDependency(PyThreadState_GET(), code);
#endif
int code_len = (int)Py_SIZE(code);
/* Exit early to avoid creating instrumentation
const struct opcode_macro_expansion *expansion = &_PyOpcode_macro_expansion[opcode];
- RESERVE_RAW(expansion->nuops + needs_guard_ip + 3, "uop and various checks");
-
ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target);
assert(opcode != ENTER_EXECUTOR && opcode != EXTENDED_ARG);
max_length--;
}
+ RESERVE_RAW(expansion->nuops + needs_guard_ip + 3, "uop and various checks");
+
+
switch (opcode) {
case POP_JUMP_IF_NONE:
case POP_JUMP_IF_NOT_NONE:
_PyBloomFilter obj_filter;
_Py_BloomFilter_Init(&obj_filter);
_Py_BloomFilter_Add(&obj_filter, obj);
- HEAD_LOCK(&_PyRuntime);
PyInterpreterState *interp = old_tstate->interp;
}
}
- HEAD_UNLOCK(&_PyRuntime);
}
/* Invalidate all executors */
void
'Python/deepfreeze/*.c',
'Python/frozen_modules/*.h',
'Python/generated_cases.c.h',
+ 'Python/generated_tracer_cases.c.h',
'Python/executor_cases.c.h',
'Python/optimizer_cases.c.h',
'Python/opcode_targets.h',