changeset 6493:e02e18f40eae

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
author mdoerr
date Tue, 29 Jul 2014 10:26:09 +0200
parents 755930f931e3
children 04d77ac27223
files src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp src/share/vm/gc_implementation/g1/concurrentMark.cpp
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed Jul 23 09:03:32 2014 +0200
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Tue Jul 29 10:26:09 2014 +0200
@@ -6051,6 +6051,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/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Jul 23 09:03:32 2014 +0200
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Jul 29 10:26:09 2014 +0200
@@ -2399,6 +2399,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 */);