Skip to content

Commit ecdf6b1

Browse files
authored
pythongh-118518: Minor improvements to perf docs (python#130866)
Minor improvements to perf docs
1 parent fd3b49e commit ecdf6b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/howto/perf_profiling.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ the :option:`!-X` option takes precedence over the environment variable.
162162

163163
Example, using the environment variable::
164164

165-
$ PYTHONPERFSUPPORT=1 perf record -F 9999 -g -o perf.data python script.py
165+
$ PYTHONPERFSUPPORT=1 perf record -F 9999 -g -o perf.data python my_script.py
166166
$ perf report -g -i perf.data
167167

168168
Example, using the :option:`!-X` option::
169169

170-
$ perf record -F 9999 -g -o perf.data python -X perf script.py
170+
$ perf record -F 9999 -g -o perf.data python -X perf my_script.py
171171
$ perf report -g -i perf.data
172172

173173
Example, using the :mod:`sys` APIs in file :file:`example.py`:
@@ -236,7 +236,7 @@ When using the perf JIT mode, you need an extra step before you can run ``perf
236236
report``. You need to call the ``perf inject`` command to inject the JIT
237237
information into the ``perf.data`` file.::
238238

239-
$ perf record -F 9999 -g --call-graph dwarf -o perf.data python -Xperf_jit my_script.py
239+
$ perf record -F 9999 -g -k 1 --call-graph dwarf -o perf.data python -Xperf_jit my_script.py
240240
$ perf inject -i perf.data --jit --output perf.jit.data
241241
$ perf report -g -i perf.jit.data
242242

0 commit comments

Comments
 (0)