On Oct 15, 2014, at 8:21 AM, Vladimir Ivanov <vladimir.x.iva...@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
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to