Skip to content
Merged
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Ezio Melotti <[email protected]>
  • Loading branch information
Erlend E. Aasland and ezio-melotti authored Oct 4, 2022
commit db4aaa219f7e1090a44ec6a85f4c929eaf125c59
11 changes: 5 additions & 6 deletions Doc/howto/perf_profiling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,11 @@ Instead, if we run the same experiment with ``perf`` support enabled we get:
How to enable ``perf`` profiling support
----------------------------------------

There are three ways to enable ``perf`` profiling support;
the environment variable :envvar:`PYTHONPERFSUPPORT` and the
:option:`-X perf <-X>` option allow you to enable perf profiling from the start,
whereas the :func:`sys.activate_stack_trampoline` and
:func:`sys.deactivate_stack_trampoline` functions allow you to enable and
disable it dynamically.
``perf`` profiling support can either be enabled from the start using
the environment variable :envvar:`PYTHONPERFSUPPORT` or the
:option:`-X perf <-X>` option,
or dynamically using :func:`sys.activate_stack_trampoline` and
:func:`sys.deactivate_stack_trampoline`.

The :mod:`!sys` functions take precedence over the :option:`!-X` option,
the :option:`!-X` option takes precedence over the environment variable.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ always available.
.. function:: activate_stack_trampoline(backend, /)

Activate the stack profiler trampoline *backend*.
The only supported backend is `"perf"`.
The only supported backend is ``"perf"``.

.. availability:: Linux.

Expand Down