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 #include "precompiled.hpp"
26 #include "gc/cms/compactibleFreeListSpace.hpp"
27 #include "gc/cms/promotionInfo.hpp"
28 #include "gc/shared/genOopClosures.hpp"
29 #include "oops/compressedOops.inline.hpp"
30 #include "oops/markWord.inline.hpp"
31 #include "oops/oop.hpp"
32
33 /////////////////////////////////////////////////////////////////////////
34 //// PromotionInfo
35 /////////////////////////////////////////////////////////////////////////
36
37
38 PromotedObject* PromotedObject::next() const {
39 assert(!((FreeChunk*)this)->is_free(), "Error");
40 PromotedObject* res;
41 if (UseCompressedOops) {
42 // The next pointer is a compressed oop stored in the top 32 bits
43 res = (PromotedObject*)CompressedOops::decode(_data._narrow_next);
44 } else {
45 res = (PromotedObject*)(_next & next_mask);
46 }
47 assert(oopDesc::is_oop_or_null(oop(res), true /* ignore mark word */), "Expected an oop or NULL at " PTR_FORMAT, p2i(oop(res)));
48 return res;
49 }
50
51 inline void PromotedObject::setNext(PromotedObject* x) {
|
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 #include "precompiled.hpp"
26 #include "gc/cms/compactibleFreeListSpace.hpp"
27 #include "gc/cms/promotionInfo.hpp"
28 #include "gc/shared/genOopClosures.hpp"
29 #include "oops/compressedOops.inline.hpp"
30 #include "oops/markWord.inline.hpp"
31 #include "oops/oop.inline.hpp"
32
33 /////////////////////////////////////////////////////////////////////////
34 //// PromotionInfo
35 /////////////////////////////////////////////////////////////////////////
36
37
38 PromotedObject* PromotedObject::next() const {
39 assert(!((FreeChunk*)this)->is_free(), "Error");
40 PromotedObject* res;
41 if (UseCompressedOops) {
42 // The next pointer is a compressed oop stored in the top 32 bits
43 res = (PromotedObject*)CompressedOops::decode(_data._narrow_next);
44 } else {
45 res = (PromotedObject*)(_next & next_mask);
46 }
47 assert(oopDesc::is_oop_or_null(oop(res), true /* ignore mark word */), "Expected an oop or NULL at " PTR_FORMAT, p2i(oop(res)));
48 return res;
49 }
50
51 inline void PromotedObject::setNext(PromotedObject* x) {
|