File tree Expand file tree Collapse file tree 8 files changed +20
-20
lines changed
Filter options
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 8 files changed +20
-20
lines changed
Original file line number Diff line number Diff line change @@ -1250,10 +1250,10 @@ PyConfig
1250
1250
If non-zero, initialize the perf trampoline. See :ref:`perf_profiling`
1251
1251
for more information.
1252
1252
1253
- Set by :option:`-X perf <-X>` command line option and by the
1254
- :envvar:`PYTHONPERFSUPPORT ` environment variable for perf support
1255
- with stack pointers and :option:`-X perfjit <-X>` command line option
1256
- and by the :envvar:`PYTHONPERFJITSUPPORT ` environment variable for perf
1253
+ Set by :option:`-X perf <-X>` command- line option and by the
1254
+ :envvar:`PYTHON_PERF_JIT_SUPPORT ` environment variable for perf support
1255
+ with stack pointers and :option:`-X perf_jit <-X>` command- line option
1256
+ and by the :envvar:`PYTHON_PERF_JIT_SUPPORT ` environment variable for perf
1257
1257
support with DWARF JIT information.
1258
1258
1259
1259
Default: ``-1``.
Original file line number Diff line number Diff line change @@ -216,19 +216,19 @@ needs to generate unwinding information for every Python function call on the fl
216
216
``perf `` will take more time to process the data because it will need to use the DWARF debugging
217
217
information to unwind the stack and this is a slow process.
218
218
219
- To enable this mode, you can use the environment variable :envvar: `PYTHONPERFJITSUPPORT ` or the
220
- :option: `-X perfjit <-X> ` option, which will enable the JIT mode for the ``perf `` profiler.
219
+ To enable this mode, you can use the environment variable :envvar: `PYTHON_PERF_JIT_SUPPORT ` or the
220
+ :option: `-X perf_jit <-X> ` option, which will enable the JIT mode for the ``perf `` profiler.
221
221
222
222
When using the perf JIT mode, you need an extra step before you can run ``perf report ``. You need to
223
223
call the ``perf inject `` command to inject the JIT information into the ``perf.data `` file.
224
224
225
- $ perf record -F 9999 -g --call-graph dwarf -o perf.data python -Xperfjit my_script.py
225
+ $ perf record -F 9999 -g --call-graph dwarf -o perf.data python -Xperf_jit my_script.py
226
226
$ perf inject -i perf.data --jit
227
227
$ perf report -g -i perf.data
228
228
229
229
or using the environment variable::
230
230
231
- $ PYTHONPERFJITSUPPORT =1 perf record -F 9999 -g --call-graph dwarf -o perf.data python my_script.py
231
+ $ PYTHON_PERF_JIT_SUPPORT =1 perf record -F 9999 -g --call-graph dwarf -o perf.data python my_script.py
232
232
$ perf inject -i perf.data --jit
233
233
$ perf report -g -i perf.data
234
234
Original file line number Diff line number Diff line change @@ -587,11 +587,11 @@ Miscellaneous options
587
587
588
588
.. versionadded :: 3.12
589
589
590
- * ``-X perfjit `` enables support for the Linux ``perf `` profiler with DWARF
590
+ * ``-X perf_jit `` enables support for the Linux ``perf `` profiler with DWARF
591
591
support. When this option is provided, the ``perf `` profiler will be able
592
- to report Python calls using DWARF ifnormation . This option is only available on
592
+ to report Python calls using DWARF information . This option is only available on
593
593
some platforms and will do nothing if is not supported on the current
594
- system. The default value is "off". See also :envvar: `PYTHONPERFJITSUPPORT `
594
+ system. The default value is "off". See also :envvar: `PYTHON_PERF_JIT_SUPPORT `
595
595
and :ref: `perf_profiling `.
596
596
597
597
.. versionadded :: 3.13
@@ -1137,15 +1137,15 @@ conflict.
1137
1137
1138
1138
.. versionadded :: 3.12
1139
1139
1140
- .. envvar :: PYTHONPERFJITSUPPORT
1140
+ .. envvar :: PYTHON_PERF_JIT_SUPPORT
1141
1141
1142
1142
If this variable is set to a nonzero value, it enables support for
1143
1143
the Linux ``perf `` profiler so Python calls can be detected by it
1144
1144
using DWARF information.
1145
1145
1146
1146
If set to ``0 ``, disable Linux ``perf `` profiler support.
1147
1147
1148
- See also the :option: `-X perfjit <-X> ` command-line option
1148
+ See also the :option: `-X perf_jit <-X> ` command-line option
1149
1149
and :ref: `perf_profiling `.
1150
1150
1151
1151
.. versionadded :: 3.13
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ Other Language Changes
272
272
273
273
* Add :ref: `support for the perf profiler <perf_profiling >` working without
274
274
frame pointers through the new environment variable
275
- :envvar: `PYTHONPERFJITSUPPORT ` and command-line option :option: `-X perfjit
275
+ :envvar: `PYTHON_PERF_JIT_SUPPORT ` and command-line option :option: `-X perf_jit
276
276
<-X> ` (Contributed by Pablo Galindo in :gh: `118518 `.)
277
277
278
278
* The new :envvar: `PYTHON_HISTORY ` environment variable can be used to change
Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ class TestPerfProfilerWithDwarf(unittest.TestCase, TestPerfProfilerMixin):
494
494
def run_perf (self , script_dir , script , activate_trampoline = True ):
495
495
if activate_trampoline :
496
496
return run_perf (
497
- script_dir , sys .executable , "-Xperfjit " , script , use_jit = True
497
+ script_dir , sys .executable , "-Xperf_jit " , script , use_jit = True
498
498
)
499
499
return run_perf (script_dir , sys .executable , script , use_jit = True )
500
500
Original file line number Diff line number Diff line change 1
1
Allow the Linux perf support to work without frame pointers using perf's
2
2
advanced JIT support. The feature is activated when using the
3
- ``PYTHONPERFJITSUPPORT `` environment variable or when running Python with
4
- ``-Xperfjit ``. Patch by Pablo Galindo
3
+ ``PYTHON_PERF_JIT_SUPPORT `` environment variable or when running Python with
4
+ ``-Xperf_jit ``. Patch by Pablo Galindo.
Original file line number Diff line number Diff line change @@ -1703,7 +1703,7 @@ config_init_perf_profiling(PyConfig *config)
1703
1703
if (xoption ) {
1704
1704
config -> perf_profiling = 1 ;
1705
1705
}
1706
- env = config_get_env (config , "PYTHONPERFJITSUPPORT " );
1706
+ env = config_get_env (config , "PYTHON_PERF_JIT_SUPPORT " );
1707
1707
if (env ) {
1708
1708
if (_Py_str_to_int (env , & active ) != 0 ) {
1709
1709
active = 0 ;
@@ -1712,7 +1712,7 @@ config_init_perf_profiling(PyConfig *config)
1712
1712
config -> perf_profiling = 2 ;
1713
1713
}
1714
1714
}
1715
- xoption = config_get_xoption (config , L"perfjit " );
1715
+ xoption = config_get_xoption (config , L"perf_jit " );
1716
1716
if (xoption ) {
1717
1717
config -> perf_profiling = 2 ;
1718
1718
}
Original file line number Diff line number Diff line change @@ -2294,7 +2294,7 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend)
2294
2294
return NULL ;
2295
2295
}
2296
2296
}
2297
- else if (strcmp (backend , "perfjit " ) == 0 ) {
2297
+ else if (strcmp (backend , "perf_jit " ) == 0 ) {
2298
2298
_PyPerf_Callbacks cur_cb ;
2299
2299
_PyPerfTrampoline_GetCallbacks (& cur_cb );
2300
2300
if (cur_cb .write_state != _Py_perfmap_jit_callbacks .write_state ) {
You can’t perform that action at this time.
0 commit comments