Skip to content
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

Const2 lookups cache poorly in indy JIT #2495

headius opened this issue Jan 22, 2015 · 0 comments

Const2 lookups cache poorly in indy JIT #2495

headius opened this issue Jan 22, 2015 · 0 comments


Copy link

headius commented Jan 22, 2015

Root cause of #2493.

When accessing a constant like a::B, we attempt to cache the value against module a's id and the global constant invalidator. Unfortunately, for cases where this form may see many different "a" values (as is the case in #2493) we fail to cache the value but still keep trying. This leads to tremendous overhead in method handle creation and call site binding/rebinding.

For the moment I'm disabling this caching. JRuby 1.7 did not do it, so I do not have the heuristics in hand to tune these access sites. We will endeavor to fix this before final.

@headius headius self-assigned this Jan 22, 2015
@headius headius added this to the milestone Jan 22, 2015
headius added a commit that referenced this issue Jan 22, 2015
We cache the "B" value based on the module ID of "a". However, if
the "a" value may be different values, we constantly try to
re-cache it. Need a better heuristic for bailout of too-dynamic
constant lookup sites.

Fixes #2493. Workaround for #2495.
@headius headius modified the milestones:, Apr 17, 2015
@headius headius modified the milestones: Post-9000, JRuby Jul 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants