8075957: Reduce calls to the GC specific object visitors in oopDesc
Reviewed-by: brutisso, mgerdin, pliden
This commit is contained in:
parent
602b7d79e9
commit
ba1d121fe0
@ -66,7 +66,6 @@
|
||||
#include "memory/iterator.hpp"
|
||||
#include "memory/referenceProcessor.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#include "runtime/atomic.inline.hpp"
|
||||
#include "runtime/orderAccess.inline.hpp"
|
||||
#include "runtime/vmThread.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2015, 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
|
||||
@ -33,6 +33,7 @@
|
||||
#include "gc_implementation/g1/g1MarkSweep.hpp"
|
||||
#include "gc_implementation/g1/g1RootProcessor.hpp"
|
||||
#include "gc_implementation/g1/g1StringDedup.hpp"
|
||||
#include "gc_implementation/shared/markSweep.inline.hpp"
|
||||
#include "gc_implementation/shared/gcHeapSummary.hpp"
|
||||
#include "gc_implementation/shared/gcTimer.hpp"
|
||||
#include "gc_implementation/shared/gcTrace.hpp"
|
||||
@ -217,7 +218,7 @@ class G1AdjustPointersClosure: public HeapRegionClosure {
|
||||
// We must adjust the pointers on the single H object.
|
||||
oop obj = oop(r->bottom());
|
||||
// point all the oops to the new location
|
||||
obj->adjust_pointers();
|
||||
MarkSweep::adjust_pointers(obj);
|
||||
}
|
||||
} else {
|
||||
// This really ought to be "as_CompactibleSpace"...
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
|
||||
#include "gc_implementation/g1/g1ParScanThreadState.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#include "runtime/prefetch.inline.hpp"
|
||||
|
||||
G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "memory/space.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#include "runtime/atomic.inline.hpp"
|
||||
#include "runtime/handles.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -26,12 +26,11 @@
|
||||
#include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
|
||||
#include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
|
||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psTasks.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psYoungGen.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.psgc.inline.hpp"
|
||||
#include "runtime/prefetch.inline.hpp"
|
||||
|
||||
// Checks an individual oop for missing precise marks. Mark
|
||||
@ -291,7 +290,7 @@ void CardTableExtension::scavenge_contents_parallel(ObjectStartArray* start_arra
|
||||
Prefetch::write(p, interval);
|
||||
oop m = oop(p);
|
||||
assert(m->is_oop_or_null(), err_msg("Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m)));
|
||||
m->push_contents(pm);
|
||||
pm->push_contents(m);
|
||||
p += m->size();
|
||||
}
|
||||
pm->drain_stacks_cond_depth();
|
||||
@ -299,7 +298,7 @@ void CardTableExtension::scavenge_contents_parallel(ObjectStartArray* start_arra
|
||||
while (p < to) {
|
||||
oop m = oop(p);
|
||||
assert(m->is_oop_or_null(), err_msg("Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m)));
|
||||
m->push_contents(pm);
|
||||
pm->push_contents(m);
|
||||
p += m->size();
|
||||
}
|
||||
pm->drain_stacks_cond_depth();
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "code/codeCache.hpp"
|
||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||
#include "gc_implementation/parallelScavenge/pcTasks.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||
#include "gc_implementation/shared/gcTimer.hpp"
|
||||
#include "gc_implementation/shared/gcTraceTime.hpp"
|
||||
@ -34,7 +35,6 @@
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/objArrayKlass.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
#include "runtime/fprofiler.hpp"
|
||||
#include "runtime/jniHandles.hpp"
|
||||
@ -221,12 +221,11 @@ void StealMarkingTask::do_it(GCTaskManager* manager, uint which) {
|
||||
int random_seed = 17;
|
||||
do {
|
||||
while (ParCompactionManager::steal_objarray(which, &random_seed, task)) {
|
||||
ObjArrayKlass* k = (ObjArrayKlass*)task.obj()->klass();
|
||||
k->oop_follow_contents(cm, task.obj(), task.index());
|
||||
cm->follow_contents((objArrayOop)task.obj(), task.index());
|
||||
cm->follow_marking_stacks();
|
||||
}
|
||||
while (ParCompactionManager::steal(which, &random_seed, obj)) {
|
||||
obj->follow_contents(cm);
|
||||
cm->follow_contents(obj);
|
||||
cm->follow_marking_stacks();
|
||||
}
|
||||
} while (!terminator()->offer_termination());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, 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
|
||||
@ -28,12 +28,11 @@
|
||||
#include "gc_implementation/parallelScavenge/objectStartArray.hpp"
|
||||
#include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
|
||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psCompactionManager.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psOldGen.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||
#include "oops/objArrayKlass.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#include "runtime/atomic.inline.hpp"
|
||||
#include "utilities/stack.inline.hpp"
|
||||
|
||||
@ -180,17 +179,16 @@ void ParCompactionManager::follow_marking_stacks() {
|
||||
// Drain the overflow stack first, to allow stealing from the marking stack.
|
||||
oop obj;
|
||||
while (marking_stack()->pop_overflow(obj)) {
|
||||
obj->follow_contents(this);
|
||||
follow_contents(obj);
|
||||
}
|
||||
while (marking_stack()->pop_local(obj)) {
|
||||
obj->follow_contents(this);
|
||||
follow_contents(obj);
|
||||
}
|
||||
|
||||
// Process ObjArrays one at a time to avoid marking stack bloat.
|
||||
ObjArrayTask task;
|
||||
if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) {
|
||||
ObjArrayKlass* k = (ObjArrayKlass*)task.obj()->klass();
|
||||
k->oop_follow_contents(this, task.obj(), task.index());
|
||||
follow_contents((objArrayOop)task.obj(), task.index());
|
||||
}
|
||||
} while (!marking_stacks_empty());
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, 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
|
||||
@ -196,6 +196,10 @@ private:
|
||||
// Process tasks remaining on any stack
|
||||
void drain_region_stacks();
|
||||
|
||||
void follow_contents(oop obj);
|
||||
void follow_contents(objArrayOop array, int index);
|
||||
|
||||
void update_contents(oop obj);
|
||||
};
|
||||
|
||||
inline ParCompactionManager* ParCompactionManager::manager_array(int index) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2015 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
|
||||
@ -27,6 +27,8 @@
|
||||
|
||||
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||
#include "oops/objArrayKlass.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
|
||||
void ParCompactionManager::push_objarray(oop obj, size_t index)
|
||||
{
|
||||
@ -46,4 +48,17 @@ void ParCompactionManager::push_region(size_t index)
|
||||
region_stack()->push(index);
|
||||
}
|
||||
|
||||
inline void ParCompactionManager::follow_contents(oop obj) {
|
||||
obj->follow_contents(this);
|
||||
}
|
||||
|
||||
inline void ParCompactionManager::follow_contents(objArrayOop obj, int index) {
|
||||
ObjArrayKlass* k = (ObjArrayKlass*)obj->klass();
|
||||
k->oop_follow_contents(this, obj, index);
|
||||
}
|
||||
|
||||
inline void ParCompactionManager::update_contents(oop obj) {
|
||||
obj->update_contents(this);
|
||||
}
|
||||
|
||||
#endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2015, 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
|
||||
@ -303,7 +303,7 @@ void PSMarkSweepDecorator::adjust_pointers() {
|
||||
|
||||
while (q < end) {
|
||||
// point all the oops to the new location
|
||||
size_t size = oop(q)->adjust_pointers();
|
||||
size_t size = MarkSweep::adjust_pointers(oop(q));
|
||||
q += size;
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ void PSMarkSweepDecorator::adjust_pointers() {
|
||||
if (oop(q)->is_gc_marked()) {
|
||||
// q is alive
|
||||
// point all the oops to the new location
|
||||
size_t size = oop(q)->adjust_pointers();
|
||||
size_t size = MarkSweep::adjust_pointers(oop(q));
|
||||
debug_only(prev_q = q);
|
||||
q += size;
|
||||
} else {
|
||||
|
@ -50,7 +50,6 @@
|
||||
#include "memory/referenceProcessor.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#include "runtime/atomic.inline.hpp"
|
||||
#include "runtime/fprofiler.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
@ -2776,6 +2775,11 @@ void PSParallelCompact::verify_complete(SpaceId space_id) {
|
||||
}
|
||||
#endif // #ifdef ASSERT
|
||||
|
||||
inline void UpdateOnlyClosure::do_addr(HeapWord* addr) {
|
||||
_start_array->allocate_block(addr);
|
||||
compaction_manager()->update_contents(oop(addr));
|
||||
}
|
||||
|
||||
// Update interior oops in the ranges of regions [beg_region, end_region).
|
||||
void
|
||||
PSParallelCompact::update_and_deadwood_in_dense_prefix(ParCompactionManager* cm,
|
||||
@ -2876,7 +2880,7 @@ void PSParallelCompact::update_deferred_objects(ParCompactionManager* cm,
|
||||
if (start_array != NULL) {
|
||||
start_array->allocate_block(addr);
|
||||
}
|
||||
oop(addr)->update_contents(cm);
|
||||
cm->update_contents(oop(addr));
|
||||
assert(oop(addr)->is_oop_or_null(), err_msg("Expected an oop or NULL at " PTR_FORMAT, p2i(oop(addr))));
|
||||
}
|
||||
}
|
||||
@ -3360,7 +3364,7 @@ MoveAndUpdateClosure::do_addr(HeapWord* addr, size_t words) {
|
||||
}
|
||||
|
||||
oop moved_oop = (oop) destination();
|
||||
moved_oop->update_contents(compaction_manager());
|
||||
compaction_manager()->update_contents(moved_oop);
|
||||
assert(moved_oop->is_oop_or_null(), err_msg("Expected an oop or NULL at " PTR_FORMAT, p2i(moved_oop)));
|
||||
|
||||
update_state(words);
|
||||
|
@ -1025,9 +1025,6 @@ class PSParallelCompact : AllStatic {
|
||||
bool maximum_heap_compaction,
|
||||
ParallelOldTracer *gc_tracer);
|
||||
|
||||
template <class T>
|
||||
static inline void follow_root(ParCompactionManager* cm, T* p);
|
||||
|
||||
// Compute the dense prefix for the designated space. This is an experimental
|
||||
// implementation currently not used in production.
|
||||
static HeapWord* compute_dense_prefix_via_density(const SpaceId id,
|
||||
@ -1335,23 +1332,6 @@ inline bool PSParallelCompact::is_marked(oop obj) {
|
||||
return mark_bitmap()->is_marked(obj);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void PSParallelCompact::follow_root(ParCompactionManager* cm, T* p) {
|
||||
assert(!Universe::heap()->is_in_reserved(p),
|
||||
"roots shouldn't be things within the heap");
|
||||
|
||||
T heap_oop = oopDesc::load_heap_oop(p);
|
||||
if (!oopDesc::is_null(heap_oop)) {
|
||||
oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
|
||||
if (mark_bitmap()->is_unmarked(obj)) {
|
||||
if (mark_obj(obj)) {
|
||||
obj->follow_contents(cm);
|
||||
}
|
||||
}
|
||||
}
|
||||
cm->follow_marking_stacks();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void PSParallelCompact::mark_and_push(ParCompactionManager* cm, T* p) {
|
||||
T heap_oop = oopDesc::load_heap_oop(p);
|
||||
@ -1524,12 +1504,6 @@ class UpdateOnlyClosure: public ParMarkBitMapClosure {
|
||||
inline void do_addr(HeapWord* addr);
|
||||
};
|
||||
|
||||
inline void UpdateOnlyClosure::do_addr(HeapWord* addr)
|
||||
{
|
||||
_start_array->allocate_block(addr);
|
||||
oop(addr)->update_contents(compaction_manager());
|
||||
}
|
||||
|
||||
class FillClosure: public ParMarkBitMapClosure
|
||||
{
|
||||
public:
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "memory/memRegion.hpp"
|
||||
#include "memory/padded.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.psgc.inline.hpp"
|
||||
#include "utilities/stack.inline.hpp"
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
@ -325,7 +324,7 @@ oop PSPromotionManager::oop_promotion_failed(oop obj, markOop obj_mark) {
|
||||
|
||||
_promotion_failed_info.register_copy_failure(obj->size());
|
||||
|
||||
obj->push_contents(this);
|
||||
push_contents(obj);
|
||||
|
||||
// Save the mark if needed
|
||||
PSScavenge::oop_promotion_failed(obj, obj_mark);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, 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
|
||||
@ -212,6 +212,8 @@ class PSPromotionManager VALUE_OBJ_CLASS_SPEC {
|
||||
template <class T> inline void claim_or_forward_depth(T* p);
|
||||
|
||||
TASKQUEUE_STATS_ONLY(inline void record_steal(StarTask& p);)
|
||||
|
||||
void push_contents(oop obj);
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_HPP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, 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
|
||||
@ -91,6 +91,9 @@ inline void PSPromotionManager::promotion_trace_event(oop new_obj, oop old_obj,
|
||||
}
|
||||
}
|
||||
|
||||
inline void PSPromotionManager::push_contents(oop obj) {
|
||||
obj->push_contents(this);
|
||||
}
|
||||
//
|
||||
// This method is pretty bulky. It would be nice to split it up
|
||||
// into smaller submethods, but we need to be careful not to hurt
|
||||
@ -227,7 +230,7 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
|
||||
TASKQUEUE_STATS_ONLY(++_arrays_chunked; ++_masked_pushes);
|
||||
} else {
|
||||
// we'll just push its contents
|
||||
new_obj->push_contents(this);
|
||||
push_contents(new_obj);
|
||||
}
|
||||
} else {
|
||||
// We lost, someone else "owns" this object
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "memory/referenceProcessor.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.psgc.inline.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/fprofiler.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -35,7 +35,6 @@
|
||||
#include "memory/iterator.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oop.psgc.inline.hpp"
|
||||
#include "runtime/fprofiler.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/vmThread.hpp"
|
||||
|
@ -64,18 +64,22 @@ void MarkSweep::follow_class_loader(ClassLoaderData* cld) {
|
||||
MarkSweep::follow_cld_closure.do_cld(cld);
|
||||
}
|
||||
|
||||
void MarkSweep::follow_array(objArrayOop array, int index) {
|
||||
ObjArrayKlass* k = (ObjArrayKlass*)array->klass();
|
||||
k->oop_follow_contents(array, index);
|
||||
}
|
||||
|
||||
void MarkSweep::follow_stack() {
|
||||
do {
|
||||
while (!_marking_stack.is_empty()) {
|
||||
oop obj = _marking_stack.pop();
|
||||
assert (obj->is_gc_marked(), "p must be marked");
|
||||
obj->follow_contents();
|
||||
follow_object(obj);
|
||||
}
|
||||
// Process ObjArrays one at a time to avoid marking stack bloat.
|
||||
if (!_objarray_stack.is_empty()) {
|
||||
ObjArrayTask task = _objarray_stack.pop();
|
||||
ObjArrayKlass* k = (ObjArrayKlass*)task.obj()->klass();
|
||||
k->oop_follow_contents(task.obj(), task.index());
|
||||
follow_array(objArrayOop(task.obj()), task.index());
|
||||
}
|
||||
} while (!_marking_stack.is_empty() || !_objarray_stack.is_empty());
|
||||
}
|
||||
|
@ -160,10 +160,16 @@ class MarkSweep : AllStatic {
|
||||
|
||||
static void follow_stack(); // Empty marking stack.
|
||||
|
||||
static void follow_object(oop obj);
|
||||
|
||||
static void follow_array(objArrayOop array, int index);
|
||||
|
||||
static void follow_klass(Klass* klass);
|
||||
|
||||
static void follow_class_loader(ClassLoaderData* cld);
|
||||
|
||||
static int adjust_pointers(oop obj);
|
||||
|
||||
static void preserve_mark(oop p, markOop mark);
|
||||
// Save the mark word so it can be restored later
|
||||
static void adjust_marks(); // Adjust the pointers in the preserved marks table
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, 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
|
||||
@ -58,6 +58,10 @@ inline void MarkSweep::follow_klass(Klass* klass) {
|
||||
MarkSweep::mark_and_push(&op);
|
||||
}
|
||||
|
||||
inline void MarkSweep::follow_object(oop obj) {
|
||||
obj->follow_contents();
|
||||
}
|
||||
|
||||
template <class T> inline void MarkSweep::follow_root(T* p) {
|
||||
assert(!Universe::heap()->is_in_reserved(p),
|
||||
"roots shouldn't be things within the heap");
|
||||
@ -66,7 +70,7 @@ template <class T> inline void MarkSweep::follow_root(T* p) {
|
||||
oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
|
||||
if (!obj->mark()->is_marked()) {
|
||||
mark_object(obj);
|
||||
obj->follow_contents();
|
||||
follow_object(obj);
|
||||
}
|
||||
}
|
||||
follow_stack();
|
||||
@ -90,6 +94,10 @@ void MarkSweep::push_objarray(oop obj, size_t index) {
|
||||
_objarray_stack.push(task);
|
||||
}
|
||||
|
||||
inline int MarkSweep::adjust_pointers(oop obj) {
|
||||
return obj->adjust_pointers();
|
||||
}
|
||||
|
||||
template <class T> inline void MarkSweep::adjust_pointer(T* p) {
|
||||
T heap_oop = oopDesc::load_heap_oop(p);
|
||||
if (!oopDesc::is_null(heap_oop)) {
|
||||
|
@ -214,7 +214,7 @@ inline void CompactibleSpace::scan_and_adjust_pointers(SpaceType* space) {
|
||||
assert(space->block_is_obj(q), "should be at block boundaries, and should be looking at objs");
|
||||
|
||||
// point all the oops to the new location
|
||||
size_t size = oop(q)->adjust_pointers();
|
||||
size_t size = MarkSweep::adjust_pointers(oop(q));
|
||||
size = space->adjust_obj_size(size);
|
||||
|
||||
q += size;
|
||||
@ -238,7 +238,7 @@ inline void CompactibleSpace::scan_and_adjust_pointers(SpaceType* space) {
|
||||
if (oop(q)->is_gc_marked()) {
|
||||
// q is alive
|
||||
// point all the oops to the new location
|
||||
size_t size = oop(q)->adjust_pointers();
|
||||
size_t size = MarkSweep::adjust_pointers(oop(q));
|
||||
size = space->adjust_obj_size(size);
|
||||
debug_only(prev_q = q);
|
||||
q += size;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, 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
|
||||
@ -42,7 +42,6 @@
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
// Macro to define InstanceClassLoaderKlass::oop_oop_iterate for virtual/nonvirtual for
|
||||
|
@ -74,7 +74,6 @@
|
||||
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
#ifdef COMPILER1
|
||||
#include "c1/c1_Compiler.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, 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
|
||||
@ -47,7 +47,6 @@
|
||||
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
int InstanceMirrorKlass::_offset_of_static_fields = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
@ -43,7 +43,6 @@
|
||||
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
@ -55,7 +55,6 @@
|
||||
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
|
||||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
ObjArrayKlass* ObjArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) {
|
||||
|
Loading…
Reference in New Issue
Block a user