[9] [8u40] RFR (M): 8059877: GWT branch frequencies pollution due to LF sharing
John Rose
john.r.rose at oracle.com
Tue Oct 28 03:46:08 UTC 2014
On Oct 15, 2014, at 8:21 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>>> Updated version:
>>> http://cr.openjdk.java.net/~vlivanov/8059877/webrev.01/
The algorithm looks fine, as long as the count is small. (Otherwise we might want to spend effort recompiling the DontInline LF.
Call it CountingWrapper, since that's what it does. (Count down vs. count up doesn't matter much.)
Then you can call the states "counting" and "not counting". The pre-action is present only in the counting state.
The aspect of inlining or blocking is then focused down to a detail of the LF flavor.
You call DelegatingMethodHandle.makeReinvokerForm in three places, two of which are identical calls. I suggest refactoring so as to call it in two places.
(Nit: As a matter of style, the default value of a boolean flag should be usual one, in typical cases. By that reasoning, LF.forceInline should be LF.dontInline; the objection to this is that it is anti-style to have a negative word in a boolean name.)
You could create and cache *both* reinvoker forms when the MH wrapper is created, so that the non-counting, inline-enabled LF is created more eagerly during warmup. It might make for a smoother warmup. (Maybe. Maybe not.)
Thanks!
— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20141027/9b69b961/attachment-0001.html>
More information about the mlvm-dev
mailing list