summaryrefslogtreecommitdiffstats
path: root/Doc/using
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-08-30 17:11:18 (GMT)
committerGitHub <noreply@github.com>2022-08-30 17:11:18 (GMT)
commit6d791a97364b68d5f9c3514a0470aac487fc538d (patch)
tree745205d7e8698ea7398eb353311f55dc973507bf /Doc/using
parent0f733fffe8f4caaac3ce1b5306af86b42fb0c7fa (diff)
downloadcpython-6d791a97364b68d5f9c3514a0470aac487fc538d.zip
cpython-6d791a97364b68d5f9c3514a0470aac487fc538d.tar.gz
cpython-6d791a97364b68d5f9c3514a0470aac487fc538d.tar.bz2
gh-96143: Allow Linux perf profiler to see Python calls (GH-96123)
:warning: :warning: Note for reviewers, hackers and fellow systems/low-level/compiler engineers :warning: :warning: If you have a lot of experience with this kind of shenanigans and want to improve the **first** version, **please make a PR against my branch** or **reach out by email** or **suggest code changes directly on GitHub**. If you have any **refinements or optimizations** please, wait until the first version is merged before starting hacking or proposing those so we can keep this PR productive.
Diffstat (limited to 'Doc/using')
-rw-r--r--Doc/using/cmdline.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index 6678d47..5ecc882 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -535,6 +535,12 @@ Miscellaneous options
development (running from the source tree) then the default is "off".
Note that the "importlib_bootstrap" and "importlib_bootstrap_external"
frozen modules are always used, even if this flag is set to "off".
+ * ``-X perf`` to activate compatibility mode with the ``perf`` profiler.
+ When this option is activated, the Linux ``perf`` profiler will be able to
+ report Python calls. This option is only available on some platforms and
+ will do nothing if is not supported on the current system. The default value
+ is "off". See also :envvar:`PYTHONPERFSUPPORT` and :ref:`perf_profiling`
+ for more information.
It also allows passing arbitrary values and retrieving them through the
:data:`sys._xoptions` dictionary.
@@ -1025,6 +1031,13 @@ conflict.
.. versionadded:: 3.11
+.. envvar:: PYTHONPERFSUPPORT
+
+ If this variable is set to a nonzero value, it activates compatibility mode
+ with the ``perf`` profiler so Python calls can be detected by it. See the
+ :ref:`perf_profiling` section for more information.
+
+ .. versionadded:: 3.12
Debug-mode variables