< prev index next >

src/share/vm/gc/g1/g1OopClosures.inline.hpp

Print this page
rev 8362 : [mq]: hotspot


   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1OOPCLOSURES_INLINE_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1OOPCLOSURES_INLINE_HPP
  27 
  28 #include "gc_implementation/g1/concurrentMark.inline.hpp"
  29 #include "gc_implementation/g1/g1CollectedHeap.hpp"
  30 #include "gc_implementation/g1/g1OopClosures.hpp"
  31 #include "gc_implementation/g1/g1ParScanThreadState.inline.hpp"
  32 #include "gc_implementation/g1/g1RemSet.hpp"
  33 #include "gc_implementation/g1/g1RemSet.inline.hpp"
  34 #include "gc_implementation/g1/heapRegionRemSet.hpp"
  35 #include "memory/iterator.inline.hpp"
  36 #include "runtime/prefetch.inline.hpp"
  37 
  38 /*
  39  * This really ought to be an inline function, but apparently the C++
  40  * compiler sometimes sees fit to ignore inline declarations.  Sigh.
  41  */
  42 
  43 template <class T>
  44 inline void FilterIntoCSClosure::do_oop_nv(T* p) {
  45   T heap_oop = oopDesc::load_heap_oop(p);
  46   if (!oopDesc::is_null(heap_oop) &&
  47       _g1->is_in_cset_or_humongous(oopDesc::decode_heap_oop_not_null(heap_oop))) {
  48     _oc->do_oop(p);
  49   }
  50 }
  51 
  52 template <class T>
  53 inline void FilterOutOfRegionClosure::do_oop_nv(T* p) {
  54   T heap_oop = oopDesc::load_heap_oop(p);


 207       // Push the reference in the refs queue of the G1ParScanThreadState
 208       // instance for this worker thread.
 209       _push_ref_cl->do_oop(p);
 210     }
 211 
 212     // Deferred updates to the CSet are either discarded (in the normal case),
 213     // or processed (if an evacuation failure occurs) at the end
 214     // of the collection.
 215     // See G1RemSet::cleanup_after_oops_into_collection_set_do().
 216   } else {
 217     // We either don't care about pushing references that point into the
 218     // collection set (i.e. we're not during an evacuation pause) _or_
 219     // the reference doesn't point into the collection set. Either way
 220     // we add the reference directly to the RSet of the region containing
 221     // the referenced object.
 222     assert(to->rem_set() != NULL, "Need per-region 'into' remsets.");
 223     to->rem_set()->add_reference(p, _worker_i);
 224   }
 225 }
 226 
 227 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1OOPCLOSURES_INLINE_HPP


   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1OOPCLOSURES_INLINE_HPP
  26 #define SHARE_VM_GC_G1_G1OOPCLOSURES_INLINE_HPP
  27 
  28 #include "gc/g1/concurrentMark.inline.hpp"
  29 #include "gc/g1/g1CollectedHeap.hpp"
  30 #include "gc/g1/g1OopClosures.hpp"
  31 #include "gc/g1/g1ParScanThreadState.inline.hpp"
  32 #include "gc/g1/g1RemSet.hpp"
  33 #include "gc/g1/g1RemSet.inline.hpp"
  34 #include "gc/g1/heapRegionRemSet.hpp"
  35 #include "memory/iterator.inline.hpp"
  36 #include "runtime/prefetch.inline.hpp"
  37 
  38 /*
  39  * This really ought to be an inline function, but apparently the C++
  40  * compiler sometimes sees fit to ignore inline declarations.  Sigh.
  41  */
  42 
  43 template <class T>
  44 inline void FilterIntoCSClosure::do_oop_nv(T* p) {
  45   T heap_oop = oopDesc::load_heap_oop(p);
  46   if (!oopDesc::is_null(heap_oop) &&
  47       _g1->is_in_cset_or_humongous(oopDesc::decode_heap_oop_not_null(heap_oop))) {
  48     _oc->do_oop(p);
  49   }
  50 }
  51 
  52 template <class T>
  53 inline void FilterOutOfRegionClosure::do_oop_nv(T* p) {
  54   T heap_oop = oopDesc::load_heap_oop(p);


 207       // Push the reference in the refs queue of the G1ParScanThreadState
 208       // instance for this worker thread.
 209       _push_ref_cl->do_oop(p);
 210     }
 211 
 212     // Deferred updates to the CSet are either discarded (in the normal case),
 213     // or processed (if an evacuation failure occurs) at the end
 214     // of the collection.
 215     // See G1RemSet::cleanup_after_oops_into_collection_set_do().
 216   } else {
 217     // We either don't care about pushing references that point into the
 218     // collection set (i.e. we're not during an evacuation pause) _or_
 219     // the reference doesn't point into the collection set. Either way
 220     // we add the reference directly to the RSet of the region containing
 221     // the referenced object.
 222     assert(to->rem_set() != NULL, "Need per-region 'into' remsets.");
 223     to->rem_set()->add_reference(p, _worker_i);
 224   }
 225 }
 226 
 227 #endif // SHARE_VM_GC_G1_G1OOPCLOSURES_INLINE_HPP
< prev index next >