8050973: CMS/G1 GC: add missing Resource and Handle mark
authormdoerr
Tue, 29 Jul 2014 10:26:09 +0200
changeset 25893 b4141bec6a67
parent 25890 4d36851e4d29
child 25894 664ddf8330d4
child 25903 21a77ac2b8c5
8050973: CMS/G1 GC: add missing Resource and Handle mark Summary: Add Resource/HandleMark in the work() method of some AbstractGangTask to reclaim these resources earlier. Reviewed-by: tschatzl, goetz
hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Thu Jul 24 15:06:36 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Tue Jul 29 10:26:09 2014 +0200
@@ -5987,6 +5987,8 @@
 };
 
 void CMSRefProcTaskProxy::work(uint worker_id) {
+  ResourceMark rm;
+  HandleMark hm;
   assert(_collector->_span.equals(_span), "Inconsistency in _span");
   CMSParKeepAliveClosure par_keep_alive(_collector, _span,
                                         _mark_bit_map,
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Jul 24 15:06:36 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Jul 29 10:26:09 2014 +0200
@@ -2403,6 +2403,8 @@
   }
 
   virtual void work(uint worker_id) {
+    ResourceMark rm;
+    HandleMark hm;
     CMTask* task = _cm->task(worker_id);
     G1CMIsAliveClosure g1_is_alive(_g1h);
     G1CMKeepAliveAndDrainClosure g1_par_keep_alive(_cm, task, false /* is_serial */);