changeset 52119:dc367963d251

ZGC: Remove MetadataOnStackMark workaround
author eosterlund
date Tue, 11 Sep 2018 09:59:27 +0200
parents b3fe7deca7cc
children 65c1ca045607
files src/hotspot/share/classfile/metadataOnStackMark.cpp
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/metadataOnStackMark.cpp	Mon Aug 27 08:55:00 2018 +0200
+++ b/src/hotspot/share/classfile/metadataOnStackMark.cpp	Tue Sep 11 09:59:27 2018 +0200
@@ -47,15 +47,11 @@
 // the relocator and dummy constant pools.  None of these appear anywhere except
 // in metadata Handles.
 MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk) {
+  assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
   assert(_used_buffers == NULL, "sanity check");
   assert(!_is_active, "MetadataOnStackMarks do not nest");
   NOT_PRODUCT(_is_active = true;)
 
-  if (!UseZGC) {
-    assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
-    Threads::metadata_handles_do(Metadata::mark_on_stack);
-  }
-
   if (redefinition_walk) {
     Threads::metadata_do(Metadata::mark_on_stack);
     CodeCache::metadata_do(Metadata::mark_on_stack);
@@ -69,7 +65,7 @@
 }
 
 MetadataOnStackMark::~MetadataOnStackMark() {
-  assert(SafepointSynchronize::is_at_safepoint() || UseZGC, "sanity check");
+  assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
   // Unmark everything that was marked.   Can't do the same walk because
   // redefine classes messes up the code cache so the set of methods
   // might not be the same.