8225437: JvmtiExport::gc_epilogue is unnecessary
authorcoleenp
Thu, 27 Jun 2019 11:40:18 -0400
changeset 55513 be05771cdfdf
parent 55512 61e03d5d6bcb
child 55518 73f1c84ca264
child 57435 9a4184201823
8225437: JvmtiExport::gc_epilogue is unnecessary Summary: Remove jvmtiExport::gc_epilogue after full GCs Reviewed-by: dholmes, sspitsyn, dlong
src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp
src/hotspot/share/gc/g1/g1FullCollector.cpp
src/hotspot/share/gc/parallel/psMarkSweep.cpp
src/hotspot/share/gc/parallel/psParallelCompact.cpp
src/hotspot/share/gc/serial/genMarkSweep.cpp
src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp
src/hotspot/share/gc/z/zRootsIterator.cpp
src/hotspot/share/prims/jvmtiExport.cpp
src/hotspot/share/prims/jvmtiExport.hpp
src/hotspot/share/prims/jvmtiImpl.cpp
src/hotspot/share/prims/jvmtiImpl.hpp
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -4250,7 +4250,6 @@
   if (should_unload_classes()) {
     heap->prune_scavengable_nmethods();
   }
-  JvmtiExport::gc_epilogue();
 
   // If we encountered any (marking stack / work queue) overflow
   // events during the current CMS cycle, take appropriate
--- a/src/hotspot/share/gc/g1/g1FullCollector.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1FullCollector.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -183,7 +183,6 @@
   update_derived_pointers();
 
   BiasedLocking::restore_marks();
-  JvmtiExport::gc_epilogue();
 
   _heap->prepare_heap_for_mutators();
 
--- a/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -259,7 +259,6 @@
 
     BiasedLocking::restore_marks();
     heap->prune_scavengable_nmethods();
-    JvmtiExport::gc_epilogue();
 
 #if COMPILER2_OR_JVMCI
     DerivedPointerTable::update_pointers();
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -1064,7 +1064,6 @@
   MetaspaceUtils::verify_metrics();
 
   heap->prune_scavengable_nmethods();
-  JvmtiExport::gc_epilogue();
 
 #if COMPILER2_OR_JVMCI
   DerivedPointerTable::update_pointers();
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -129,7 +129,6 @@
   }
 
   gch->prune_scavengable_nmethods();
-  JvmtiExport::gc_epilogue();
 
   // refs processing: clean slate
   set_ref_processor(NULL);
--- a/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -175,8 +175,6 @@
     _preserved_marks->restore(&exec);
     BiasedLocking::restore_marks();
     _preserved_marks->reclaim();
-
-    JvmtiExport::gc_epilogue();
   }
 
   // Resize metaspace
--- a/src/hotspot/share/gc/z/zRootsIterator.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/gc/z/zRootsIterator.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -198,7 +198,6 @@
   } else {
     ZNMethod::oops_do_end();
   }
-  JvmtiExport::gc_epilogue();
 
   COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
   Threads::assert_all_threads_claimed();
--- a/src/hotspot/share/prims/jvmtiExport.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/prims/jvmtiExport.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -2615,10 +2615,6 @@
   JvmtiTagMap::weak_oops_do(is_alive, f);
 }
 
-void JvmtiExport::gc_epilogue() {
-  JvmtiCurrentBreakpoints::gc_epilogue();
-}
-
 // Onload raw monitor transition.
 void JvmtiExport::transition_pending_onload_raw_monitors() {
   JvmtiPendingMonitors::transition_raw_monitors();
--- a/src/hotspot/share/prims/jvmtiExport.hpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/prims/jvmtiExport.hpp	Thu Jun 27 11:40:18 2019 -0400
@@ -388,7 +388,6 @@
 
   static void oops_do(OopClosure* f) NOT_JVMTI_RETURN;
   static void weak_oops_do(BoolObjectClosure* b, OopClosure* f) NOT_JVMTI_RETURN;
-  static void gc_epilogue() NOT_JVMTI_RETURN;
 
   static void transition_pending_onload_raw_monitors() NOT_JVMTI_RETURN;
 
--- a/src/hotspot/share/prims/jvmtiImpl.cpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp	Thu Jun 27 11:40:18 2019 -0400
@@ -225,13 +225,6 @@
   }
 }
 
-void GrowableCache::gc_epilogue() {
-  int len = _elements->length();
-  for (int i=0; i<len; i++) {
-    _cache[i] = _elements->at(i)->getCacheValue();
-  }
-}
-
 //
 // class JvmtiBreakpoint
 //
@@ -389,10 +382,6 @@
   _bps.metadata_do(f);
 }
 
-void JvmtiBreakpoints::gc_epilogue() {
-  _bps.gc_epilogue();
-}
-
 void JvmtiBreakpoints::print() {
 #ifndef PRODUCT
   LogTarget(Trace, jvmti) log;
@@ -514,12 +503,6 @@
   }
 }
 
-void JvmtiCurrentBreakpoints::gc_epilogue() {
-  if (_jvmti_breakpoints != NULL) {
-    _jvmti_breakpoints->gc_epilogue();
-  }
-}
-
 ///////////////////////////////////////////////////////////////
 //
 // class VM_GetOrSetLocal
--- a/src/hotspot/share/prims/jvmtiImpl.hpp	Thu Jun 27 16:12:39 2019 +0100
+++ b/src/hotspot/share/prims/jvmtiImpl.hpp	Thu Jun 27 11:40:18 2019 -0400
@@ -120,8 +120,6 @@
   void oops_do(OopClosure* f);
   // walk metadata to preserve for RedefineClasses
   void metadata_do(void f(Metadata*));
-  // update the cache after a full gc
-  void gc_epilogue();
 };
 
 
@@ -154,7 +152,6 @@
   void clear()                          { _cache.clear(); }
   void oops_do(OopClosure* f)           { _cache.oops_do(f); }
   void metadata_do(void f(Metadata*))   { _cache.metadata_do(f); }
-  void gc_epilogue()                    { _cache.gc_epilogue(); }
 };
 
 
@@ -257,7 +254,6 @@
   int  set(JvmtiBreakpoint& bp);
   int  clear(JvmtiBreakpoint& bp);
   void clearall_in_class_at_safepoint(Klass* klass);
-  void gc_epilogue();
 };
 
 
@@ -299,7 +295,6 @@
 
   static void oops_do(OopClosure* f);
   static void metadata_do(void f(Metadata*)) NOT_JVMTI_RETURN;
-  static void gc_epilogue();
 };
 
 ///////////////////////////////////////////////////////////////