Improve some of the debug logging in ConstantLookupSite.#4504
Improve some of the debug logging in ConstantLookupSite.#4504headius merged 1 commit intojruby:masterfrom
Conversation
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.
|
Looks great! Richer logging is always welcome. |
|
Incidentally, was the problem you were debugging something wrong in JRuby? |
|
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 |
|
@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. |
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.