mirror of
https://github.com/python/cpython.git
synced 2025-07-12 22:05:16 +00:00
GH-101520: Move tracemalloc functionality into core, leaving interface in Modules. (#104508)
This commit is contained in:
parent
26931944dd
commit
f7df173949
11 changed files with 1621 additions and 1545 deletions
|
@ -1129,11 +1129,12 @@ init_interp_main(PyThreadState *tstate)
|
|||
return _PyStatus_ERR("can't initialize signals");
|
||||
}
|
||||
|
||||
if (_PyTraceMalloc_Init(config->tracemalloc) < 0) {
|
||||
return _PyStatus_ERR("can't initialize tracemalloc");
|
||||
if (config->tracemalloc) {
|
||||
if (_PyTraceMalloc_Start(config->tracemalloc) < 0) {
|
||||
return _PyStatus_ERR("can't start tracemalloc");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef PY_HAVE_PERF_TRAMPOLINE
|
||||
if (config->perf_profiling) {
|
||||
if (_PyPerfTrampoline_SetCallbacks(&_Py_perfmap_callbacks) < 0 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue