Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repurpose jit.maxSize to add a size limit for jitting methods.
#3016 was caused by too-large methods entering the JIT pipeline and consuming too much memory, mostly within ASM's data structures. In this case one particularly large method was the Ragel-generated "advance" method in @whitequark's parser library, which amounts to over 17k IR instructions. The default instruction count max of 2000 here is based on running 'gem install rails', 'rails new ...' and 'rake test:mri:jit' and monitoring methods which exceed the limit; during this process, all but a handful of methods are under 2000 instructions. We believe this limit will allow important methods to still JIT while avoiding extremely large outliers causing JIT pipeline or memory pressure. Fixes #3016.
- Loading branch information
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters