Request for reviews (S): 7071709: JSR 292: switchpoint invalidation should be pushed not pulled

John Rose john.r.rose at
Sat Aug 27 16:44:47 PDT 2011

On Aug 26, 2011, at 2:16 AM, Christian Thalinger wrote:

>> Also, get_field_by_offset should be called on the actual type of the ciCallSite, not env->CallSite_klass.  Otherwise you might get NULL for the ciField, if the target fields are split out across different call site subclasses.
> Are there plans to do this?  I changed ciField::is_call_site_target to check for subclasses of CallSite.

No, no plans.  Just a move toward robustness.  Right now we have a common field inherited from CS that is faked into final or volatile field semantics in the subclasses.  I'm afraid we could get forced to split the field at some point.

On Aug 26, 2011, at 2:23 AM, Christian Thalinger wrote:

> On Aug 26, 2011, at 1:47 AM, John Rose wrote:
>> On Aug 25, 2011, at 11:32 AM, Tom Rodriguez wrote:
>>> The docs for VolatileCallSite suggest setTarget can be called whenever you feel like it, so it seems like it can be set many times.  MutableCallSite can be as well but the implication is that it's not updated very often.  I'm actually unclear what distinction is trying to be made with VolatileCallSite.
>> The MCS and VCS have the same semantics, except for the extra memory barriers on VCS.  These barriers do not affect the validity or applicability of push notification.  Also, either an MCS or VCS might end up being "megamutable", so there has to be some sort of cutoff that will prevent target-prediction for a CS which has been mispredicted too many times.  We need to squeeze a bit of state into the CS, somewhere, which displays how many times the thing has been mispredicted.
> So the question is should we go with what we currently have for invokedynamic (only optimize CCS and MCS) or should we allow all CSs to be optimized and start working on the logic John describes.  I'm fine with both.

I think we need the throttling logic right away.  I'm not comfortable with encouraging users to use VCS just because MCS has a performance bug.

-- John
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-compiler-dev mailing list