diff options
| author | serjflint <[email protected]> | 2026-06-15 09:32:06 +0300 |
|---|---|---|
| committer | serjflint <[email protected]> | 2026-06-15 10:05:02 +0300 |
| commit | 4e5ad26f5b2f39770d6cb52998a22618fb2906b2 (patch) | |
| tree | fb45ac01e3b3b677595a297bdafaba623072b834 /library/python | |
| parent | 5ea1574d5dd1acf62c333d7db611dbf7c8c2cd16 (diff) | |
expose flags for profilers
commit_hash:49b13c14aae2799bcb3d13016a65e8cc04dc21fc
Diffstat (limited to 'library/python')
| -rw-r--r-- | library/python/symbols/python/syms.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/library/python/symbols/python/syms.cpp b/library/python/symbols/python/syms.cpp index 7820b72181e..8b9a0590322 100644 --- a/library/python/symbols/python/syms.cpp +++ b/library/python/symbols/python/syms.cpp @@ -2,6 +2,14 @@ #include <library/python/symbols/registry/syms.h> +// Internal API not declared by <Python.h>; declared opaquely to take &sym. +#if PY_VERSION_HEX >= 0x030b0000 +extern "C" { +void _PyFrame_IsEntryFrame(); +void _PyMem_GetCurrentAllocatorName(); +} +#endif + BEGIN_SYMS("python") SYM(PyBuffer_Release) @@ -25,6 +33,29 @@ SYM(Py_DecRef) SYM(Py_IncRef) SYM(_Py_NotImplementedStruct) +// Keep + export for attach-based profilers (vanilla memray attach). +#if PY_VERSION_HEX >= 0x3000000 +SYM(Py_CompileString) +SYM(Py_Version) +SYM(PyObject_HasAttr) +SYM(PyImport_GetModuleDict) +SYM(PyEval_SetProfile) +SYM(PyDict_SetDefault) +SYM(_PyDict_NewPresized) +#endif +#if PY_VERSION_HEX >= 0x030b0000 // 3.11+ +SYM(PyFrame_GetLasti) +SYM(_PyFrame_IsEntryFrame) +SYM(_PyMem_GetCurrentAllocatorName) +#endif +#if PY_VERSION_HEX >= 0x030c0000 // 3.12+ +SYM(PyCode_AddWatcher) +SYM(PyEval_SetProfileAllThreads) +#endif +#if PY_VERSION_HEX >= 0x030d0000 // 3.13+ +SYM(PyThreadState_GetUnchecked) +#endif + #if PY_VERSION_HEX < 0x3000000 SYM(PyFile_SetEncoding) SYM(PyFile_AsFile) |
