RFR: 8201800: Add support for adjusting heap addresses in a TLAB

Aleksey Shipilev shade at redhat.com
Wed Apr 18 14:26:29 UTC 2018


On 04/18/2018 04:23 PM, Aleksey Shipilev wrote:
> On 04/18/2018 04:05 PM, Per Liden wrote:
>> This patch adds support for iterating over and adjusting heap addresses contained in TLABs. A user
>> of this would be ZGC, which sometimes wants to adjust the color of those pointers. This patch adds a
>> new function, ThreadLocalAllocBuffer::addresses_do(), which takes a function/functor and applies
>> that to all addresses in the TLAB.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8201800
>> Webrev: http://cr.openjdk.java.net/~pliden/8201800/webrev.0
> 
> Wait, how does this supposed to work? Don't you want to pass four arguments to f(...), not call f()
> four times?

I misread. You want to update addresses *of* the TLAB itself, not *in* a memory covered by the TLAB.

This looks fine to me.

-Aleksey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180418/8066f440/signature.asc>


More information about the hotspot-gc-dev mailing list