src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hsx-gc Sdiff src/share/vm/gc_implementation/parallelScavenge

src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp

Print this page




  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_PARALLELSCAVENGE_PSPROMOTIONMANAGER_INLINE_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_INLINE_HPP
  27 
  28 #include "gc_implementation/parallelScavenge/psOldGen.hpp"
  29 #include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
  30 #include "gc_implementation/parallelScavenge/psScavenge.hpp"
  31 
  32 inline PSPromotionManager* PSPromotionManager::manager_array(int index) {
  33   assert(_manager_array != NULL, "access of NULL manager_array");
  34   assert(index >= 0 && index <= (int)ParallelGCThreads, "out of range manager_array access");
  35   return _manager_array[index];
  36 }
  37 
  38 template <class T>
  39 inline void PSPromotionManager::claim_or_forward_internal_depth(T* p) {
  40   if (p != NULL) { // XXX: error if p != NULL here
  41     oop o = oopDesc::load_decode_heap_oop_not_null(p);
  42     if (o->is_forwarded()) {
  43       o = o->forwardee();
  44       // Card mark
  45       if (PSScavenge::is_obj_in_young(o)) {
  46         PSScavenge::card_table()->inline_write_ref_field_gc(p, o);
  47       }
  48       oopDesc::encode_store_heap_oop_not_null(p, o);
  49     } else {
  50       push_depth(p);
  51     }
  52   }
  53 }
  54 
  55 template <class T>




  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_PARALLELSCAVENGE_PSPROMOTIONMANAGER_INLINE_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_INLINE_HPP
  27 
  28 #include "gc_implementation/parallelScavenge/psOldGen.hpp"
  29 #include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
  30 #include "gc_implementation/parallelScavenge/psScavenge.hpp"
  31 
  32 inline PSPromotionManager* PSPromotionManager::manager_array(int index) {
  33   assert(_manager_array != NULL, "access of NULL manager_array");
  34   assert(index >= 0 && index <= (int)ParallelGCThreads, "out of range manager_array access");
  35   return &_manager_array[index];
  36 }
  37 
  38 template <class T>
  39 inline void PSPromotionManager::claim_or_forward_internal_depth(T* p) {
  40   if (p != NULL) { // XXX: error if p != NULL here
  41     oop o = oopDesc::load_decode_heap_oop_not_null(p);
  42     if (o->is_forwarded()) {
  43       o = o->forwardee();
  44       // Card mark
  45       if (PSScavenge::is_obj_in_young(o)) {
  46         PSScavenge::card_table()->inline_write_ref_field_gc(p, o);
  47       }
  48       oopDesc::encode_store_heap_oop_not_null(p, o);
  49     } else {
  50       push_depth(p);
  51     }
  52   }
  53 }
  54 
  55 template <class T>


src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File