GH-116017: Get rid of _COLD_EXIT#120960
Merged
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cold exits use quite a bit of memory on JIT builds, and complicate memory allocation improvements (since they are the only immortal, shared-by-all-interpreters, unlinked, un-invalidatable executors). They also introduce a very subtle back-and-forth dance between executors when warming up side exits, and represent a significant proportion of the uops executed.
This:
_EXIT_TRACEinstruction (previously this logic was shared between theexit_to_tracelabel (only used by_EXIT_TRACE) and_COLD_EXIT..._EXIT_TRACEto use anoparginstead of anexit_index...Separately, I added some missing stats to
_DYNAMIC_EXIT.This results in a 34.7% reduction in traces executed, and a 1.6% reduction in uops executed (both corresponding to 3.7 billion fewer
_COLD_EXITS). Per platform:aarch64-apple-darwin: 3% faster, 9% less memoryaarch64-unknown-linux-gnu: 9% faster, 2% less memoryi686-pc-windows-msvc: 3% fasterx86_64-pc-windows-msvc: 3% fasterx86_64-unknown-linux-gnu: 1% faster, 2% less memory