Performance of invalidating unused SwitchPoint
Remi Forax
forax at univ-mlv.fr
Sat Jan 5 11:45:41 PST 2013
On 01/05/2013 08:08 PM, Charles Oliver Nutter wrote:
> On Sat, Jan 5, 2013 at 12:37 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>> No.
>> invalidating a SwitchPoint that is JITed cost your an harm,
>> invalidating a SwitchPoint which is not JITed is just a volatile write
>> but you still have to update the callsite to use a new SwitchPoint.
> I think I missed some details. In the case where I've "failed" a call
> site, I no longer bind via SwitchPoint *at all*. The site is bound to
> a separate mechanism. But on the invalidation side, I continue to
> construct and invalidate new SwitchPoints due to the way the logic is
> set up.
Ok, get it.
I've dug a little bit in the code of jdk8, when you invalid a
SwitchPoint several times,
there is no short circuit that say, this switch point is already
invalidated,
so you have a call from Java to C to set the underlying target each time :(
so don't do that :)
> I'll try to come up with a test case. For now I have also set up the
> invalidation side to eventually fail permanently and not create or
> invalidate any new SwitchPoints.
>
> - Charlie
Rémi
More information about the mlvm-dev
mailing list