0
0
mirror of https://github.com/python/cpython.git synced 2024-11-22 13:28:21 +01:00
cpython/Python
Victor Stinner 13a00078b8
gh-108634: Py_TRACE_REFS uses a hash table (#108663)
Python built with "configure --with-trace-refs" (tracing references)
is now ABI compatible with Python release build and debug build.
Moreover, it now also supports the Limited API.

Change Py_TRACE_REFS build:

* Remove _PyObject_EXTRA_INIT macro.
* The PyObject structure no longer has two extra members (_ob_prev
  and _ob_next).
* Use a hash table (_Py_hashtable_t) to trace references (all
  objects): PyInterpreterState.object_state.refchain.
* Py_TRACE_REFS build is now ABI compatible with release build and
  debug build.
* Limited C API extensions can now be built with Py_TRACE_REFS:
  xxlimited, xxlimited_35, _testclinic_limited.
* No longer rename PyModule_Create2() and PyModule_FromDefAndSpec2()
  functions to PyModule_Create2TraceRefs() and
  PyModule_FromDefAndSpec2TraceRefs().
* _Py_PrintReferenceAddresses() is now called before
  finalize_interp_delete() which deletes the refchain hash table.
* test_tracemalloc find_trace() now also filters by size to ignore
  the memory allocated by _PyRefchain_Trace().

Test changes for Py_TRACE_REFS:

* Add test.support.Py_TRACE_REFS constant.
* Add test_sys.test_getobjects() to test sys.getobjects() function.
* test_exceptions skips test_recursion_normalizing_with_no_memory()
  and test_memory_error_in_PyErr_PrintEx() if Python is built with
  Py_TRACE_REFS.
* test_repl skips test_no_memory().
* test_capi skisp test_set_nomemory().
2023-08-31 18:33:34 +02:00
..
clinic
deepfreeze
frozen_modules
_warnings.c
abstract_interp_cases.c.h
adaptive.md
asdl.c
asm_trampoline.S
assemble.c
ast_opt.c
ast_unparse.c
ast.c
bltinmodule.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
bootstrap_hash.c
bytecodes.c GH-108614: Remove non-debug uses of #if TIER_ONE and #if TIER_TWO from _POP_FRAME op. (GH-108685) 2023-08-31 11:34:52 +01:00
ceval_gil.c
ceval_macros.h GH-108614: Remove non-debug uses of #if TIER_ONE and #if TIER_TWO from _POP_FRAME op. (GH-108685) 2023-08-31 11:34:52 +01:00
ceval.c GH-108614: Remove non-debug uses of #if TIER_ONE and #if TIER_TWO from _POP_FRAME op. (GH-108685) 2023-08-31 11:34:52 +01:00
codecs.c
compile.c gh-108654: restore comprehension locals before handling exception (#108659) 2023-08-30 17:50:50 -06:00
condvar.h
context.c
dtoa.c
dup2.c
dynamic_annotations.c
dynload_hpux.c
dynload_shlib.c
dynload_stub.c
dynload_win.c
emscripten_signal.c
errors.c
executor_cases.c.h GH-108614: Remove non-debug uses of #if TIER_ONE and #if TIER_TWO from _POP_FRAME op. (GH-108685) 2023-08-31 11:34:52 +01:00
executor.c GH-108614: Remove non-debug uses of #if TIER_ONE and #if TIER_TWO from _POP_FRAME op. (GH-108685) 2023-08-31 11:34:52 +01:00
fileutils.c
flowgraph.c
formatter_unicode.c
frame.c gh-107149: Make PyUnstable_ExecutableKinds public (#108440) 2023-08-31 09:56:06 +02:00
frozen.c
frozenmain.c
future.c
generated_cases.c.h GH-108614: Remove non-debug uses of #if TIER_ONE and #if TIER_TWO from _POP_FRAME op. (GH-108685) 2023-08-31 11:34:52 +01:00
getargs.c
getcompiler.c
getcopyright.c
getopt.c
getplatform.c
getversion.c
hamt.c
hashtable.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
import.c
importdl.c
importdl.h
initconfig.c
instrumentation.c
intrinsics.c gh-107149: Rename _PyUnstable_GetUnaryIntrinsicName() function (#108441) 2023-08-29 01:42:24 +02:00
legacy_tracing.c
marshal.c
modsupport.c
mysnprintf.c
mystrtoul.c
opcode_targets.h
optimizer_analysis.c
optimizer.c gh-107557: Remove unnecessary SAVE_IP instructions (#108583) 2023-08-29 16:51:51 +00:00
pathconfig.c
perf_trampoline.c
preconfig.c
pyarena.c
pyctype.c
pyfpe.c
pyhash.c
pylifecycle.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
pymath.c
pystate.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
pystrcmp.c
pystrhex.c
pystrtod.c
Python-ast.c
Python-tokenize.c
pythonrun.c gh-106320: Remove private pythonrun API (#108599) 2023-08-29 04:18:52 +02:00
pytime.c
README
specialize.c gh-108488: Initialize JUMP_BACKWARD cache to 0, not 17 (#108591) 2023-08-29 18:14:56 +00:00
stdlib_module_names.h
structmember.c
suggestions.c
symtable.c
sysmodule.c
thread_nt.h
thread_pthread_stubs.h
thread_pthread.h
thread.c
traceback.c
tracemalloc.c

Miscellaneous source files for the main Python shared library