RFR(XS): 8149973: Optimize object alignment check in debug builds.
Dmitry Dmitriev
dmitry.dmitriev at oracle.com
Thu Feb 25 12:32:14 UTC 2016
Hello Coleen,
Thank you for suggestion, but I'm not sure about that.
check_obj_alignment accepts 'oop obj' argument, but 'o' is a oopDesc.
Thanks,
Dmitry
On 24.02.2016 15:35, Coleen Phillimore wrote:
>
> From
> http://cr.openjdk.java.net/~ddmitriev/8149973/webrev.00/src/share/vm/gc/g1/g1OopClosures.inline.hpp.udiff.html
>
> http://cr.openjdk.java.net/~ddmitriev/8149973/webrev.00/src/share/vm/gc/g1/g1RemSet.inline.hpp.udiff.html
>
>
> Can you just call
>
> assert(check_obj_alignment(o), "not oop aligned");
>
> rather than repeating the & expression? The check_obj_alignment is
> inlined.
>
> Coleen
>
> On 2/24/16 5:42 AM, Dmitry Dmitriev wrote:
>> Hello,
>>
>> Please, review small optimization to the object alignment check in
>> the debug builds. In this fix I replace division by
>> MinObjAlignmentInBytes to bitwise AND operation with
>> MinObjAlignmentInBytesMask, because MinObjAlignmentInBytes is a power
>> of two. Suggested construction already used in MacroAssembler, e.g.
>> hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp).
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8149973
>> webrev.00: http://cr.openjdk.java.net/~ddmitriev/8149973/webrev.00/
>> <http://cr.openjdk.java.net/%7Eddmitriev/8149973/webrev.00/>
>> Testing: jprt, hotspot_all
>>
>> Thanks,
>> Dmitry
>
More information about the hotspot-dev
mailing list