RFR(s): 8221539: [metaspace] Improve MetaspaceObj::is_metaspace_obj() and friends

Doerr, Martin martin.doerr at sap.com
Tue Apr 2 10:26:05 UTC 2019


Hi Thomas,

can you replace the NULL check by a check for address below page size, please?
oopDesc::is_valid and Symbol::is_valid do it the following way:

  if (!is_aligned(s, sizeof(MetaWord))) return false;
  if ((size_t)s < os::min_page_size()) return false;

Besides this, webrev.01 looks good to me.

Thanks,
Martin


-----Original Message-----
From: hotspot-runtime-dev <hotspot-runtime-dev-bounces at openjdk.java.net> On Behalf Of Andrew Dinn
Sent: Dienstag, 2. April 2019 11:30
To: Thomas Stüfe <thomas.stuefe at gmail.com>; Coleen Phillmore <coleen.phillimore at oracle.com>
Cc: Hotspot dev runtime <hotspot-runtime-dev at openjdk.java.net>
Subject: Re: RFR(s): 8221539: [metaspace] Improve MetaspaceObj::is_metaspace_obj() and friends

On 02/04/2019 08:56, Thomas Stüfe wrote:
> p.s. nightlies at SAP ok, submit tests are ok
> . . .
>     Differences:
>     - As Coleen requested: in allocation.cpp I replaced the comparison
>     this==NULL with a static helper method
>     - I had mistype "envelope" as "envolope" in
>     "expand_envelope_to_include_node()". Since that sounded funny I
>     changed it.
>     - The real bug was in VirtualSpaceList::verify() where I checked
>     that the extension of the envelope is as large as the current nodes.
>     But that is wrong, since the envelope never is shrunk (by design)
>     and nodes at the border of the envelope may have been unmapped. So
>     the real test should be to test if no node is outside the envelope.
This version looks ok.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the hotspot-runtime-dev mailing list