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

Thomas Stüfe thomas.stuefe at gmail.com
Wed Nov 13 17:34:00 UTC 2019


Hi,

may I have a review for a backport please.

Original bug:
https://bugs.openjdk.java.net/browse/JDK-8221539
http://hg.openjdk.java.net/jdk/jdk/rev/2ae93028bef3

11u webrev:
http://cr.openjdk.java.net/~stuefe/webrevs/11u-8221539/webrev.00/webrev/

Original patch does not apply cleanly to 11u because it relies on older
changes in metaspace verification coding.

It would need 8218988 "Improve metaspace verifications" to apply cleanly.

That one would need 8177710 "Convert TestMetaspaceUtils_test to GTest".

Which has a number of problem and leads down a rabbit hole of unnecessary
and potentially dangerous test changes I do not really want to backport.

I had to make a cut somewhere, so I made one below this change: 8221539.

The fix is simply to call the older version of VirtualSpaceNode::verify()
which did not yet take a boolean parameter. Its all good.

diff -r 77e43317f4f7 -r 22efab1c724c
src/hotspot/share/memory/metaspace/virtualSpaceList.cpp
--- a/src/hotspot/share/memory/metaspace/virtualSpaceList.cpp   Wed Mar 27
14:13:34 2019 +0100
+++ b/src/hotspot/share/memory/metaspace/virtualSpaceList.cpp   Wed Nov 13
18:15:55 2019 +0100
@@ -410,7 +410,7 @@
   while (iter.repeat()) {
     VirtualSpaceNode* node = iter.get_next();
     if (slow) {
-      node->verify(true);
+      node->verify();
     }
     // Check that the node resides fully within our envelope.
     assert((address)node->low_boundary() >= _envelope_lo &&
(address)node->high_boundary() <= _envelope_hi,


Thank you,

Thomas


More information about the jdk-updates-dev mailing list