Skip to content

Commit 54db163

Browse files
committed
Rename perfjit to use underscores: perf_jit
1 parent d454f29 commit 54db163

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

Doc/c-api/init_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ PyConfig
12521252
12531253
Set by :option:`-X perf <-X>` command-line option and by the
12541254
:envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf support
1255-
with stack pointers and :option:`-X perfjit <-X>` command-line option
1255+
with stack pointers and :option:`-X perf_jit <-X>` command-line option
12561256
and by the :envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf
12571257
support with DWARF JIT information.
12581258

Doc/howto/perf_profiling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,12 @@ needs to generate unwinding information for every Python function call on the fl
217217
information to unwind the stack and this is a slow process.
218218

219219
To enable this mode, you can use the environment variable :envvar:`PYTHON_PERF_JIT_SUPPORT` or the
220-
:option:`-X perfjit <-X>` option, which will enable the JIT mode for the ``perf`` profiler.
220+
:option:`-X perf_jit <-X>` option, which will enable the JIT mode for the ``perf`` profiler.
221221

222222
When using the perf JIT mode, you need an extra step before you can run ``perf report``. You need to
223223
call the ``perf inject`` command to inject the JIT information into the ``perf.data`` file.
224224

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
226226
$ perf inject -i perf.data --jit
227227
$ perf report -g -i perf.data
228228

Doc/using/cmdline.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ Miscellaneous options
587587

588588
.. versionadded:: 3.12
589589

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
591591
support. When this option is provided, the ``perf`` profiler will be able
592592
to report Python calls using DWARF information. This option is only available on
593593
some platforms and will do nothing if is not supported on the current
@@ -1145,7 +1145,7 @@ conflict.
11451145

11461146
If set to ``0``, disable Linux ``perf`` profiler support.
11471147

1148-
See also the :option:`-X perfjit <-X>` command-line option
1148+
See also the :option:`-X perf_jit <-X>` command-line option
11491149
and :ref:`perf_profiling`.
11501150

11511151
.. versionadded:: 3.13

Doc/whatsnew/3.13.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Other Language Changes
272272

273273
* Add :ref:`support for the perf profiler <perf_profiling>` working without
274274
frame pointers through the new environment variable
275-
:envvar:`PYTHON_PERF_JIT_SUPPORT` and command-line option :option:`-X perfjit
275+
:envvar:`PYTHON_PERF_JIT_SUPPORT` and command-line option :option:`-X perf_jit
276276
<-X>` (Contributed by Pablo Galindo in :gh:`118518`.)
277277

278278
* The new :envvar:`PYTHON_HISTORY` environment variable can be used to change

Lib/test/test_perf_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ class TestPerfProfilerWithDwarf(unittest.TestCase, TestPerfProfilerMixin):
494494
def run_perf(self, script_dir, script, activate_trampoline=True):
495495
if activate_trampoline:
496496
return run_perf(
497-
script_dir, sys.executable, "-Xperfjit", script, use_jit=True
497+
script_dir, sys.executable, "-Xperf_jit", script, use_jit=True
498498
)
499499
return run_perf(script_dir, sys.executable, script, use_jit=True)
500500

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Allow the Linux perf support to work without frame pointers using perf's
22
advanced JIT support. The feature is activated when using the
33
``PYTHON_PERF_JIT_SUPPORT`` environment variable or when running Python with
4-
``-Xperfjit``. Patch by Pablo Galindo.
4+
``-Xperf_jit``. Patch by Pablo Galindo.

Python/initconfig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,7 +1712,7 @@ config_init_perf_profiling(PyConfig *config)
17121712
config->perf_profiling = 2;
17131713
}
17141714
}
1715-
xoption = config_get_xoption(config, L"perfjit");
1715+
xoption = config_get_xoption(config, L"perf_jit");
17161716
if (xoption) {
17171717
config->perf_profiling = 2;
17181718
}

Python/sysmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2294,7 +2294,7 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend)
22942294
return NULL;
22952295
}
22962296
}
2297-
else if (strcmp(backend, "perfjit") == 0) {
2297+
else if (strcmp(backend, "perf_jit") == 0) {
22982298
_PyPerf_Callbacks cur_cb;
22992299
_PyPerfTrampoline_GetCallbacks(&cur_cb);
23002300
if (cur_cb.write_state != _Py_perfmap_jit_callbacks.write_state) {

0 commit comments

Comments
 (0)