Merge
This commit is contained in:
commit
8e3541f4fa
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 2011, 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
|
||||
@ -437,6 +437,7 @@ jprt.my.windows.x64.test.targets = \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_G1, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParOldGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_default, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
|
||||
|
@ -331,7 +331,7 @@ constantPoolHandle ClassFileParser::parse_constant_pool(TRAPS) {
|
||||
length, CHECK_(nullHandle));
|
||||
constantPoolOop constant_pool =
|
||||
oopFactory::new_constantPool(length,
|
||||
methodOopDesc::IsSafeConc,
|
||||
oopDesc::IsSafeConc,
|
||||
CHECK_(nullHandle));
|
||||
constantPoolHandle cp (THREAD, constant_pool);
|
||||
|
||||
@ -1929,10 +1929,9 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
|
||||
}
|
||||
|
||||
// All sizing information for a methodOop is finally available, now create it
|
||||
methodOop m_oop = oopFactory::new_method(
|
||||
code_length, access_flags, linenumber_table_length,
|
||||
total_lvt_length, checked_exceptions_length,
|
||||
methodOopDesc::IsSafeConc, CHECK_(nullHandle));
|
||||
methodOop m_oop = oopFactory::new_method(code_length, access_flags, linenumber_table_length,
|
||||
total_lvt_length, checked_exceptions_length,
|
||||
oopDesc::IsSafeConc, CHECK_(nullHandle));
|
||||
methodHandle m (THREAD, m_oop);
|
||||
|
||||
ClassLoadingService::add_class_method_size(m_oop->size()*HeapWordSize);
|
||||
|
@ -1040,9 +1040,10 @@ const {
|
||||
} else {
|
||||
// must read from what 'p' points to in each loop.
|
||||
klassOop k = ((volatile oopDesc*)p)->klass_or_null();
|
||||
if (k != NULL &&
|
||||
((oopDesc*)p)->is_parsable() &&
|
||||
((oopDesc*)p)->is_conc_safe()) {
|
||||
// We trust the size of any object that has a non-NULL
|
||||
// klass and (for those in the perm gen) is parsable
|
||||
// -- irrespective of its conc_safe-ty.
|
||||
if (k != NULL && ((oopDesc*)p)->is_parsable()) {
|
||||
assert(k->is_oop(), "Should really be klass oop.");
|
||||
oop o = (oop)p;
|
||||
assert(o->is_oop(), "Should be an oop");
|
||||
@ -1051,6 +1052,7 @@ const {
|
||||
assert(res != 0, "Block size should not be 0");
|
||||
return res;
|
||||
} else {
|
||||
// May return 0 if P-bits not present.
|
||||
return c->block_size_if_printezis_bits(p);
|
||||
}
|
||||
}
|
||||
|
@ -6360,18 +6360,16 @@ size_t CMSCollector::block_size_using_printezis_bits(HeapWord* addr) const {
|
||||
// A variant of the above (block_size_using_printezis_bits()) except
|
||||
// that we return 0 if the P-bits are not yet set.
|
||||
size_t CMSCollector::block_size_if_printezis_bits(HeapWord* addr) const {
|
||||
if (_markBitMap.isMarked(addr)) {
|
||||
assert(_markBitMap.isMarked(addr + 1), "Missing Printezis bit?");
|
||||
if (_markBitMap.isMarked(addr + 1)) {
|
||||
assert(_markBitMap.isMarked(addr), "P-bit can be set only for marked objects");
|
||||
HeapWord* nextOneAddr = _markBitMap.getNextMarkedWordAddress(addr + 2);
|
||||
size_t size = pointer_delta(nextOneAddr + 1, addr);
|
||||
assert(size == CompactibleFreeListSpace::adjustObjectSize(size),
|
||||
"alignment problem");
|
||||
assert(size >= 3, "Necessary for Printezis marks to work");
|
||||
return size;
|
||||
} else {
|
||||
assert(!_markBitMap.isMarked(addr + 1), "Bit map inconsistency?");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
HeapWord* CMSCollector::next_card_start_after_block(HeapWord* addr) const {
|
||||
@ -9212,7 +9210,6 @@ bool MarkRefsIntoAndScanClosure::take_from_overflow_list() {
|
||||
|
||||
size_t MarkDeadObjectsClosure::do_blk(HeapWord* addr) {
|
||||
size_t res = _sp->block_size_no_stall(addr, _collector);
|
||||
assert(res != 0, "Should always be able to compute a size");
|
||||
if (_sp->block_is_obj(addr)) {
|
||||
if (_live_bit_map->isMarked(addr)) {
|
||||
// It can't have been dead in a previous cycle
|
||||
@ -9221,6 +9218,7 @@ size_t MarkDeadObjectsClosure::do_blk(HeapWord* addr) {
|
||||
_dead_bit_map->mark(addr); // mark the dead object
|
||||
}
|
||||
}
|
||||
// Could be 0, if the block size could not be computed without stalling.
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2011, 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
|
||||
@ -132,8 +132,7 @@ class VM_GenCollectFullConcurrent: public VM_GC_Operation {
|
||||
VM_GenCollectFullConcurrent(unsigned int gc_count_before,
|
||||
unsigned int full_gc_count_before,
|
||||
GCCause::Cause gc_cause)
|
||||
: VM_GC_Operation(gc_count_before, full_gc_count_before, true /* full */) {
|
||||
_gc_cause = gc_cause;
|
||||
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */) {
|
||||
assert(FullGCCount_lock != NULL, "Error");
|
||||
assert(UseAsyncConcMarkSweepGC, "Else will hang caller");
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2011, 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
|
||||
@ -44,7 +44,7 @@ protected:
|
||||
public:
|
||||
VM_G1OperationWithAllocRequest(unsigned int gc_count_before,
|
||||
size_t word_size)
|
||||
: VM_GC_Operation(gc_count_before),
|
||||
: VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
|
||||
_word_size(word_size), _result(NULL), _pause_succeeded(false) { }
|
||||
HeapWord* result() { return _result; }
|
||||
bool pause_succeeded() { return _pause_succeeded; }
|
||||
@ -55,9 +55,7 @@ public:
|
||||
VM_G1CollectFull(unsigned int gc_count_before,
|
||||
unsigned int full_gc_count_before,
|
||||
GCCause::Cause cause)
|
||||
: VM_GC_Operation(gc_count_before, full_gc_count_before) {
|
||||
_gc_cause = cause;
|
||||
}
|
||||
: VM_GC_Operation(gc_count_before, cause, full_gc_count_before) { }
|
||||
virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
|
||||
virtual void doit();
|
||||
virtual const char* name() const {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2011, 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
|
||||
@ -1196,11 +1196,6 @@ class PSParallelCompact : AllStatic {
|
||||
static inline void adjust_pointer(oop* p) { adjust_pointer(p, false); }
|
||||
static inline void adjust_pointer(narrowOop* p) { adjust_pointer(p, false); }
|
||||
|
||||
template <class T>
|
||||
static inline void adjust_pointer(T* p,
|
||||
HeapWord* beg_addr,
|
||||
HeapWord* end_addr);
|
||||
|
||||
// Reference Processing
|
||||
static ReferenceProcessor* const ref_processor() { return _ref_processor; }
|
||||
|
||||
@ -1408,15 +1403,6 @@ inline bool PSParallelCompact::should_update_klass(klassOop k) {
|
||||
return ((HeapWord*) k) >= dense_prefix(perm_space_id);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void PSParallelCompact::adjust_pointer(T* p,
|
||||
HeapWord* beg_addr,
|
||||
HeapWord* end_addr) {
|
||||
if (is_in((HeapWord*)p, beg_addr, end_addr)) {
|
||||
adjust_pointer(p);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
inline void
|
||||
PSParallelCompact::check_new_location(HeapWord* old_addr, HeapWord* new_addr)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2011, 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
|
||||
@ -34,7 +34,7 @@
|
||||
// The following methods are used by the parallel scavenge collector
|
||||
VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size,
|
||||
bool is_tlab, unsigned int gc_count) :
|
||||
VM_GC_Operation(gc_count),
|
||||
VM_GC_Operation(gc_count, GCCause::_allocation_failure),
|
||||
_size(size),
|
||||
_is_tlab(is_tlab),
|
||||
_result(NULL)
|
||||
@ -57,7 +57,7 @@ void VM_ParallelGCFailedAllocation::doit() {
|
||||
|
||||
VM_ParallelGCFailedPermanentAllocation::VM_ParallelGCFailedPermanentAllocation(size_t size,
|
||||
unsigned int gc_count, unsigned int full_gc_count) :
|
||||
VM_GC_Operation(gc_count, full_gc_count, true /* full */),
|
||||
VM_GC_Operation(gc_count, GCCause::_allocation_failure, full_gc_count, true /* full */),
|
||||
_size(size),
|
||||
_result(NULL)
|
||||
{
|
||||
@ -80,9 +80,8 @@ void VM_ParallelGCFailedPermanentAllocation::doit() {
|
||||
VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count,
|
||||
unsigned int full_gc_count,
|
||||
GCCause::Cause gc_cause) :
|
||||
VM_GC_Operation(gc_count, full_gc_count, true /* full */)
|
||||
VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */)
|
||||
{
|
||||
_gc_cause = gc_cause;
|
||||
}
|
||||
|
||||
void VM_ParallelGCSystemGC::doit() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2011, 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
|
||||
@ -87,6 +87,8 @@ bool VM_GC_Operation::skip_operation() const {
|
||||
|
||||
bool VM_GC_Operation::doit_prologue() {
|
||||
assert(Thread::current()->is_Java_thread(), "just checking");
|
||||
assert(((_gc_cause != GCCause::_no_gc) &&
|
||||
(_gc_cause != GCCause::_no_cause_specified)), "Illegal GCCause");
|
||||
|
||||
acquire_pending_list_lock();
|
||||
// If the GC count has changed someone beat us to the collection
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2011, 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
|
||||
@ -85,6 +85,7 @@ class VM_GC_Operation: public VM_Operation {
|
||||
|
||||
public:
|
||||
VM_GC_Operation(unsigned int gc_count_before,
|
||||
GCCause::Cause _cause,
|
||||
unsigned int full_gc_count_before = 0,
|
||||
bool full = false) {
|
||||
_full = full;
|
||||
@ -92,7 +93,7 @@ class VM_GC_Operation: public VM_Operation {
|
||||
_gc_count_before = gc_count_before;
|
||||
|
||||
// A subclass constructor will likely overwrite the following
|
||||
_gc_cause = GCCause::_no_cause_specified;
|
||||
_gc_cause = _cause;
|
||||
|
||||
_gc_locked = false;
|
||||
|
||||
@ -136,6 +137,7 @@ class VM_GC_HeapInspection: public VM_GC_Operation {
|
||||
VM_GC_HeapInspection(outputStream* out, bool request_full_gc,
|
||||
bool need_prologue) :
|
||||
VM_GC_Operation(0 /* total collections, dummy, ignored */,
|
||||
GCCause::_heap_inspection /* GC Cause */,
|
||||
0 /* total full collections, dummy, ignored */,
|
||||
request_full_gc) {
|
||||
_out = out;
|
||||
@ -160,7 +162,7 @@ class VM_GenCollectForAllocation: public VM_GC_Operation {
|
||||
VM_GenCollectForAllocation(size_t size,
|
||||
bool tlab,
|
||||
unsigned int gc_count_before)
|
||||
: VM_GC_Operation(gc_count_before),
|
||||
: VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
|
||||
_size(size),
|
||||
_tlab(tlab) {
|
||||
_res = NULL;
|
||||
@ -182,9 +184,8 @@ class VM_GenCollectFull: public VM_GC_Operation {
|
||||
unsigned int full_gc_count_before,
|
||||
GCCause::Cause gc_cause,
|
||||
int max_level)
|
||||
: VM_GC_Operation(gc_count_before, full_gc_count_before, true /* full */),
|
||||
_max_level(max_level)
|
||||
{ _gc_cause = gc_cause; }
|
||||
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
|
||||
_max_level(max_level) { }
|
||||
~VM_GenCollectFull() {}
|
||||
virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
|
||||
virtual void doit();
|
||||
@ -199,7 +200,7 @@ class VM_GenCollectForPermanentAllocation: public VM_GC_Operation {
|
||||
unsigned int gc_count_before,
|
||||
unsigned int full_gc_count_before,
|
||||
GCCause::Cause gc_cause)
|
||||
: VM_GC_Operation(gc_count_before, full_gc_count_before, true),
|
||||
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
|
||||
_size(size) {
|
||||
_res = NULL;
|
||||
_gc_cause = gc_cause;
|
||||
|
@ -100,8 +100,7 @@ void CollectedHeap::check_for_bad_heap_word_value(HeapWord* addr, size_t size) {
|
||||
}
|
||||
}
|
||||
|
||||
void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
|
||||
{
|
||||
void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size) {
|
||||
if (CheckMemoryInitialization && ZapUnusedHeapArea) {
|
||||
for (size_t slot = 0; slot < size; slot += 1) {
|
||||
assert((*(intptr_t*) (addr + slot)) == ((intptr_t) badHeapWordVal),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2011, 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
|
||||
@ -92,28 +92,3 @@ const char* GCCause::to_string(GCCause::Cause cause) {
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
bool GCCause::is_for_full_collection(GCCause::Cause cause) {
|
||||
bool result;
|
||||
|
||||
// There are more GCCause::Cause types than listed here.
|
||||
// For brevity, we list only those that cause full collections.
|
||||
switch (cause) {
|
||||
case _allocation_failure:
|
||||
case _tenured_generation_full:
|
||||
case _permanent_generation_full:
|
||||
case _cms_generation_full:
|
||||
case _last_ditch_collection:
|
||||
result = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2011, 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
|
||||
@ -85,8 +85,6 @@ class GCCause : public AllStatic {
|
||||
|
||||
// Return a string describing the GCCause.
|
||||
static const char* to_string(GCCause::Cause cause);
|
||||
// Return true if the GCCause is for a full collection.
|
||||
static bool is_for_full_collection(GCCause::Cause cause) PRODUCT_RETURN0;
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_GC_INTERFACE_GCCAUSE_HPP
|
||||
|
@ -67,13 +67,11 @@ void Rewriter::compute_index_maps() {
|
||||
|
||||
|
||||
// Creates a constant pool cache given a CPC map
|
||||
// This creates the constant pool cache initially in a state
|
||||
// that is unsafe for concurrent GC processing but sets it to
|
||||
// a safe mode before the constant pool cache is returned.
|
||||
void Rewriter::make_constant_pool_cache(TRAPS) {
|
||||
const int length = _cp_cache_map.length();
|
||||
constantPoolCacheOop cache =
|
||||
oopFactory::new_constantPoolCache(length, methodOopDesc::IsUnsafeConc, CHECK);
|
||||
oopFactory::new_constantPoolCache(length, CHECK);
|
||||
No_Safepoint_Verifier nsv;
|
||||
cache->initialize(_cp_cache_map);
|
||||
|
||||
// Don't bother with the next pass if there is no JVM_CONSTANT_InvokeDynamic.
|
||||
|
@ -92,12 +92,21 @@ objArrayOop oopFactory::new_objArray(klassOop klass, int length, TRAPS) {
|
||||
}
|
||||
}
|
||||
|
||||
objArrayOop oopFactory::new_system_objArray(int length, TRAPS) {
|
||||
objArrayOop oopFactory::new_system_objArray(int length, bool in_perm_gen, TRAPS) {
|
||||
int size = objArrayOopDesc::object_size(length);
|
||||
KlassHandle klass (THREAD, Universe::systemObjArrayKlassObj());
|
||||
objArrayOop o = (objArrayOop)
|
||||
Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL);
|
||||
oop o;
|
||||
if (in_perm_gen) {
|
||||
o = Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL);
|
||||
} else {
|
||||
o = Universe::heap()->array_allocate(klass, size, length, CHECK_NULL);
|
||||
}
|
||||
// initialization not needed, allocated cleared
|
||||
return (objArrayOop) o;
|
||||
}
|
||||
|
||||
objArrayOop oopFactory::new_system_objArray(int length, TRAPS) {
|
||||
objArrayOop o = oopFactory::new_system_objArray(length, true, CHECK_NULL);
|
||||
return o;
|
||||
}
|
||||
|
||||
@ -111,10 +120,9 @@ constantPoolOop oopFactory::new_constantPool(int length,
|
||||
|
||||
|
||||
constantPoolCacheOop oopFactory::new_constantPoolCache(int length,
|
||||
bool is_conc_safe,
|
||||
TRAPS) {
|
||||
constantPoolCacheKlass* ck = constantPoolCacheKlass::cast(Universe::constantPoolCacheKlassObj());
|
||||
return ck->allocate(length, is_conc_safe, CHECK_NULL);
|
||||
return ck->allocate(length, CHECK_NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,7 +69,6 @@ class oopFactory: AllStatic {
|
||||
bool is_conc_safe,
|
||||
TRAPS);
|
||||
static constantPoolCacheOop new_constantPoolCache(int length,
|
||||
bool is_conc_safe,
|
||||
TRAPS);
|
||||
|
||||
// Instance classes
|
||||
@ -103,6 +102,7 @@ public:
|
||||
|
||||
// System object arrays
|
||||
static objArrayOop new_system_objArray(int length, TRAPS);
|
||||
static objArrayOop new_system_objArray(int length, bool in_perm_gen, TRAPS);
|
||||
|
||||
// Regular object arrays
|
||||
static objArrayOop new_objArray(klassOop klass, int length, TRAPS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -128,27 +128,6 @@ int arrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
}
|
||||
return klassKlass::oop_update_pointers(cm, obj);
|
||||
}
|
||||
|
||||
int
|
||||
arrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
assert(obj->is_klass(), "must be klass");
|
||||
arrayKlass* ak = arrayKlass::cast(klassOop(obj));
|
||||
|
||||
oop* p;
|
||||
p = ak->adr_component_mirror();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = ak->adr_lower_dimension();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = ak->adr_higher_dimension();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
|
||||
{
|
||||
HandleMark hm;
|
||||
ak->vtable()->oop_update_pointers(cm, beg_addr, end_addr);
|
||||
}
|
||||
return klassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
// Printing
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2011, 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
|
||||
@ -145,21 +145,6 @@ int compiledICHolderKlass::oop_update_pointers(ParCompactionManager* cm,
|
||||
PSParallelCompact::adjust_pointer(c->adr_holder_klass());
|
||||
return c->object_size();
|
||||
}
|
||||
|
||||
int compiledICHolderKlass::oop_update_pointers(ParCompactionManager* cm,
|
||||
oop obj,
|
||||
HeapWord* beg_addr,
|
||||
HeapWord* end_addr) {
|
||||
assert(obj->is_compiledICHolder(), "must be compiledICHolder");
|
||||
compiledICHolderOop c = compiledICHolderOop(obj);
|
||||
|
||||
oop* p;
|
||||
p = c->adr_holder_method();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = c->adr_holder_klass();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
return c->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
// Printing
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011, 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
|
||||
@ -184,21 +184,6 @@ int constMethodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
}
|
||||
return cm_oop->object_size();
|
||||
}
|
||||
|
||||
int constMethodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr,
|
||||
HeapWord* end_addr) {
|
||||
assert(obj->is_constMethod(), "should be constMethod");
|
||||
constMethodOop cm_oop = constMethodOop(obj);
|
||||
|
||||
oop* const beg_oop = MAX2((oop*)beg_addr, cm_oop->oop_block_beg());
|
||||
oop* const end_oop = MIN2((oop*)end_addr, cm_oop->oop_block_end());
|
||||
for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
|
||||
PSParallelCompact::adjust_pointer(cur_oop);
|
||||
}
|
||||
|
||||
return cm_oop->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
// Printing
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -55,26 +55,35 @@
|
||||
constantPoolOop constantPoolKlass::allocate(int length, bool is_conc_safe, TRAPS) {
|
||||
int size = constantPoolOopDesc::object_size(length);
|
||||
KlassHandle klass (THREAD, as_klassOop());
|
||||
constantPoolOop c =
|
||||
(constantPoolOop)CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
|
||||
assert(klass()->is_oop(), "Can't be null, else handlizing of c below won't work");
|
||||
constantPoolHandle pool;
|
||||
{
|
||||
constantPoolOop c =
|
||||
(constantPoolOop)CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
|
||||
assert(c->klass_or_null() != NULL, "Handlizing below won't work");
|
||||
pool = constantPoolHandle(THREAD, c);
|
||||
}
|
||||
|
||||
c->set_length(length);
|
||||
c->set_tags(NULL);
|
||||
c->set_cache(NULL);
|
||||
c->set_operands(NULL);
|
||||
c->set_pool_holder(NULL);
|
||||
c->set_flags(0);
|
||||
pool->set_length(length);
|
||||
pool->set_tags(NULL);
|
||||
pool->set_cache(NULL);
|
||||
pool->set_operands(NULL);
|
||||
pool->set_pool_holder(NULL);
|
||||
pool->set_flags(0);
|
||||
// only set to non-zero if constant pool is merged by RedefineClasses
|
||||
c->set_orig_length(0);
|
||||
pool->set_orig_length(0);
|
||||
// if constant pool may change during RedefineClasses, it is created
|
||||
// unsafe for GC concurrent processing.
|
||||
c->set_is_conc_safe(is_conc_safe);
|
||||
pool->set_is_conc_safe(is_conc_safe);
|
||||
// all fields are initialized; needed for GC
|
||||
|
||||
// Note: because we may be in this "conc_unsafe" state when allocating
|
||||
// t_oop below, which may in turn cause a GC, it is imperative that our
|
||||
// size be correct, consistent and henceforth stable, at this stage.
|
||||
assert(pool->is_oop() && pool->is_parsable(), "Else size() below is unreliable");
|
||||
assert(size == pool->size(), "size() is wrong");
|
||||
|
||||
// initialize tag array
|
||||
// Note: cannot introduce constant pool handle before since it is not
|
||||
// completely initialized (no class) -> would cause assertion failure
|
||||
constantPoolHandle pool (THREAD, c);
|
||||
typeArrayOop t_oop = oopFactory::new_permanent_byteArray(length, CHECK_NULL);
|
||||
typeArrayHandle tags (THREAD, t_oop);
|
||||
for (int index = 0; index < length; index++) {
|
||||
@ -82,6 +91,8 @@ constantPoolOop constantPoolKlass::allocate(int length, bool is_conc_safe, TRAPS
|
||||
}
|
||||
pool->set_tags(tags());
|
||||
|
||||
// Check that our size was stable at its old value.
|
||||
assert(size == pool->size(), "size() changed");
|
||||
return pool();
|
||||
}
|
||||
|
||||
@ -271,40 +282,6 @@ int constantPoolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
return cp->object_size();
|
||||
}
|
||||
|
||||
int
|
||||
constantPoolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
assert (obj->is_constantPool(), "obj must be constant pool");
|
||||
constantPoolOop cp = (constantPoolOop) obj;
|
||||
|
||||
// If the tags array is null we are in the middle of allocating this constant
|
||||
// pool.
|
||||
if (cp->tags() != NULL) {
|
||||
oop* base = (oop*)cp->base();
|
||||
oop* const beg_oop = MAX2((oop*)beg_addr, base);
|
||||
oop* const end_oop = MIN2((oop*)end_addr, base + cp->length());
|
||||
const size_t beg_idx = pointer_delta(beg_oop, base, sizeof(oop*));
|
||||
const size_t end_idx = pointer_delta(end_oop, base, sizeof(oop*));
|
||||
for (size_t cur_idx = beg_idx; cur_idx < end_idx; ++cur_idx, ++base) {
|
||||
if (cp->is_pointer_entry(int(cur_idx))) {
|
||||
PSParallelCompact::adjust_pointer(base);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
oop* p;
|
||||
p = cp->tags_addr();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = cp->cache_addr();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = cp->operands_addr();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = cp->pool_holder_addr();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
|
||||
return cp->object_size();
|
||||
}
|
||||
|
||||
void constantPoolKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
|
||||
assert(obj->is_constantPool(), "should be constant pool");
|
||||
constantPoolOop cp = (constantPoolOop) obj;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2011, 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
|
||||
@ -49,43 +49,31 @@ int constantPoolCacheKlass::oop_size(oop obj) const {
|
||||
|
||||
|
||||
constantPoolCacheOop constantPoolCacheKlass::allocate(int length,
|
||||
bool is_conc_safe,
|
||||
TRAPS) {
|
||||
// allocate memory
|
||||
int size = constantPoolCacheOopDesc::object_size(length);
|
||||
|
||||
KlassHandle klass (THREAD, as_klassOop());
|
||||
|
||||
// This is the original code. The code from permanent_obj_allocate()
|
||||
// was in-lined to allow the setting of is_conc_safe before the klass
|
||||
// is installed.
|
||||
// Commented out below is the original code. The code from
|
||||
// permanent_obj_allocate() was in-lined so that we could
|
||||
// set the _length field, necessary to correctly compute its
|
||||
// size(), before setting its klass word further below.
|
||||
// constantPoolCacheOop cache = (constantPoolCacheOop)
|
||||
// CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
|
||||
|
||||
oop obj = CollectedHeap::permanent_obj_allocate_no_klass_install(klass, size, CHECK_NULL);
|
||||
constantPoolCacheOop cache = (constantPoolCacheOop) obj;
|
||||
cache->set_is_conc_safe(is_conc_safe);
|
||||
// The store to is_conc_safe must be visible before the klass
|
||||
// is set. This should be done safely because _is_conc_safe has
|
||||
// been declared volatile. If there are any problems, consider adding
|
||||
// OrderAccess::storestore();
|
||||
CollectedHeap::post_allocation_install_obj_klass(klass, obj, size);
|
||||
NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value((HeapWord*) obj,
|
||||
size));
|
||||
|
||||
// The length field affects the size of the object. The allocation
|
||||
// above allocates the correct size (see calculation of "size") but
|
||||
// the size() method of the constant pool cache oop will not reflect
|
||||
// that size until the correct length is set.
|
||||
cache->set_length(length);
|
||||
|
||||
// The store of the length must be visible before is_conc_safe is
|
||||
// set to a safe state.
|
||||
// This should be done safely because _is_conc_safe has
|
||||
// been declared volatile. If there are any problems, consider adding
|
||||
// OrderAccess::storestore();
|
||||
cache->set_is_conc_safe(methodOopDesc::IsSafeConc);
|
||||
constantPoolCacheOop cache = (constantPoolCacheOop) obj;
|
||||
assert(!UseConcMarkSweepGC || obj->klass_or_null() == NULL,
|
||||
"klass should be NULL here when using CMS");
|
||||
cache->set_length(length); // should become visible before klass is set below.
|
||||
cache->set_constant_pool(NULL);
|
||||
|
||||
OrderAccess::storestore();
|
||||
obj->set_klass(klass());
|
||||
assert(cache->size() == size, "Incorrect cache->size()");
|
||||
return cache;
|
||||
}
|
||||
|
||||
@ -176,11 +164,6 @@ int constantPoolCacheKlass::oop_adjust_pointers(oop obj) {
|
||||
return size;
|
||||
}
|
||||
|
||||
bool constantPoolCacheKlass::oop_is_conc_safe(oop obj) const {
|
||||
assert(obj->is_constantPoolCache(), "should be constant pool");
|
||||
return constantPoolCacheOop(obj)->is_conc_safe();
|
||||
}
|
||||
|
||||
#ifndef SERIALGC
|
||||
void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm,
|
||||
oop obj) {
|
||||
@ -220,25 +203,6 @@ constantPoolCacheKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
|
||||
return cache->object_size();
|
||||
}
|
||||
|
||||
int
|
||||
constantPoolCacheKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr,
|
||||
HeapWord* end_addr) {
|
||||
assert(obj->is_constantPoolCache(), "obj must be constant pool cache");
|
||||
constantPoolCacheOop cache = (constantPoolCacheOop)obj;
|
||||
|
||||
// Iteration over constant pool cache instance variables
|
||||
oop* p;
|
||||
p = (oop*)cache->constant_pool_addr();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
|
||||
// Iteration over constant pool cache entries
|
||||
for (int i = 0; i < cache->length(); ++i) {
|
||||
cache->entry_at(i)->update_pointers(beg_addr, end_addr);
|
||||
}
|
||||
return cache->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
void constantPoolCacheKlass::oop_print_on(oop obj, outputStream* st) {
|
||||
|
@ -39,7 +39,7 @@ class constantPoolCacheKlass: public Klass {
|
||||
|
||||
// Allocation
|
||||
DEFINE_ALLOCATE_PERMANENT(constantPoolCacheKlass);
|
||||
constantPoolCacheOop allocate(int length, bool is_conc_safe, TRAPS);
|
||||
constantPoolCacheOop allocate(int length, TRAPS);
|
||||
static klassOop create_klass(TRAPS);
|
||||
|
||||
// Casting from klassOop
|
||||
@ -55,7 +55,6 @@ class constantPoolCacheKlass: public Klass {
|
||||
// Garbage collection
|
||||
void oop_follow_contents(oop obj);
|
||||
int oop_adjust_pointers(oop obj);
|
||||
virtual bool oop_is_conc_safe(oop obj) const;
|
||||
|
||||
// Parallel Scavenge and Parallel Old
|
||||
PARALLEL_GC_DECLS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2011, 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
|
||||
@ -368,16 +368,6 @@ void ConstantPoolCacheEntry::update_pointers() {
|
||||
PSParallelCompact::adjust_pointer((oop*)&_f2);
|
||||
}
|
||||
}
|
||||
|
||||
void ConstantPoolCacheEntry::update_pointers(HeapWord* beg_addr,
|
||||
HeapWord* end_addr) {
|
||||
assert(in_words(size()) == 4, "check code below - may need adjustment");
|
||||
// field[1] is always oop or NULL
|
||||
PSParallelCompact::adjust_pointer((oop*)&_f1, beg_addr, end_addr);
|
||||
if (is_vfinal()) {
|
||||
PSParallelCompact::adjust_pointer((oop*)&_f2, beg_addr, end_addr);
|
||||
}
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
// RedefineClasses() API support:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2011, 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
|
||||
@ -287,7 +287,6 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
|
||||
#endif // SERIALGC
|
||||
|
||||
void update_pointers();
|
||||
void update_pointers(HeapWord* beg_addr, HeapWord* end_addr);
|
||||
|
||||
// RedefineClasses() API support:
|
||||
// If this constantPoolCacheEntry refers to old_method then update it
|
||||
@ -321,9 +320,6 @@ class constantPoolCacheOopDesc: public oopDesc {
|
||||
private:
|
||||
int _length;
|
||||
constantPoolOop _constant_pool; // the corresponding constant pool
|
||||
// If true, safe for concurrent GC processing,
|
||||
// Set unconditionally in constantPoolCacheKlass::allocate()
|
||||
volatile bool _is_conc_safe;
|
||||
|
||||
// Sizing
|
||||
debug_only(friend class ClassVerifier;)
|
||||
@ -390,12 +386,6 @@ class constantPoolCacheOopDesc: public oopDesc {
|
||||
return entry_at(primary_index);
|
||||
}
|
||||
|
||||
// GC support
|
||||
// If the _length field has not been set, the size of the
|
||||
// constantPoolCache cannot be correctly calculated.
|
||||
bool is_conc_safe() { return _is_conc_safe; }
|
||||
void set_is_conc_safe(bool v) { _is_conc_safe = v; }
|
||||
|
||||
// Code generation
|
||||
static ByteSize base_offset() { return in_ByteSize(sizeof(constantPoolCacheOopDesc)); }
|
||||
static ByteSize entry_offset(int raw_index) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -1736,14 +1736,6 @@ void instanceKlass::update_static_fields() {
|
||||
PSParallelCompact::adjust_pointer(p), \
|
||||
assert_nothing)
|
||||
}
|
||||
|
||||
void instanceKlass::update_static_fields(HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
InstanceKlass_BOUNDED_OOP_ITERATE( \
|
||||
start_of_static_fields(), static_oop_field_size(), \
|
||||
beg_addr, end_addr, \
|
||||
PSParallelCompact::adjust_pointer(p), \
|
||||
assert_nothing )
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
void instanceKlass::oop_follow_contents(oop obj) {
|
||||
@ -1876,15 +1868,6 @@ int instanceKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
return size_helper();
|
||||
}
|
||||
|
||||
int instanceKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
InstanceKlass_BOUNDED_OOP_MAP_ITERATE( \
|
||||
obj, beg_addr, end_addr, \
|
||||
PSParallelCompact::adjust_pointer(p), \
|
||||
assert_nothing)
|
||||
return size_helper();
|
||||
}
|
||||
|
||||
void instanceKlass::push_static_fields(PSPromotionManager* pm) {
|
||||
InstanceKlass_OOP_ITERATE( \
|
||||
start_of_static_fields(), static_oop_field_size(), \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -740,7 +740,6 @@ class instanceKlass: public Klass {
|
||||
void follow_static_fields(ParCompactionManager* cm);
|
||||
void copy_static_fields(ParCompactionManager* cm);
|
||||
void update_static_fields();
|
||||
void update_static_fields(HeapWord* beg_addr, HeapWord* end_addr);
|
||||
#endif // SERIALGC
|
||||
|
||||
// Naming
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -353,35 +353,6 @@ int instanceKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
return ik->object_size();
|
||||
}
|
||||
|
||||
int instanceKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr,
|
||||
HeapWord* end_addr) {
|
||||
assert(obj->is_klass(),"must be a klass");
|
||||
assert(klassOop(obj)->klass_part()->oop_is_instance_slow(),
|
||||
"must be instance klass");
|
||||
|
||||
instanceKlass* ik = instanceKlass::cast(klassOop(obj));
|
||||
ik->update_static_fields(beg_addr, end_addr);
|
||||
ik->vtable()->oop_update_pointers(cm, beg_addr, end_addr);
|
||||
ik->itable()->oop_update_pointers(cm, beg_addr, end_addr);
|
||||
|
||||
oop* const beg_oop = MAX2((oop*)beg_addr, ik->oop_block_beg());
|
||||
oop* const end_oop = MIN2((oop*)end_addr, ik->oop_block_end());
|
||||
for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
|
||||
PSParallelCompact::adjust_pointer(cur_oop);
|
||||
}
|
||||
|
||||
// The oop_map_cache, jni_ids and jni_id_map are allocated from the C heap,
|
||||
// and so don't lie within any 'Chunk' boundaries. Update them when the
|
||||
// lowest addressed oop in the instanceKlass 'oop_block' is updated.
|
||||
if (beg_oop == ik->oop_block_beg()) {
|
||||
OopClosure* closure = PSParallelCompact::adjust_root_pointer_closure();
|
||||
iterate_c_heap_oops(ik, closure);
|
||||
}
|
||||
|
||||
klassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
|
||||
return ik->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
klassOop
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -344,33 +344,6 @@ int instanceRefKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
}
|
||||
return size_helper();
|
||||
}
|
||||
|
||||
|
||||
template <class T> void
|
||||
specialized_oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
T* p;
|
||||
T* referent_addr = p = (T*)java_lang_ref_Reference::referent_addr(obj);
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
T* next_addr = p = (T*)java_lang_ref_Reference::next_addr(obj);
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
T* discovered_addr = p = (T*)java_lang_ref_Reference::discovered_addr(obj);
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
debug_only(trace_reference_gc("instanceRefKlass::oop_update_ptrs", obj,
|
||||
referent_addr, next_addr, discovered_addr);)
|
||||
}
|
||||
|
||||
int
|
||||
instanceRefKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
instanceKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
|
||||
if (UseCompressedOops) {
|
||||
specialized_oop_update_pointers<narrowOop>(cm, obj, beg_addr, end_addr);
|
||||
} else {
|
||||
specialized_oop_update_pointers<oop>(cm, obj, beg_addr, end_addr);
|
||||
}
|
||||
return size_helper();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
void instanceRefKlass::update_nonstatic_oop_maps(klassOop k) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -188,19 +188,6 @@ int klassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
|
||||
return oop_size(obj);
|
||||
}
|
||||
|
||||
int klassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
Klass* k = Klass::cast(klassOop(obj));
|
||||
|
||||
oop* const beg_oop = MAX2((oop*)beg_addr, k->oop_block_beg());
|
||||
oop* const end_oop = MIN2((oop*)end_addr, k->oop_block_end());
|
||||
for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
|
||||
PSParallelCompact::adjust_pointer(cur_oop);
|
||||
}
|
||||
|
||||
return oop_size(obj);
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2011, 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
|
||||
@ -37,17 +37,13 @@
|
||||
objects that do (or may) cross chunk boundaries; it updates only those \
|
||||
oops that are in the region [beg_addr, end_addr). */ \
|
||||
virtual void oop_follow_contents(ParCompactionManager* cm, oop obj); \
|
||||
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj); \
|
||||
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj, \
|
||||
HeapWord* beg_addr, HeapWord* end_addr);
|
||||
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj);
|
||||
|
||||
// Pure virtual version for klass.hpp
|
||||
#define PARALLEL_GC_DECLS_PV \
|
||||
virtual void oop_push_contents(PSPromotionManager* pm, oop obj) = 0; \
|
||||
virtual void oop_follow_contents(ParCompactionManager* cm, oop obj) = 0; \
|
||||
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj) = 0; \
|
||||
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj, \
|
||||
HeapWord* beg_addr, HeapWord* end_addr) = 0;
|
||||
virtual int oop_update_pointers(ParCompactionManager* cm, oop obj) = 0;
|
||||
#else // SERIALGC
|
||||
#define PARALLEL_GC_DECLS
|
||||
#define PARALLEL_GC_DECLS_PV
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -677,25 +677,6 @@ void klassVtable::oop_update_pointers(ParCompactionManager* cm) {
|
||||
PSParallelCompact::adjust_pointer(adr_method_at(i));
|
||||
}
|
||||
}
|
||||
|
||||
void klassVtable::oop_update_pointers(ParCompactionManager* cm,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
const int n = length();
|
||||
const int entry_size = vtableEntry::size();
|
||||
|
||||
int beg_idx = 0;
|
||||
HeapWord* const method_0 = (HeapWord*)adr_method_at(0);
|
||||
if (beg_addr > method_0) {
|
||||
// it's safe to use cast, as we have guarantees on vtable size to be sane
|
||||
beg_idx = int((pointer_delta(beg_addr, method_0) + entry_size - 1) / entry_size);
|
||||
}
|
||||
|
||||
oop* const beg_oop = adr_method_at(beg_idx);
|
||||
oop* const end_oop = MIN2((oop*)end_addr, adr_method_at(n));
|
||||
for (oop* cur_oop = beg_oop; cur_oop < end_oop; cur_oop += entry_size) {
|
||||
PSParallelCompact::adjust_pointer(cur_oop);
|
||||
}
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
// Iterators
|
||||
@ -820,25 +801,6 @@ void klassItable::oop_update_pointers(ParCompactionManager* cm) {
|
||||
ime++;
|
||||
}
|
||||
}
|
||||
|
||||
void klassItable::oop_update_pointers(ParCompactionManager* cm,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
// offset table
|
||||
itableOffsetEntry* ioe = offset_entry(0);
|
||||
for(int i = 0; i < _size_offset_table; i++) {
|
||||
oop* p = (oop*)&ioe->_interface;
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
ioe++;
|
||||
}
|
||||
|
||||
// method table
|
||||
itableMethodEntry* ime = method_entry(0);
|
||||
for(int j = 0; j < _size_method_table; j++) {
|
||||
oop* p = (oop*)&ime->_method;
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
ime++;
|
||||
}
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
// Iterators
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -99,8 +99,6 @@ class klassVtable : public ResourceObj {
|
||||
// Parallel Old
|
||||
void oop_follow_contents(ParCompactionManager* cm);
|
||||
void oop_update_pointers(ParCompactionManager* cm);
|
||||
void oop_update_pointers(ParCompactionManager* cm,
|
||||
HeapWord* beg_addr, HeapWord* end_addr);
|
||||
#endif // SERIALGC
|
||||
|
||||
// Iterators
|
||||
@ -295,8 +293,6 @@ class klassItable : public ResourceObj {
|
||||
// Parallel Old
|
||||
void oop_follow_contents(ParCompactionManager* cm);
|
||||
void oop_update_pointers(ParCompactionManager* cm);
|
||||
void oop_update_pointers(ParCompactionManager* cm,
|
||||
HeapWord* beg_addr, HeapWord* end_addr);
|
||||
#endif // SERIALGC
|
||||
|
||||
// Iterators
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2011, 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
|
||||
@ -188,25 +188,6 @@ int methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
}
|
||||
return m->object_size();
|
||||
}
|
||||
|
||||
int
|
||||
methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
assert(obj->is_methodData(), "should be method data");
|
||||
|
||||
oop* p;
|
||||
methodDataOop m = methodDataOop(obj);
|
||||
|
||||
p = m->adr_method();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
|
||||
ResourceMark rm;
|
||||
ProfileData* data;
|
||||
for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) {
|
||||
data->update_pointers(beg_addr, end_addr);
|
||||
}
|
||||
return m->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -271,17 +271,6 @@ void ReceiverTypeData::update_pointers() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ReceiverTypeData::update_pointers(HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
// The loop bounds could be computed based on beg_addr/end_addr and the
|
||||
// boundary test hoisted outside the loop (see klassVTable for an example);
|
||||
// however, row_limit() is small enough (2) to make that less efficient.
|
||||
for (uint row = 0; row < row_limit(); row++) {
|
||||
if (receiver_unchecked(row) != NULL) {
|
||||
PSParallelCompact::adjust_pointer(adr_receiver(row), beg_addr, end_addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2011, 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
|
||||
@ -452,7 +452,6 @@ public:
|
||||
// Parallel old support
|
||||
virtual void follow_contents(ParCompactionManager* cm) {}
|
||||
virtual void update_pointers() {}
|
||||
virtual void update_pointers(HeapWord* beg_addr, HeapWord* end_addr) {}
|
||||
#endif // SERIALGC
|
||||
|
||||
// CI translation: ProfileData can represent both MethodDataOop data
|
||||
@ -748,7 +747,6 @@ public:
|
||||
// Parallel old support
|
||||
virtual void follow_contents(ParCompactionManager* cm);
|
||||
virtual void update_pointers();
|
||||
virtual void update_pointers(HeapWord* beg_addr, HeapWord* end_addr);
|
||||
#endif // SERIALGC
|
||||
|
||||
oop* adr_receiver(uint row) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -214,27 +214,6 @@ int methodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
#endif // COMPILER2
|
||||
return m->object_size();
|
||||
}
|
||||
|
||||
int methodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
assert(obj->is_method(), "should be method");
|
||||
|
||||
oop* p;
|
||||
methodOop m = methodOop(obj);
|
||||
|
||||
p = m->adr_constMethod();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = m->adr_constants();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
|
||||
#ifdef COMPILER2
|
||||
if (m->method_data() != NULL) {
|
||||
p = m->adr_method_data();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
}
|
||||
#endif // COMPILER2
|
||||
return m->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -985,9 +985,11 @@ methodHandle methodOopDesc:: clone_with_new_data(methodHandle m, u_char* new_cod
|
||||
IsUnsafeConc,
|
||||
CHECK_(methodHandle()));
|
||||
methodHandle newm (THREAD, newm_oop);
|
||||
NOT_PRODUCT(int nmsz = newm->is_parsable() ? newm->size() : -1;)
|
||||
int new_method_size = newm->method_size();
|
||||
// Create a shallow copy of methodOopDesc part, but be careful to preserve the new constMethodOop
|
||||
constMethodOop newcm = newm->constMethod();
|
||||
NOT_PRODUCT(int ncmsz = newcm->is_parsable() ? newcm->size() : -1;)
|
||||
int new_const_method_size = newm->constMethod()->object_size();
|
||||
|
||||
memcpy(newm(), m(), sizeof(methodOopDesc));
|
||||
@ -999,9 +1001,19 @@ methodHandle methodOopDesc:: clone_with_new_data(methodHandle m, u_char* new_cod
|
||||
// or concurrent marking but those phases will be correct. Setting and
|
||||
// resetting is done in preference to a careful copying into newcm to
|
||||
// avoid having to know the precise layout of a constMethodOop.
|
||||
m->constMethod()->set_is_conc_safe(false);
|
||||
m->constMethod()->set_is_conc_safe(oopDesc::IsUnsafeConc);
|
||||
assert(m->constMethod()->is_parsable(), "Should remain parsable");
|
||||
|
||||
// NOTE: this is a reachable object that transiently signals "conc_unsafe"
|
||||
// However, no allocations are done during this window
|
||||
// during which it is tagged conc_unsafe, so we are assured that any concurrent
|
||||
// thread will not wait forever for the object to revert to "conc_safe".
|
||||
// Further, any such conc_unsafe object will indicate a stable size
|
||||
// through the transition.
|
||||
memcpy(newcm, m->constMethod(), sizeof(constMethodOopDesc));
|
||||
m->constMethod()->set_is_conc_safe(true);
|
||||
m->constMethod()->set_is_conc_safe(oopDesc::IsSafeConc);
|
||||
assert(m->constMethod()->is_parsable(), "Should remain parsable");
|
||||
|
||||
// Reset correct method/const method, method size, and parameter info
|
||||
newcm->set_method(newm());
|
||||
newm->set_constMethod(newcm);
|
||||
@ -1035,6 +1047,8 @@ methodHandle methodOopDesc:: clone_with_new_data(methodHandle m, u_char* new_cod
|
||||
|
||||
// Only set is_conc_safe to true when changes to newcm are
|
||||
// complete.
|
||||
assert(!newm->is_parsable() || nmsz < 0 || newm->size() == nmsz, "newm->size() inconsistency");
|
||||
assert(!newcm->is_parsable() || ncmsz < 0 || newcm->size() == ncmsz, "newcm->size() inconsistency");
|
||||
newcm->set_is_conc_safe(true);
|
||||
return newm;
|
||||
}
|
||||
|
@ -144,9 +144,6 @@ class methodOopDesc : public oopDesc {
|
||||
|
||||
public:
|
||||
|
||||
static const bool IsUnsafeConc = false;
|
||||
static const bool IsSafeConc = true;
|
||||
|
||||
// accessors for instance variables
|
||||
constMethodOop constMethod() const { return _constMethod; }
|
||||
void set_constMethod(constMethodOop xconst) { oop_store_without_check((oop*)&_constMethod, (oop)xconst); }
|
||||
|
@ -470,16 +470,6 @@ int objArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
ObjArrayKlass_OOP_ITERATE(a, p, PSParallelCompact::adjust_pointer(p))
|
||||
return a->object_size();
|
||||
}
|
||||
|
||||
int objArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
assert (obj->is_objArray(), "obj must be obj array");
|
||||
objArrayOop a = objArrayOop(obj);
|
||||
ObjArrayKlass_BOUNDED_OOP_ITERATE( \
|
||||
a, p, beg_addr, end_addr, \
|
||||
PSParallelCompact::adjust_pointer(p))
|
||||
return a->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
// JVM support
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -254,22 +254,6 @@ int objArrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
|
||||
return arrayKlassKlass::oop_update_pointers(cm, obj);
|
||||
}
|
||||
|
||||
int objArrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr,
|
||||
HeapWord* end_addr) {
|
||||
assert(obj->is_klass(), "must be klass");
|
||||
assert(klassOop(obj)->klass_part()->oop_is_objArray_slow(), "must be obj array");
|
||||
|
||||
oop* p;
|
||||
objArrayKlass* oak = objArrayKlass::cast((klassOop)obj);
|
||||
p = oak->element_klass_addr();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
p = oak->bottom_klass_addr();
|
||||
PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
|
||||
|
||||
return arrayKlassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2011, 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
|
||||
@ -71,6 +71,11 @@ class oopDesc {
|
||||
static BarrierSet* _bs;
|
||||
|
||||
public:
|
||||
enum ConcSafeType {
|
||||
IsUnsafeConc = false,
|
||||
IsSafeConc = true
|
||||
};
|
||||
|
||||
markOop mark() const { return _mark; }
|
||||
markOop* mark_addr() const { return (markOop*) &_mark; }
|
||||
|
||||
@ -317,13 +322,6 @@ class oopDesc {
|
||||
|
||||
// Parallel Old
|
||||
void update_contents(ParCompactionManager* cm);
|
||||
void update_contents(ParCompactionManager* cm,
|
||||
HeapWord* begin_limit,
|
||||
HeapWord* end_limit);
|
||||
void update_contents(ParCompactionManager* cm,
|
||||
klassOop old_klass,
|
||||
HeapWord* begin_limit,
|
||||
HeapWord* end_limit);
|
||||
|
||||
void follow_contents(ParCompactionManager* cm);
|
||||
void follow_header(ParCompactionManager* cm);
|
||||
@ -364,7 +362,6 @@ class oopDesc {
|
||||
#ifndef SERIALGC
|
||||
// Parallel old
|
||||
void update_header();
|
||||
void update_header(HeapWord* beg_addr, HeapWord* end_addr);
|
||||
#endif // SERIALGC
|
||||
|
||||
// mark-sweep support
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2011, 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
|
||||
@ -57,41 +57,6 @@ inline void oopDesc::update_contents(ParCompactionManager* cm) {
|
||||
// Else skip it. The typeArrayKlass in the header never needs scavenging.
|
||||
}
|
||||
|
||||
inline void oopDesc::update_contents(ParCompactionManager* cm,
|
||||
HeapWord* begin_limit,
|
||||
HeapWord* end_limit) {
|
||||
// The klass field must be updated before anything else
|
||||
// can be done.
|
||||
debug_only(klassOopDesc* original_klass = klass());
|
||||
|
||||
update_contents(cm, klass(), begin_limit, end_limit);
|
||||
}
|
||||
|
||||
inline void oopDesc::update_contents(ParCompactionManager* cm,
|
||||
klassOop old_klass,
|
||||
HeapWord* begin_limit,
|
||||
HeapWord* end_limit) {
|
||||
|
||||
klassOop updated_klass =
|
||||
PSParallelCompact::summary_data().calc_new_klass(old_klass);
|
||||
|
||||
// Needs to be boundary aware for the 64 bit case
|
||||
// update_header();
|
||||
// The klass has moved. Is the location of the klass
|
||||
// within the limits?
|
||||
if ((((HeapWord*)&_metadata._klass) >= begin_limit) &&
|
||||
(((HeapWord*)&_metadata._klass) < end_limit)) {
|
||||
set_klass(updated_klass);
|
||||
}
|
||||
|
||||
Klass* klass = updated_klass->klass_part();
|
||||
if (!klass->oop_is_typeArray()) {
|
||||
// It might contain oops beyond the header, so take the virtual call.
|
||||
klass->oop_update_pointers(cm, this, begin_limit, end_limit);
|
||||
}
|
||||
// Else skip it. The typeArrayKlass in the header never needs scavenging.
|
||||
}
|
||||
|
||||
inline void oopDesc::follow_contents(ParCompactionManager* cm) {
|
||||
assert (PSParallelCompact::mark_bitmap()->is_marked(this),
|
||||
"should be marked");
|
||||
@ -140,13 +105,4 @@ inline void oopDesc::update_header() {
|
||||
}
|
||||
}
|
||||
|
||||
inline void oopDesc::update_header(HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
if (UseCompressedOops) {
|
||||
PSParallelCompact::adjust_pointer(compressed_klass_addr(),
|
||||
beg_addr, end_addr);
|
||||
} else {
|
||||
PSParallelCompact::adjust_pointer(klass_addr(), beg_addr, end_addr);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
|
||||
|
@ -250,13 +250,6 @@ typeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
|
||||
assert(obj->is_typeArray(),"must be a type array");
|
||||
return typeArrayOop(obj)->object_size();
|
||||
}
|
||||
|
||||
int
|
||||
typeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
|
||||
HeapWord* beg_addr, HeapWord* end_addr) {
|
||||
assert(obj->is_typeArray(),"must be a type array");
|
||||
return typeArrayOop(obj)->object_size();
|
||||
}
|
||||
#endif // SERIALGC
|
||||
|
||||
void typeArrayKlass::initialize(TRAPS) {
|
||||
|
@ -1247,12 +1247,12 @@ jvmtiError VM_RedefineClasses::merge_cp_and_rewrite(
|
||||
// Constant pools are not easily reused so we allocate a new one
|
||||
// each time.
|
||||
// merge_cp is created unsafe for concurrent GC processing. It
|
||||
// should be marked safe before discarding it because, even if
|
||||
// garbage. If it crosses a card boundary, it may be scanned
|
||||
// should be marked safe before discarding it. Even though
|
||||
// garbage, if it crosses a card boundary, it may be scanned
|
||||
// in order to find the start of the first complete object on the card.
|
||||
constantPoolHandle merge_cp(THREAD,
|
||||
oopFactory::new_constantPool(merge_cp_length,
|
||||
methodOopDesc::IsUnsafeConc,
|
||||
oopDesc::IsUnsafeConc,
|
||||
THREAD));
|
||||
int orig_length = old_cp->orig_length();
|
||||
if (orig_length == 0) {
|
||||
@ -2343,7 +2343,7 @@ void VM_RedefineClasses::set_new_constant_pool(
|
||||
// sized constant pool with the klass to save space.
|
||||
constantPoolHandle smaller_cp(THREAD,
|
||||
oopFactory::new_constantPool(scratch_cp_length,
|
||||
methodOopDesc::IsUnsafeConc,
|
||||
oopDesc::IsUnsafeConc,
|
||||
THREAD));
|
||||
// preserve orig_length() value in the smaller copy
|
||||
int orig_length = scratch_cp->orig_length();
|
||||
|
@ -1134,8 +1134,9 @@ int MethodHandleCompiler::cpool_primitive_put(BasicType bt, jvalue* con) {
|
||||
|
||||
constantPoolHandle MethodHandleCompiler::get_constant_pool(TRAPS) const {
|
||||
constantPoolHandle nullHandle;
|
||||
bool is_conc_safe = true;
|
||||
constantPoolOop cpool_oop = oopFactory::new_constantPool(_constants.length(), is_conc_safe, CHECK_(nullHandle));
|
||||
constantPoolOop cpool_oop = oopFactory::new_constantPool(_constants.length(),
|
||||
oopDesc::IsSafeConc,
|
||||
CHECK_(nullHandle));
|
||||
constantPoolHandle cpool(THREAD, cpool_oop);
|
||||
|
||||
// Fill the real constant pool skipping the zero element.
|
||||
@ -1180,10 +1181,9 @@ methodHandle MethodHandleCompiler::get_method_oop(TRAPS) const {
|
||||
else
|
||||
flags_bits = (/*JVM_MH_INVOKE_BITS |*/ JVM_ACC_PUBLIC | JVM_ACC_FINAL | JVM_ACC_SYNTHETIC);
|
||||
|
||||
bool is_conc_safe = true;
|
||||
methodOop m_oop = oopFactory::new_method(bytecode_length(),
|
||||
accessFlags_from(flags_bits),
|
||||
0, 0, 0, is_conc_safe, CHECK_(nullHandle));
|
||||
0, 0, 0, oopDesc::IsSafeConc, CHECK_(nullHandle));
|
||||
methodHandle m(THREAD, m_oop);
|
||||
m_oop = NULL; // oop not GC safe
|
||||
|
||||
|
@ -1410,7 +1410,7 @@ void Arguments::set_ergonomics_flags() {
|
||||
// by ergonomics.
|
||||
if (MaxHeapSize <= max_heap_for_compressed_oops()) {
|
||||
#if !defined(COMPILER1) || defined(TIERED)
|
||||
if (FLAG_IS_DEFAULT(UseCompressedOops) && !UseG1GC) {
|
||||
if (FLAG_IS_DEFAULT(UseCompressedOops)) {
|
||||
FLAG_SET_ERGO(bool, UseCompressedOops, true);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2011, 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
|
||||
@ -1397,6 +1397,7 @@ class VM_HeapDumper : public VM_GC_Operation {
|
||||
public:
|
||||
VM_HeapDumper(DumpWriter* writer, bool gc_before_heap_dump, bool oome) :
|
||||
VM_GC_Operation(0 /* total collections, dummy, ignored */,
|
||||
GCCause::_heap_dump /* GC Cause */,
|
||||
0 /* total full collections, dummy, ignored */,
|
||||
gc_before_heap_dump) {
|
||||
_local_writer = writer;
|
||||
|
@ -1311,7 +1311,7 @@ JVM_ENTRY(jobjectArray, jmm_DumpThreads(JNIEnv *env, jlongArray thread_ids, jboo
|
||||
if (locked_monitors) {
|
||||
// Constructs Object[] and int[] to contain the object monitor and the stack depth
|
||||
// where the thread locked it
|
||||
objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, CHECK_NULL);
|
||||
objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, false, CHECK_NULL);
|
||||
objArrayHandle mh(THREAD, array);
|
||||
monitors_array = mh;
|
||||
|
||||
@ -1353,7 +1353,7 @@ JVM_ENTRY(jobjectArray, jmm_DumpThreads(JNIEnv *env, jlongArray thread_ids, jboo
|
||||
GrowableArray<instanceOop>* locks = (tcl != NULL ? tcl->owned_locks() : NULL);
|
||||
int num_locked_synchronizers = (locks != NULL ? locks->length() : 0);
|
||||
|
||||
objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, CHECK_NULL);
|
||||
objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, false, CHECK_NULL);
|
||||
objArrayHandle sh(THREAD, array);
|
||||
synchronizers_array = sh;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user