diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2020-03-20 03:09:27 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2020-03-20 03:09:27 +0000 |
commit | 1e4174b45c4b9c3d27ef68e532d58aae22457bbf (patch) | |
tree | a14f68f5a1169e0155390f996b37249ebad86669 /mjit.c | |
parent | 6fb4206cfbd8431a19634ac94f9693cc21515d5f (diff) |
merge revision(s) a8dcab723316997d9e01c89d6df969edce75bdca:
Avoid infinite loop on --jit-wait
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -297,7 +297,14 @@ unload_units(void) remove_from_list(worst, &active_units); free_unit(worst); } - verbose(1, "Too many JIT code -- %d units unloaded", units_num - active_units.length); + + if (units_num == active_units.length && mjit_opts.wait) { + mjit_opts.max_cache_size++; // avoid infinite loop on `rb_mjit_wait_call`. Note that --jit-wait is just for testing. + verbose(1, "No units can be unloaded -- incremented max-cache-size to %d for --jit-wait", mjit_opts.max_cache_size); + } + else { + verbose(1, "Too many JIT code -- %d units unloaded", units_num - active_units.length); + } } /* Add ISEQ to be JITed in parallel with the current thread. |