summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/Build
diff options
context:
space:
mode:
authorGregory Szorc <gregory.szorc@gmail.com>2023-05-22 11:45:20 (GMT)
committerGitHub <noreply@github.com>2023-05-22 11:45:20 (GMT)
commit5360cb3d5608ab375de6cd8c0b408459f3fa953a (patch)
treed6256db9d1a0db997b881d26a2ed774f43bd5ff9 /Misc/NEWS.d/next/Build
parent729b252241966f464cc46e176fb854dbcc5296cb (diff)
downloadcpython-5360cb3d5608ab375de6cd8c0b408459f3fa953a.zip
cpython-5360cb3d5608ab375de6cd8c0b408459f3fa953a.tar.gz
cpython-5360cb3d5608ab375de6cd8c0b408459f3fa953a.tar.bz2
gh-101282: Apply BOLT optimizations to libpython for shared builds (#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.
Diffstat (limited to 'Misc/NEWS.d/next/Build')
-rw-r--r--Misc/NEWS.d/next/Build/2023-05-20-16-09-59.gh-issue-101282.FvRARb.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Build/2023-05-20-16-09-59.gh-issue-101282.FvRARb.rst b/Misc/NEWS.d/next/Build/2023-05-20-16-09-59.gh-issue-101282.FvRARb.rst
new file mode 100644
index 0000000..cc70d47
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2023-05-20-16-09-59.gh-issue-101282.FvRARb.rst
@@ -0,0 +1,4 @@
+BOLT optimization is now applied to the libpython shared library if building
+a shared library. BOLT instrumentation and application settings can now be
+influenced via the ``BOLT_INSTRUMENT_FLAGS`` and ``BOLT_APPLY_FLAGS``
+configure variables.