RFR: 8202994: Add support for undoing last TLAB allocation

Aleksey Shipilev shade at redhat.com
Mon May 14 08:16:08 UTC 2018


On 05/14/2018 10:08 AM, Per Liden wrote:
> Hi,
> 
> I don't really have a strong opinion on this. There's some comfort in asserting on things we should
> never be doing (i.e. undo something that is in the TLAB but it's not the last allocation). On the
> other hand, I think you proposal is also fine, and I _think_ it can be simplified even further with
> a single pointer_delta call. Like this:
> 
> http://cr.openjdk.java.net/~pliden/8202994/webrev.2

This looks fine.

> Any strong opinions from others?

I mean, if we are to bikeshed on this more, I think it is a good idea to both make release builds do
the right thing (e.g. returning false as the patch above suggestes), *and* make fastdebug builds to
fail with assert if we are trying to do creepy things.

I.e.:

  if (!is_last_allocation(obj, size)) {
    assert(!contains(obj), "Bad undo: the object is not the last allocation");
    return false;
  }


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: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180514/5bc5081e/signature.asc>


More information about the hotspot-gc-dev mailing list