gh-96143: Improve perf profiler docs (#96445)

This commit is contained in:
Erlend E. Aasland 2022-10-27 15:06:48 +02:00 committed by GitHub
parent 22863df7ca
commit 723ebe76e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 118 additions and 50 deletions

View file

@ -538,12 +538,11 @@ 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
* ``-X perf`` enables support for the Linux ``perf`` profiler.
When this option is provided, the ``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.
is "off". See also :envvar:`PYTHONPERFSUPPORT` and :ref:`perf_profiling`.
It also allows passing arbitrary values and retrieving them through the
:data:`sys._xoptions` dictionary.
@ -1048,9 +1047,13 @@ conflict.
.. 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.
If this variable is set to a nonzero value, it enables support for
the Linux ``perf`` profiler so Python calls can be detected by it.
If set to ``0``, disable Linux ``perf`` profiler support.
See also the :option:`-X perf <-X>` command-line option
and :ref:`perf_profiling`.
.. versionadded:: 3.12