RFR: JDK-8204685: Abstraction for TLAB dummy object
Roman Kennke
rkennke at redhat.com
Tue Jun 12 16:40:33 UTC 2018
Am 12.06.2018 um 15:58 schrieb Aleksey Shipilev:
> On 06/11/2018 06:02 PM, Roman Kennke wrote:
>> Similar to how object allocations should be owned by the GC, so does
>> TLAB dummy object 'allocation'. TLABs and PLABs are filling their
>> remaining blocks with dummy objects. GCs like Shenandoah might need a
>> slightly differet layout for this, and therefore we need an abstraction.
>>
>> The proposed change adds a new virtual method
>> CollectedHeap::fill_with_dummy_object(), the default implementation
>> calls the existing CH::fill_with_object() from TLAB and PLAB like it was
>> done before.
>>
>> Tested: hotspot-tier1, Shenandoah tests with appropriate impl
>>
>> http://cr.openjdk.java.net/~rkennke/JDK-8204685/webrev.00/
>
> I have doubts about setting "zap = false" unconditionally. As far as I can see, zapping is enabled
> for debug builds only anyway, so we better keep it "true".
>
> 82 size_t PLAB::retire_internal() {
> 83 size_t result = 0;
> 84 if (_top < _hard_end) {
> 85 Universe::heap()->fill_with_dummy_object(_top, _hard_end, false); <--- change to true?
> 86 result += invalidate();
> 87 }
> 88 return result;
> 89 }
> 90
> 91 void PLAB::add_undo_waste(HeapWord* obj, size_t word_sz) {
> 92 Universe::heap()->fill_with_dummy_object(obj, obj + word_sz, false); <--- change to true?
> 93 _undo_wasted += word_sz;
> 94 }
>
Right.
http://cr.openjdk.java.net/~rkennke/JDK-8204685/webrev.01/
Good now?
Thanks for reviewing!
Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20180612/a1836159/signature.asc>
More information about the hotspot-gc-dev
mailing list