Mercurial > hg > truffle
changeset 1993:459fad165e5e
Merge
author | johnc |
---|---|
date | Tue, 07 Dec 2010 16:44:34 -0800 |
parents | 3cd116fd11be (diff) 016a3628c885 (current diff) |
children | 6cd6d394f280 |
files | |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/oops/oop.pcgc.inline.hpp Tue Dec 07 16:47:42 2010 -0500 +++ b/src/share/vm/oops/oop.pcgc.inline.hpp Tue Dec 07 16:44:34 2010 -0800 @@ -118,12 +118,15 @@ assert(forwardPtrMark->decode_pointer() == p, "encoding must be reversable"); assert(sizeof(markOop) == sizeof(intptr_t), "CAS below requires this."); - while (!is_forwarded()) { + while (!oldMark->is_marked()) { curMark = (markOop)Atomic::cmpxchg_ptr(forwardPtrMark, &_mark, oldMark); + assert(is_forwarded(), "object should have been forwarded"); if (curMark == oldMark) { - assert(is_forwarded(), "the CAS should have succeeded."); return NULL; } + // If the CAS was unsuccessful then curMark->is_marked() + // should return true as another thread has CAS'd in another + // forwarding pointer. oldMark = curMark; } return forwardee();