mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
Merge
This commit is contained in:
commit
78662d3b17
45 changed files with 2562 additions and 1057 deletions
|
@ -198,10 +198,9 @@ void PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
|
|||
|
||||
allocate_stacks();
|
||||
|
||||
NOT_PRODUCT(ref_processor()->verify_no_references_recorded());
|
||||
COMPILER2_PRESENT(DerivedPointerTable::clear());
|
||||
|
||||
ref_processor()->enable_discovery();
|
||||
ref_processor()->enable_discovery(true /*verify_disabled*/, true /*verify_no_refs*/);
|
||||
ref_processor()->setup_policy(clear_all_softrefs);
|
||||
|
||||
mark_sweep_phase1(clear_all_softrefs);
|
||||
|
|
|
@ -2069,10 +2069,9 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
|
|||
CodeCache::gc_prologue();
|
||||
Threads::gc_prologue();
|
||||
|
||||
NOT_PRODUCT(ref_processor()->verify_no_references_recorded());
|
||||
COMPILER2_PRESENT(DerivedPointerTable::clear());
|
||||
|
||||
ref_processor()->enable_discovery();
|
||||
ref_processor()->enable_discovery(true /*verify_disabled*/, true /*verify_no_refs*/);
|
||||
ref_processor()->setup_policy(maximum_heap_compaction);
|
||||
|
||||
bool marked_for_unloading = false;
|
||||
|
|
|
@ -102,17 +102,15 @@ void PSPromotionLAB::flush() {
|
|||
_state = flushed;
|
||||
}
|
||||
|
||||
bool PSPromotionLAB::unallocate_object(oop obj) {
|
||||
bool PSPromotionLAB::unallocate_object(HeapWord* obj, size_t obj_size) {
|
||||
assert(Universe::heap()->is_in(obj), "Object outside heap");
|
||||
|
||||
if (contains(obj)) {
|
||||
HeapWord* object_end = (HeapWord*)obj + obj->size();
|
||||
assert(object_end <= top(), "Object crosses promotion LAB boundary");
|
||||
HeapWord* object_end = obj + obj_size;
|
||||
assert(object_end == top(), "Not matching last allocation");
|
||||
|
||||
if (object_end == top()) {
|
||||
set_top((HeapWord*)obj);
|
||||
return true;
|
||||
}
|
||||
set_top(obj);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -73,7 +73,7 @@ class PSPromotionLAB : public CHeapObj {
|
|||
|
||||
bool is_flushed() { return _state == flushed; }
|
||||
|
||||
bool unallocate_object(oop obj);
|
||||
bool unallocate_object(HeapWord* obj, size_t obj_size);
|
||||
|
||||
// Returns a subregion containing all objects in this space.
|
||||
MemRegion used_region() { return MemRegion(bottom(), top()); }
|
||||
|
|
|
@ -380,10 +380,10 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
|
|||
// deallocate it, so we have to test. If the deallocation fails,
|
||||
// overwrite with a filler object.
|
||||
if (new_obj_is_tenured) {
|
||||
if (!_old_lab.unallocate_object(new_obj)) {
|
||||
if (!_old_lab.unallocate_object((HeapWord*) new_obj, new_obj_size)) {
|
||||
CollectedHeap::fill_with_object((HeapWord*) new_obj, new_obj_size);
|
||||
}
|
||||
} else if (!_young_lab.unallocate_object(new_obj)) {
|
||||
} else if (!_young_lab.unallocate_object((HeapWord*) new_obj, new_obj_size)) {
|
||||
CollectedHeap::fill_with_object((HeapWord*) new_obj, new_obj_size);
|
||||
}
|
||||
|
||||
|
|
|
@ -350,10 +350,9 @@ bool PSScavenge::invoke_no_policy() {
|
|||
}
|
||||
save_to_space_top_before_gc();
|
||||
|
||||
NOT_PRODUCT(reference_processor()->verify_no_references_recorded());
|
||||
COMPILER2_PRESENT(DerivedPointerTable::clear());
|
||||
|
||||
reference_processor()->enable_discovery();
|
||||
reference_processor()->enable_discovery(true /*verify_disabled*/, true /*verify_no_refs*/);
|
||||
reference_processor()->setup_policy(false);
|
||||
|
||||
// We track how much was promoted to the next generation for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue