Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/markOop.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | 22b8d3d181d9 |
children |
line wrap: on
line diff
--- a/src/share/vm/oops/markOop.hpp Mon Nov 12 18:11:17 2012 +0100 +++ b/src/share/vm/oops/markOop.hpp Mon Nov 12 23:14:12 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -261,9 +261,9 @@ // Should this header be preserved during a scavenge where CMS is // the old generation? // (This is basically the same body as must_be_preserved_for_promotion_failure(), - // but takes the klassOop as argument instead) - inline bool must_be_preserved_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const; - inline bool must_be_preserved_with_bias_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const; + // but takes the Klass* as argument instead) + inline bool must_be_preserved_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const; + inline bool must_be_preserved_with_bias_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const; // WARNING: The following routines are used EXCLUSIVELY by // synchronization functions. They are not really gc safe. @@ -318,7 +318,7 @@ intptr_t tmp = (intptr_t) monitor; return (markOop) (tmp | monitor_value); } - static markOop encode(JavaThread* thread, int age, int bias_epoch) { + static markOop encode(JavaThread* thread, uint age, int bias_epoch) { intptr_t tmp = (intptr_t) thread; assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer"); assert(age <= max_age, "age too large"); @@ -331,11 +331,12 @@ // age operations markOop set_marked() { return markOop((value() & ~lock_mask_in_place) | marked_value); } + markOop set_unmarked() { return markOop((value() & ~lock_mask_in_place) | unlocked_value); } - int age() const { return mask_bits(value() >> age_shift, age_mask); } - markOop set_age(int v) const { + uint age() const { return mask_bits(value() >> age_shift, age_mask); } + markOop set_age(uint v) const { assert((v & ~age_mask) == 0, "shouldn't overflow age field"); - return markOop((value() & ~age_mask_in_place) | (((intptr_t)v & age_mask) << age_shift)); + return markOop((value() & ~age_mask_in_place) | (((uintptr_t)v & age_mask) << age_shift)); } markOop incr_age() const { return age() == max_age ? markOop(this) : set_age(age() + 1); } @@ -365,9 +366,6 @@ // Recover address of oop from encoded form used in mark inline void* decode_pointer() { if (UseBiasedLocking && has_bias_pattern()) return NULL; return clear_lock_bits(); } - // see the definition in markOop.cpp for the gory details - bool should_not_be_cached() const; - // These markOops indicate cms free chunk blocks and not objects. // In 64 bit, the markOop is set to distinguish them from oops. // These are defined in 32 bit mode for vmStructs.