7168505: (bf) MappedByteBuffer.load does not load buffer's content into memory
Rémi Forax
forax at univ-mlv.fr
Tue May 15 03:28:07 PDT 2012
On 05/15/2012 11:33 AM, Alan Bateman wrote:
> On 15/05/2012 08:07, Rémi Forax wrote:
>>
>> I wonder if it's not better to have a fake method recognized by the
>> VM for that,
>> because if the VM is smart enough, 'unused' is only used in load() so
>> it doesn't really escape.
>> A VM/JIT that will generate assembly code for the whole class, by
>> example when module is installed
>> in module repository, will see that easily.
> I suspect the potential for reflection usage will make it harder for
> prove.
The VM can deoptimize when you ask for a Field on the static field.
I think Cliff Click has played with something like that.
> I think the solution in the webrev is okay for now, but I agree that
> we might need something special, like a get method that is known to
> the VM as having potential side effects.
It will be also easier to write micro-benchmarks that are not reduced to
a constant.
>
> -Alan
Rémi
More information about the nio-dev
mailing list