This commit is contained in:
Jon Masamitsu 2014-08-08 16:24:16 -07:00
commit d4ca2cc557
5 changed files with 11 additions and 28 deletions

View File

@ -2582,15 +2582,12 @@ bool G1CollectedHeap::is_in(const void* p) const {
// Iteration functions.
// Iterates an OopClosure over all ref-containing fields of objects
// within a HeapRegion.
// Applies an ExtendedOopClosure onto all references of objects within a HeapRegion.
class IterateOopClosureRegionClosure: public HeapRegionClosure {
MemRegion _mr;
ExtendedOopClosure* _cl;
public:
IterateOopClosureRegionClosure(MemRegion mr, ExtendedOopClosure* cl)
: _mr(mr), _cl(cl) {}
IterateOopClosureRegionClosure(ExtendedOopClosure* cl) : _cl(cl) {}
bool doHeapRegion(HeapRegion* r) {
if (!r->continuesHumongous()) {
r->oop_iterate(_cl);
@ -2600,12 +2597,7 @@ public:
};
void G1CollectedHeap::oop_iterate(ExtendedOopClosure* cl) {
IterateOopClosureRegionClosure blk(_g1_committed, cl);
heap_region_iterate(&blk);
}
void G1CollectedHeap::oop_iterate(MemRegion mr, ExtendedOopClosure* cl) {
IterateOopClosureRegionClosure blk(mr, cl);
IterateOopClosureRegionClosure blk(cl);
heap_region_iterate(&blk);
}
@ -4792,11 +4784,6 @@ protected:
Mutex _stats_lock;
Mutex* stats_lock() { return &_stats_lock; }
size_t getNCards() {
return (_g1h->capacity() + G1BlockOffsetSharedArray::N_bytes - 1)
/ G1BlockOffsetSharedArray::N_bytes;
}
public:
G1ParTask(G1CollectedHeap* g1h, RefToScanQueueSet *task_queues)
: AbstractGangTask("G1 collection"),

View File

@ -1395,9 +1395,6 @@ public:
// "cl.do_oop" on each.
virtual void oop_iterate(ExtendedOopClosure* cl);
// Same as above, restricted to a memory region.
void oop_iterate(MemRegion mr, ExtendedOopClosure* cl);
// Iterate over all objects, calling "cl.do_object" on each.
virtual void object_iterate(ObjectClosure* cl);

View File

@ -237,8 +237,10 @@ void G1GCPhaseTimes::note_gc_end() {
_last_gc_worker_times_ms.verify();
_last_gc_worker_other_times_ms.verify();
_last_redirty_logged_cards_time_ms.verify();
_last_redirty_logged_cards_processed_cards.verify();
if (G1DeferredRSUpdate) {
_last_redirty_logged_cards_time_ms.verify();
_last_redirty_logged_cards_processed_cards.verify();
}
}
void G1GCPhaseTimes::note_string_dedup_fixup_start() {

View File

@ -176,13 +176,9 @@ size_t CollectorPolicy::compute_heap_alignment() {
size_t alignment = GenRemSet::max_alignment_constraint();
// Parallel GC does its own alignment of the generations to avoid requiring a
// large page (256M on some platforms) for the permanent generation. The
// other collectors should also be updated to do their own alignment and then
// this use of lcm() should be removed.
if (UseLargePages && !UseParallelGC) {
if (UseLargePages) {
// In presence of large pages we have to make sure that our
// alignment is large page aware
// alignment is large page aware.
alignment = lcm(os::large_page_size(), alignment);
}

View File

@ -23,7 +23,7 @@
/*
* @test TestDeferredRSUpdate
* @bug 8040977
* @bug 8040977 8052170
* @summary Ensure that running with -XX:-G1DeferredRSUpdate does not crash the VM
* @key gc
* @library /testlibrary
@ -38,6 +38,7 @@ public class TestDeferredRSUpdate {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
"-Xmx10M",
"-XX:+PrintGCDetails",
// G1DeferredRSUpdate is a develop option, but we cannot limit execution of this test to only debug VMs.
"-XX:+IgnoreUnrecognizedVMOptions",
"-XX:-G1DeferredRSUpdate",