gh-118518: Allow perf to work without frame pointers (#112254)

This commit is contained in:
Pablo Galindo Salgado 2024-05-05 03:07:29 +02:00 committed by GitHub
parent 999f0c5122
commit 1b22d801b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 892 additions and 39 deletions

View file

@ -586,6 +586,15 @@ Miscellaneous options
.. versionadded:: 3.12
* ``-X perfjit`` enables support for the Linux ``perf`` profiler with DWARF
support. When this option is provided, the ``perf`` profiler will be able
to report Python calls using DWARF ifnormation. 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:`PYTHONPERFJITSUPPORT`
and :ref:`perf_profiling`.
.. versionadded:: 3.13
* :samp:`-X cpu_count={n}` overrides :func:`os.cpu_count`,
:func:`os.process_cpu_count`, and :func:`multiprocessing.cpu_count`.
*n* must be greater than or equal to 1.
@ -1127,6 +1136,21 @@ conflict.
.. versionadded:: 3.12
.. envvar:: PYTHONPERFJITSUPPORT
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
using DWARF information.
If set to ``0``, disable Linux ``perf`` profiler support.
See also the :option:`-X perfjit <-X>` command-line option
and :ref:`perf_profiling`.
.. versionadded:: 3.13
.. envvar:: PYTHON_CPU_COUNT
If this variable is set to a positive integer, it overrides the return