-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make BOLT as stable feature #101525
Labels
build
The build process and cross-build
performance
Performance or resource usage
type-feature
A feature request or enhancement
Comments
corona10
added
type-feature
A feature request or enhancement
performance
Performance or resource usage
labels
Feb 2, 2023
I am analyzing several effects of BOLT. |
Need to update get_build_info for the BOLT binary. |
Consider a way to detect post-bolted binary: llvm/llvm-project#60253 |
corona10
added a commit
to corona10/cpython
that referenced
this issue
Apr 2, 2023
corona10
added a commit
that referenced
this issue
Apr 5, 2023
Co-authored-by: Dong-hee Na <[email protected]>
gaogaotiantian
pushed a commit
to gaogaotiantian/cpython
that referenced
this issue
Apr 8, 2023
…ngh-103187) Co-authored-by: Dong-hee Na <[email protected]>
warsaw
pushed a commit
to warsaw/cpython
that referenced
this issue
Apr 11, 2023
…ngh-103187) Co-authored-by: Dong-hee Na <[email protected]>
corona10
added a commit
to corona10/cpython
that referenced
this issue
Apr 16, 2023
corona10
added a commit
that referenced
this issue
Apr 17, 2023
indygreg
added a commit
to indygreg/cpython
that referenced
this issue
May 20, 2023
(This change is a quick and dirty way to merge some of the build system improvements I'm proposing in pythongh-101093 before the 3.12 feature freeze. I wanted to scope bloat myself to fix some longstanding deficiencies in the build system around profile-guided builds. But I'm getting soft resistance to the reviews so close to the freeze deadline and it is obvious that we need a simpler solution to hit the 3.12 deadline. While this change is quick and dirty, it attempts to not make things worse.) Before this change, we only applied bolt to the main python binary. After this change, we apply bolt to libpython if it is configured. In shared library builds, most of the C code is in libpython so it is critical to apply bolt to libpython to realize bolt benefits. This change also reworks how bolt instrumentation is applied. It effectively removes the readelf based logic added in pythongh-101525 and replaces it with a mechanism that saves a copy of the pre-bolt binary and restores that copy when necessary. This allows us to perform bolt optimizations without having to manually delete the output binary to force a new bolt run. We also add a new make target for purging bolt files and hook it up to `clean` so bolt state is purged when appropriate. `.gitignore` rules have been added to ignore files related to bolt. Before and after this refactor, `make` will no-op after a previous run. Both versions should also share common make DAG deficiencies where targets fail to trigger as often as they need to or can trigger prematurely in certain scenarios. e.g. after this change you may need to `rm profile-bolt-stamp` to force a bolt run because there aren't appropriate non-phony targets for bolt's make target to depend on. Fixing this is a non-trivial amount of work that will likely have to wait until the 3.13 window. To make it easier to iterate on custom BOLT settings, the flags to pass to instrumentation and application are now defined in configure and can be overridden by passing `BOLT_INSTRUMENT_FLAGS` and `BOLT_APPLY_FLAGS`.
indygreg
added a commit
to indygreg/cpython
that referenced
this issue
May 21, 2023
(This change is a quick and dirty way to merge some of the build system improvements I'm proposing in pythongh-101093 before the 3.12 feature freeze. I wanted to scope bloat myself to fix some longstanding deficiencies in the build system around profile-guided builds. But I'm getting soft resistance to the reviews so close to the freeze deadline and it is obvious that we need a simpler solution to hit the 3.12 deadline. While this change is quick and dirty, it attempts to not make things worse.) Before this change, we only applied bolt to the main python binary. After this change, we apply bolt to libpython if it is configured. In shared library builds, most of the C code is in libpython so it is critical to apply bolt to libpython to realize bolt benefits. This change also reworks how bolt instrumentation is applied. It effectively removes the readelf based logic added in pythongh-101525 and replaces it with a mechanism that saves a copy of the pre-bolt binary and restores that copy when necessary. This allows us to perform bolt optimizations without having to manually delete the output binary to force a new bolt run. We also add a new make target for purging bolt files and hook it up to `clean` so bolt state is purged when appropriate. `.gitignore` rules have been added to ignore files related to bolt. Before and after this refactor, `make` will no-op after a previous run. Both versions should also share common make DAG deficiencies where targets fail to trigger as often as they need to or can trigger prematurely in certain scenarios. e.g. after this change you may need to `rm profile-bolt-stamp` to force a bolt run because there aren't appropriate non-phony targets for bolt's make target to depend on. Fixing this is a non-trivial amount of work that will likely have to wait until the 3.13 window. To make it easier to iterate on custom BOLT settings, the flags to pass to instrumentation and application are now defined in configure and can be overridden by passing `BOLT_INSTRUMENT_FLAGS` and `BOLT_APPLY_FLAGS`.
erlend-aasland
pushed a commit
that referenced
this issue
May 22, 2023
…104709) Apply BOLT optimizations to libpython for shared builds. Most of the C code is in libpython so it is critical to apply BOLT there fully realize BOLT benefits. This change also reworks how BOLT instrumentation is applied. It effectively removes the readelf based logic added in gh-101525 and replaces it with a mechanism that saves a copy of the pre-bolt binary and restores that copy when necessary. This allows us to perform BOLT optimizations without having to manually delete the output binary to force a new bolt run. Also: - add a clean-bolt target for purging BOLT files and hook that up to the clean target - .gitignore BOLT related files Before and after this refactor, `make` will no-op after a previous run. Both versions should also share common make DAG deficiencies where targets fail to trigger as often as they need to or can trigger prematurely in certain scenarios. e.g. after this change you may need to `rm profile-bolt-stamp` to force a BOLT run because there aren't appropriate non-phony targets for BOLT's make target to depend on. To make it easier to iterate on custom BOLT settings, the flags to pass to instrumentation and application are now defined in configure and can be overridden by passing BOLT_INSTRUMENT_FLAGS and BOLT_APPLY_FLAGS.
Need to use cdsort instead of hfsort+ |
corona10
added a commit
to corona10/cpython
that referenced
this issue
Aug 31, 2024
corona10
added a commit
that referenced
this issue
Sep 2, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 2, 2024
…ythongh-118572) (cherry picked from commit f95fc4d) Co-authored-by: Donghee Na <[email protected]>
corona10
added a commit
that referenced
this issue
Sep 2, 2024
corona10
added a commit
to corona10/cpython
that referenced
this issue
Sep 2, 2024
…OLT. (pythongh-118572) (cherry picked from commit f95fc4d) Co-authored-by: Donghee Na <[email protected]>
corona10
added a commit
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build
The build process and cross-build
performance
Performance or resource usage
type-feature
A feature request or enhancement
Using a BOLT still not guarantee the unexpected behavior changes.
For example, I observed that #53093 is raised if the binary is optimized by BOLT.
We can reduce several too aggressive optimization.
make test
to work correctly (Should skip the BOLT phase if the binary is already BOLTed)cc @aaupov
Linked PRs
The text was updated successfully, but these errors were encountered: