< prev index next >

src/hotspot/share/gc/cms/promotionInfo.cpp

Print this page

        

*** 24,35 **** #include "precompiled.hpp" #include "gc/cms/compactibleFreeListSpace.hpp" #include "gc/cms/promotionInfo.hpp" #include "gc/shared/genOopClosures.hpp" #include "oops/markOop.inline.hpp" ! #include "oops/oop.inline.hpp" ///////////////////////////////////////////////////////////////////////// //// PromotionInfo ///////////////////////////////////////////////////////////////////////// --- 24,36 ---- #include "precompiled.hpp" #include "gc/cms/compactibleFreeListSpace.hpp" #include "gc/cms/promotionInfo.hpp" #include "gc/shared/genOopClosures.hpp" + #include "oops/compressedOops.inline.hpp" #include "oops/markOop.inline.hpp" ! #include "oops/oop.hpp" ///////////////////////////////////////////////////////////////////////// //// PromotionInfo /////////////////////////////////////////////////////////////////////////
*** 37,47 **** PromotedObject* PromotedObject::next() const { assert(!((FreeChunk*)this)->is_free(), "Error"); PromotedObject* res; if (UseCompressedOops) { // The next pointer is a compressed oop stored in the top 32 bits ! res = (PromotedObject*)oopDesc::decode_heap_oop(_data._narrow_next); } else { res = (PromotedObject*)(_next & next_mask); } assert(oopDesc::is_oop_or_null(oop(res), true /* ignore mark word */), "Expected an oop or NULL at " PTR_FORMAT, p2i(oop(res))); return res; --- 38,48 ---- PromotedObject* PromotedObject::next() const { assert(!((FreeChunk*)this)->is_free(), "Error"); PromotedObject* res; if (UseCompressedOops) { // The next pointer is a compressed oop stored in the top 32 bits ! res = (PromotedObject*)CompressedOops::decode(_data._narrow_next); } else { res = (PromotedObject*)(_next & next_mask); } assert(oopDesc::is_oop_or_null(oop(res), true /* ignore mark word */), "Expected an oop or NULL at " PTR_FORMAT, p2i(oop(res))); return res;
*** 50,60 **** inline void PromotedObject::setNext(PromotedObject* x) { assert(((intptr_t)x & ~next_mask) == 0, "Conflict in bit usage, " "or insufficient alignment of objects"); if (UseCompressedOops) { assert(_data._narrow_next == 0, "Overwrite?"); ! _data._narrow_next = oopDesc::encode_heap_oop(oop(x)); } else { _next |= (intptr_t)x; } assert(!((FreeChunk*)this)->is_free(), "Error"); } --- 51,61 ---- inline void PromotedObject::setNext(PromotedObject* x) { assert(((intptr_t)x & ~next_mask) == 0, "Conflict in bit usage, " "or insufficient alignment of objects"); if (UseCompressedOops) { assert(_data._narrow_next == 0, "Overwrite?"); ! _data._narrow_next = CompressedOops::encode(oop(x)); } else { _next |= (intptr_t)x; } assert(!((FreeChunk*)this)->is_free(), "Error"); }
< prev index next >