RFR: JDK-8204685: Abstraction for TLAB dummy object
Aleksey Shipilev
shade at redhat.com
Tue Jun 12 13:58:03 UTC 2018
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 }
Thanks,
-Aleksey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20180612/edfd2aa2/signature.asc>
More information about the hotspot-gc-dev
mailing list