< prev index next >
src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp
Print this page
rev 57486 : imported patch 8235860-remove-serial-old-gc
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2020, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -29,11 +29,10 @@
#include "gc/parallel/adjoiningVirtualSpaces.hpp"
#include "gc/parallel/parallelArguments.hpp"
#include "gc/parallel/objectStartArray.inline.hpp"
#include "gc/parallel/parallelScavengeHeap.inline.hpp"
#include "gc/parallel/psAdaptiveSizePolicy.hpp"
-#include "gc/parallel/psMarkSweepProxy.hpp"
#include "gc/parallel/psMemoryPool.hpp"
#include "gc/parallel/psParallelCompact.inline.hpp"
#include "gc/parallel/psPromotionManager.hpp"
#include "gc/parallel/psScavenge.hpp"
#include "gc/parallel/psVMOperations.hpp"
@@ -114,11 +113,11 @@
"Boundaries must meet");
// initialize the policy counters - 2 collectors, 2 generations
_gc_policy_counters =
new PSGCAdaptivePolicyCounters("ParScav:MSC", 2, 2, _size_policy);
- if (UseParallelOldGC && !PSParallelCompact::initialize()) {
+ if (!PSParallelCompact::initialize()) {
return JNI_ENOMEM;
}
// Set up WorkGang
_workers.initialize_workers();
@@ -163,15 +162,11 @@
void ParallelScavengeHeap::post_initialize() {
CollectedHeap::post_initialize();
// Need to init the tenuring threshold
PSScavenge::initialize();
- if (UseParallelOldGC) {
PSParallelCompact::post_initialize();
- } else {
- PSMarkSweepProxy::initialize();
- }
PSPromotionManager::initialize();
ScavengableNMethods::initialize(&_is_scavengable);
}
@@ -412,19 +407,15 @@
}
return NULL;
}
void ParallelScavengeHeap::do_full_collection(bool clear_all_soft_refs) {
- if (UseParallelOldGC) {
// The do_full_collection() parameter clear_all_soft_refs
// is interpreted here as maximum_compaction which will
// cause SoftRefs to be cleared.
bool maximum_compaction = clear_all_soft_refs;
PSParallelCompact::invoke(maximum_compaction);
- } else {
- PSMarkSweepProxy::invoke(clear_all_soft_refs);
- }
}
// Failed allocation policy. Must be called from the VM thread, and
// only at a safepoint! Note that this method has policy for allocation
// flow, and NOT collection policy. So we do not check for gc collection
@@ -552,13 +543,11 @@
bool ParallelScavengeHeap::block_is_obj(const HeapWord* addr) const {
return block_start(addr) == addr;
}
jlong ParallelScavengeHeap::millis_since_last_gc() {
- return UseParallelOldGC ?
- PSParallelCompact::millis_since_last_gc() :
- PSMarkSweepProxy::millis_since_last_gc();
+ return PSParallelCompact::millis_since_last_gc();
}
void ParallelScavengeHeap::prepare_for_verify() {
ensure_parsability(false); // no need to retire TLABs for verification
}
@@ -597,14 +586,12 @@
}
void ParallelScavengeHeap::print_on_error(outputStream* st) const {
this->CollectedHeap::print_on_error(st);
- if (UseParallelOldGC) {
st->cr();
PSParallelCompact::print_on_error(st);
- }
}
void ParallelScavengeHeap::gc_threads_do(ThreadClosure* tc) const {
ParallelScavengeHeap::heap()->workers().threads_do(tc);
}
@@ -614,12 +601,11 @@
}
void ParallelScavengeHeap::print_tracing_info() const {
AdaptiveSizePolicyOutput::print();
log_debug(gc, heap, exit)("Accumulated young generation GC time %3.7f secs", PSScavenge::accumulated_time()->seconds());
- log_debug(gc, heap, exit)("Accumulated old generation GC time %3.7f secs",
- UseParallelOldGC ? PSParallelCompact::accumulated_time()->seconds() : PSMarkSweepProxy::accumulated_time()->seconds());
+ log_debug(gc, heap, exit)("Accumulated old generation GC time %3.7f secs", PSParallelCompact::accumulated_time()->seconds());
}
PreGenGCValues ParallelScavengeHeap::get_pre_gc_values() const {
const PSYoungGen* const young = young_gen();
const MutableSpace* const eden = young->eden_space();
< prev index next >