summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2022-10-27 13:06:48 (GMT)
committerGitHub <noreply@github.com>2022-10-27 13:06:48 (GMT)
commit723ebe76e787cfa6b08cc9587dd679f3234a1025 (patch)
tree6e46cce9595e7411b5dfdf83fb05b6536baf325b /Doc/library
parent22863df7ca5f9cd01a40ab3dce3d067ec5666081 (diff)
downloadcpython-723ebe76e787cfa6b08cc9587dd679f3234a1025.zip
cpython-723ebe76e787cfa6b08cc9587dd679f3234a1025.tar.gz
cpython-723ebe76e787cfa6b08cc9587dd679f3234a1025.tar.bz2
gh-96143: Improve perf profiler docs (#96445)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/sys.rst32
1 files changed, 32 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 542b08b..17bbfa5 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -1555,6 +1555,38 @@ always available.
This function has been added on a provisional basis (see :pep:`411`
for details.) Use it only for debugging purposes.
+.. function:: activate_stack_trampoline(backend, /)
+
+ Activate the stack profiler trampoline *backend*.
+ The only supported backend is ``"perf"``.
+
+ .. availability:: Linux.
+
+ .. versionadded:: 3.12
+
+ .. seealso::
+
+ * :ref:`perf_profiling`
+ * https://perf.wiki.kernel.org
+
+.. function:: deactivate_stack_trampoline()
+
+ Deactivate the current stack profiler trampoline backend.
+
+ If no stack profiler is activated, this function has no effect.
+
+ .. availability:: Linux.
+
+ .. versionadded:: 3.12
+
+.. function:: is_stack_trampoline_active()
+
+ Return ``True`` if a stack profiler trampoline is active.
+
+ .. availability:: Linux.
+
+ .. versionadded:: 3.12
+
.. function:: _enablelegacywindowsfsencoding()
Changes the :term:`filesystem encoding and error handler` to 'mbcs' and