Request for reviews (M): 7085860: JSR 292: implement CallSite.setTargetNormal and setTargetVolatile as native methods
tom.rodriguez at oracle.com
Thu Sep 8 09:03:41 PDT 2011
On Sep 8, 2011, at 3:03 AM, Christian Thalinger wrote:
> On Sep 7, 2011, at 9:09 PM, John Rose wrote:
>> On Sep 7, 2011, at 6:37 AM, Christian Thalinger wrote:
>>> 7085860: JSR 292: implement CallSite.setTargetNormal and setTargetVolatile as native methods
>> Yes, looks good. (I agree with Tom that "volatile_put" is harder to read than "put_volatile". In the latter formulation, "volatile" modifies "put" more clearly.)
> I renamed the two methods (raw and volatile) and added the new methods to klassOop too (it looks like that is required). The webrev is updated.
That looks good. One thing that occurred to me is that reading of the target field within the JVM must be done as if it were volatile, since we don't actually know what type of call site we're reading from. You could put a check in CallSite::target but I think you just always read it as volatile. I suspect the invokedynamic call site assembly also needs to do any required barriers.
> -- Christian
>> Will there be a separate bug for throttling megamutable sites, after Tom's field injection stuff goes in?
>> -- John
More information about the hotspot-compiler-dev