mirror of
https://github.com/python/cpython.git
synced 2025-10-01 04:42:10 +00:00
bpo-24318: Rewrite the README PGO section. (GH-6863)
* bpo-24318: Rewrite the README PGO section.
Merged from a phone on an airplane. :)
(cherry picked from commit 93f9a8a5af
)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
parent
6409e759df
commit
447fdd178f
1 changed files with 16 additions and 15 deletions
31
README.rst
31
README.rst
|
@ -93,25 +93,26 @@ Profile Guided Optimization
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
PGO takes advantage of recent versions of the GCC or Clang compilers. If used,
|
PGO takes advantage of recent versions of the GCC or Clang compilers. If used,
|
||||||
either via ``configure --enable-optimizations`` above or by manually running
|
either via ``configure --enable-optimizations`` or by manually running
|
||||||
``make profile-opt`` regardless of configure flags it will do several steps.
|
``make profile-opt`` regardless of configure flags, the optimized build
|
||||||
|
process will perform the following steps:
|
||||||
|
|
||||||
First, the entire Python directory is cleaned of temporary files that may have
|
The entire Python directory is cleaned of temporary files that may have
|
||||||
resulted in a previous compilation.
|
resulted from a previous compilation.
|
||||||
|
|
||||||
Then, an instrumented version of the interpreter is built, using suitable
|
An instrumented version of the interpreter is built, using suitable compiler
|
||||||
compiler flags for each flavour. Note that this is just an intermediary step.
|
flags for each flavour. Note that this is just an intermediary step. The
|
||||||
The binary resulting from this step is not good for real life workloads as
|
binary resulting from this step is not good for real life workloads as it has
|
||||||
it has profiling instructions embedded inside.
|
profiling instructions embedded inside.
|
||||||
|
|
||||||
After this instrumented version of the interpreter is built, the Makefile will
|
After the instrumented interpreter is built, the Makefile will run a training
|
||||||
automatically run a training workload. This is necessary in order to profile
|
workload. This is necessary in order to profile the interpreter execution.
|
||||||
the interpreter execution. Note also that any output, both stdout and stderr,
|
Note also that any output, both stdout and stderr, that may appear at this step
|
||||||
that may appear at this step is suppressed.
|
is suppressed.
|
||||||
|
|
||||||
Finally, the last step is to rebuild the interpreter, using the information
|
The final step is to build the actual interpreter, using the information
|
||||||
collected in the previous one. The end result will be a Python binary that is
|
collected from the instrumented one. The end result will be a Python binary
|
||||||
optimized and suitable for distribution or production installation.
|
that is optimized; suitable for distribution or production installation.
|
||||||
|
|
||||||
|
|
||||||
Link Time Optimization
|
Link Time Optimization
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue