This commit is contained in:
Vladimir Kozlov 2014-01-28 12:25:34 -08:00
commit c3a0e80e0b
345 changed files with 58071 additions and 1206 deletions

View file

@ -122,7 +122,7 @@ void AdaptiveFreeList<Chunk>::return_chunk_at_head(Chunk* chunk, bool record_ret
template <class Chunk>
void AdaptiveFreeList<Chunk>::return_chunk_at_tail(Chunk* chunk) {
return_chunk_at_tail(chunk, true);
AdaptiveFreeList<Chunk>::return_chunk_at_tail(chunk, true);
}
template <class Chunk>

View file

@ -37,6 +37,9 @@
#ifdef TARGET_OS_FAMILY_windows
# include "os_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_aix
# include "os_aix.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "os_bsd.inline.hpp"
#endif

View file

@ -997,6 +997,13 @@ size_t CompactibleFreeListSpace::block_size(const HeapWord* p) const {
if (FreeChunk::indicatesFreeChunk(p)) {
volatile FreeChunk* fc = (volatile FreeChunk*)p;
size_t res = fc->size();
// Bugfix for systems with weak memory model (PPC64/IA64). The
// block's free bit was set and we have read the size of the
// block. Acquire and check the free bit again. If the block is
// still free, the read size is correct.
OrderAccess::acquire();
// If the object is still a free chunk, return the size, else it
// has been allocated so try again.
if (FreeChunk::indicatesFreeChunk(p)) {
@ -1010,6 +1017,12 @@ size_t CompactibleFreeListSpace::block_size(const HeapWord* p) const {
assert(k->is_klass(), "Should really be klass oop.");
oop o = (oop)p;
assert(o->is_oop(true /* ignore mark word */), "Should be an oop.");
// Bugfix for systems with weak memory model (PPC64/IA64).
// The object o may be an array. Acquire to make sure that the array
// size (third word) is consistent.
OrderAccess::acquire();
size_t res = o->size_given_klass(k);
res = adjustObjectSize(res);
assert(res != 0, "Block size should not be 0");
@ -1040,6 +1053,13 @@ const {
if (FreeChunk::indicatesFreeChunk(p)) {
volatile FreeChunk* fc = (volatile FreeChunk*)p;
size_t res = fc->size();
// Bugfix for systems with weak memory model (PPC64/IA64). The
// free bit of the block was set and we have read the size of
// the block. Acquire and check the free bit again. If the
// block is still free, the read size is correct.
OrderAccess::acquire();
if (FreeChunk::indicatesFreeChunk(p)) {
assert(res != 0, "Block size should not be 0");
assert(loops == 0, "Should be 0");
@ -1055,6 +1075,12 @@ const {
assert(k->is_klass(), "Should really be klass oop.");
oop o = (oop)p;
assert(o->is_oop(), "Should be an oop");
// Bugfix for systems with weak memory model (PPC64/IA64).
// The object o may be an array. Acquire to make sure that the array
// size (third word) is consistent.
OrderAccess::acquire();
size_t res = o->size_given_klass(k);
res = adjustObjectSize(res);
assert(res != 0, "Block size should not be 0");