< prev index next >
src/hotspot/share/gc/parallel/psYoungGen.cpp
Print this page
rev 57719 : 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.
@@ -23,11 +23,10 @@
*/
#include "precompiled.hpp"
#include "gc/parallel/mutableNUMASpace.hpp"
#include "gc/parallel/parallelScavengeHeap.hpp"
-#include "gc/parallel/psMarkSweepDecorator.hpp"
#include "gc/parallel/psScavenge.hpp"
#include "gc/parallel/psYoungGen.hpp"
#include "gc/shared/gcUtil.hpp"
#include "gc/shared/genArguments.hpp"
#include "gc/shared/spaceDecorator.inline.hpp"
@@ -40,13 +39,10 @@
_reserved(),
_virtual_space(NULL),
_eden_space(NULL),
_from_space(NULL),
_to_space(NULL),
- _eden_mark_sweep(NULL),
- _from_mark_sweep(NULL),
- _to_mark_sweep(NULL),
_init_gen_size(initial_size),
_min_gen_size(min_size),
_max_gen_size(max_size),
_gen_counters(NULL),
_eden_counters(NULL),
@@ -94,25 +90,10 @@
if (_eden_space == NULL || _from_space == NULL || _to_space == NULL) {
vm_exit_during_initialization("Could not allocate a young gen space");
}
- // Allocate the mark sweep views of spaces
- _eden_mark_sweep =
- new PSMarkSweepDecorator(_eden_space, NULL, MarkSweepDeadRatio);
- _from_mark_sweep =
- new PSMarkSweepDecorator(_from_space, NULL, MarkSweepDeadRatio);
- _to_mark_sweep =
- new PSMarkSweepDecorator(_to_space, NULL, MarkSweepDeadRatio);
-
- if (_eden_mark_sweep == NULL ||
- _from_mark_sweep == NULL ||
- _to_mark_sweep == NULL) {
- vm_exit_during_initialization("Could not complete allocation"
- " of the young generation");
- }
-
// Generation Counters - generation 0, 3 subspaces
_gen_counters = new PSGenerationCounters("new", 0, 3, _min_gen_size,
_max_gen_size, _virtual_space);
// Compute maximum space sizes for performance counters
@@ -679,18 +660,10 @@
void PSYoungGen::swap_spaces() {
MutableSpace* s = from_space();
_from_space = to_space();
_to_space = s;
-
- // Now update the decorators.
- PSMarkSweepDecorator* md = from_mark_sweep();
- _from_mark_sweep = to_mark_sweep();
- _to_mark_sweep = md;
-
- assert(from_mark_sweep()->space() == from_space(), "Sanity");
- assert(to_mark_sweep()->space() == to_space(), "Sanity");
}
size_t PSYoungGen::capacity_in_bytes() const {
return eden_space()->capacity_in_bytes()
+ from_space()->capacity_in_bytes(); // to_space() is only used during scavenge
@@ -729,33 +702,10 @@
eden_space()->object_iterate(blk);
from_space()->object_iterate(blk);
to_space()->object_iterate(blk);
}
-#if INCLUDE_SERIALGC
-
-void PSYoungGen::precompact() {
- eden_mark_sweep()->precompact();
- from_mark_sweep()->precompact();
- to_mark_sweep()->precompact();
-}
-
-void PSYoungGen::adjust_pointers() {
- eden_mark_sweep()->adjust_pointers();
- from_mark_sweep()->adjust_pointers();
- to_mark_sweep()->adjust_pointers();
-}
-
-void PSYoungGen::compact() {
- eden_mark_sweep()->compact(ZapUnusedHeapArea);
- from_mark_sweep()->compact(ZapUnusedHeapArea);
- // Mark sweep stores preserved markWords in to space, don't disturb!
- to_mark_sweep()->compact(false);
-}
-
-#endif // INCLUDE_SERIALGC
-
void PSYoungGen::print() const { print_on(tty); }
void PSYoungGen::print_on(outputStream* st) const {
st->print(" %-15s", "PSYoungGen");
st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
capacity_in_bytes()/K, used_in_bytes()/K);
< prev index next >