Skip to content

Improve some of the debug logging in ConstantLookupSite.#4504

Merged
headius merged 1 commit intojruby:masterfrom
snowp:snowp/add-logging
Feb 24, 2017
Merged

Improve some of the debug logging in ConstantLookupSite.#4504
headius merged 1 commit intojruby:masterfrom
snowp:snowp/add-logging

Conversation

@snowp
Copy link
Contributor

@snowp snowp commented Feb 24, 2017

Added this while debugging an issue, figured it'd be useful
upstream. Adds the method name to the log statement + adds
logging for searchModuleForConst. Spelling out the method
name is useful to distinguish between lexicalSearchConst
and searchConst, but also makes it easier to map the log
statements with the origin method when you're not familiar
with the code.

Happy to change the format of the logs if there's any objections,
this is just what I ended up using.

Added this while debugging an issue, figured it'd be useful
upstream. Adds the method name to the log statement + adds
logging for searchModuleForConst. Spelling out the method
name is useful to distinguish between lexicalSearchConst
and searchConst, but also makes it easier to map the log
statements with the origin method when you're not familiar
with the code.
@headius
Copy link
Member

headius commented Feb 24, 2017

Looks great! Richer logging is always welcome.

@headius headius merged commit 913b0da into jruby:master Feb 24, 2017
@headius
Copy link
Member

headius commented Feb 24, 2017

Incidentally, was the problem you were debugging something wrong in JRuby?

@snowp
Copy link
Contributor Author

snowp commented Feb 24, 2017

I've been tracking down an issue that's causing increased GC usage, seemingly introduced after some changes made to the ConstantLookupSite for 9.1.3.0. I'm hoping to file an issue about it by EOW

@snowp snowp deleted the snowp/add-logging branch February 24, 2017 16:50
@snowp
Copy link
Contributor Author

snowp commented Feb 25, 2017

@headius: Was able to track down the problem, so not gonna create an issue, but I'll outline it here: after updating from 9.1.2.0 to 9.1.7.0 we saw a large increase in time spent in ParNew (would hit 30% during peak hours after a few days, depending on the amount of traffic). We tracked down the issue to being introduced either in 1ae29af or d15e35a. Turns out your change to make the idTest on RubyModule lazy fixed the issue, so we're just going to patch that change in to .7. Would love to find out why creating redundant MethodHandles was causing increased GC pressure (memory leak?), but its not crucial at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants