OpenJDK / jdk / jdk
changeset 59239:9fb4e20c6975
8244740: Shenandoah: rename ShenandoahNormalMode to ShenandoahSATBMode
Reviewed-by: rkennke
author | shade |
---|---|
date | Mon, 11 May 2020 18:33:50 +0200 |
parents | 4ea431f68e73 |
children | 0348e9be94d1 |
files | src/hotspot/share/gc/shenandoah/mode/shenandoahNormalMode.cpp src/hotspot/share/gc/shenandoah/mode/shenandoahNormalMode.hpp src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.hpp src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp test/hotspot/jtreg/gc/shenandoah/TestObjItrWithHeapDump.java test/hotspot/jtreg/gc/shenandoah/oom/TestClassLoaderLeak.java test/hotspot/jtreg/gc/shenandoah/options/TestModeUnlock.java |
diffstat | 9 files changed, 117 insertions(+), 117 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/mode/shenandoahNormalMode.cpp Mon May 11 18:33:42 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2019, 2020, Red Hat, Inc. 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. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "gc/shenandoah/shenandoahConcurrentRoots.hpp" -#include "gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp" -#include "gc/shenandoah/heuristics/shenandoahAggressiveHeuristics.hpp" -#include "gc/shenandoah/heuristics/shenandoahCompactHeuristics.hpp" -#include "gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp" -#include "gc/shenandoah/mode/shenandoahNormalMode.hpp" -#include "logging/log.hpp" -#include "logging/logTag.hpp" - -void ShenandoahNormalMode::initialize_flags() const { - if (ShenandoahConcurrentRoots::can_do_concurrent_class_unloading()) { - FLAG_SET_DEFAULT(ShenandoahSuspendibleWorkers, true); - FLAG_SET_DEFAULT(VerifyBeforeExit, false); - } - - SHENANDOAH_ERGO_ENABLE_FLAG(ExplicitGCInvokesConcurrent); - SHENANDOAH_ERGO_ENABLE_FLAG(ShenandoahImplicitGCInvokesConcurrent); - - // Final configuration checks - SHENANDOAH_CHECK_FLAG_SET(ShenandoahLoadRefBarrier); - SHENANDOAH_CHECK_FLAG_UNSET(ShenandoahStoreValEnqueueBarrier); - SHENANDOAH_CHECK_FLAG_SET(ShenandoahSATBBarrier); - SHENANDOAH_CHECK_FLAG_SET(ShenandoahCASBarrier); - SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier); -} - -ShenandoahHeuristics* ShenandoahNormalMode::initialize_heuristics() const { - if (ShenandoahGCHeuristics != NULL) { - if (strcmp(ShenandoahGCHeuristics, "aggressive") == 0) { - return new ShenandoahAggressiveHeuristics(); - } else if (strcmp(ShenandoahGCHeuristics, "static") == 0) { - return new ShenandoahStaticHeuristics(); - } else if (strcmp(ShenandoahGCHeuristics, "adaptive") == 0) { - return new ShenandoahAdaptiveHeuristics(); - } else if (strcmp(ShenandoahGCHeuristics, "compact") == 0) { - return new ShenandoahCompactHeuristics(); - } else { - vm_exit_during_initialization("Unknown -XX:ShenandoahGCHeuristics option"); - } - } - ShouldNotReachHere(); - return NULL; -}
--- a/src/hotspot/share/gc/shenandoah/mode/shenandoahNormalMode.hpp Mon May 11 18:33:42 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2019, Red Hat, Inc. 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. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP -#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP - -#include "gc/shenandoah/mode/shenandoahMode.hpp" - -class ShenandoahHeuristics; - -class ShenandoahNormalMode : public ShenandoahMode { -public: - virtual void initialize_flags() const; - virtual ShenandoahHeuristics* initialize_heuristics() const; - virtual const char* name() { return "Normal"; } - virtual bool is_diagnostic() { return false; } - virtual bool is_experimental() { return false; } -}; - -#endif // SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp Mon May 11 18:33:50 2020 +0200 @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2019, 2020, Red Hat, Inc. 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "gc/shenandoah/shenandoahConcurrentRoots.hpp" +#include "gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp" +#include "gc/shenandoah/heuristics/shenandoahAggressiveHeuristics.hpp" +#include "gc/shenandoah/heuristics/shenandoahCompactHeuristics.hpp" +#include "gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp" +#include "gc/shenandoah/mode/shenandoahSATBMode.hpp" +#include "logging/log.hpp" +#include "logging/logTag.hpp" + +void ShenandoahSATBMode::initialize_flags() const { + if (ShenandoahConcurrentRoots::can_do_concurrent_class_unloading()) { + FLAG_SET_DEFAULT(ShenandoahSuspendibleWorkers, true); + FLAG_SET_DEFAULT(VerifyBeforeExit, false); + } + + SHENANDOAH_ERGO_ENABLE_FLAG(ExplicitGCInvokesConcurrent); + SHENANDOAH_ERGO_ENABLE_FLAG(ShenandoahImplicitGCInvokesConcurrent); + + // Final configuration checks + SHENANDOAH_CHECK_FLAG_SET(ShenandoahLoadRefBarrier); + SHENANDOAH_CHECK_FLAG_UNSET(ShenandoahStoreValEnqueueBarrier); + SHENANDOAH_CHECK_FLAG_SET(ShenandoahSATBBarrier); + SHENANDOAH_CHECK_FLAG_SET(ShenandoahCASBarrier); + SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier); +} + +ShenandoahHeuristics* ShenandoahSATBMode::initialize_heuristics() const { + if (ShenandoahGCHeuristics != NULL) { + if (strcmp(ShenandoahGCHeuristics, "aggressive") == 0) { + return new ShenandoahAggressiveHeuristics(); + } else if (strcmp(ShenandoahGCHeuristics, "static") == 0) { + return new ShenandoahStaticHeuristics(); + } else if (strcmp(ShenandoahGCHeuristics, "adaptive") == 0) { + return new ShenandoahAdaptiveHeuristics(); + } else if (strcmp(ShenandoahGCHeuristics, "compact") == 0) { + return new ShenandoahCompactHeuristics(); + } else { + vm_exit_during_initialization("Unknown -XX:ShenandoahGCHeuristics option"); + } + } + ShouldNotReachHere(); + return NULL; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.hpp Mon May 11 18:33:50 2020 +0200 @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2019, Red Hat, Inc. 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP +#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP + +#include "gc/shenandoah/mode/shenandoahMode.hpp" + +class ShenandoahHeuristics; + +class ShenandoahSATBMode : public ShenandoahMode { +public: + virtual void initialize_flags() const; + virtual ShenandoahHeuristics* initialize_heuristics() const; + virtual const char* name() { return "Snapshot-At-TheBeginning"; } + virtual bool is_diagnostic() { return false; } + virtual bool is_experimental() { return false; } +}; + +#endif // SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Mon May 11 18:33:42 2020 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Mon May 11 18:33:50 2020 +0200 @@ -65,8 +65,8 @@ #include "gc/shenandoah/shenandoahWorkGroup.hpp" #include "gc/shenandoah/shenandoahWorkerPolicy.hpp" #include "gc/shenandoah/mode/shenandoahIUMode.hpp" -#include "gc/shenandoah/mode/shenandoahNormalMode.hpp" #include "gc/shenandoah/mode/shenandoahPassiveMode.hpp" +#include "gc/shenandoah/mode/shenandoahSATBMode.hpp" #if INCLUDE_JFR #include "gc/shenandoah/shenandoahJfrSupport.hpp" #endif @@ -398,8 +398,8 @@ void ShenandoahHeap::initialize_heuristics() { if (ShenandoahGCMode != NULL) { - if (strcmp(ShenandoahGCMode, "normal") == 0) { - _gc_mode = new ShenandoahNormalMode(); + if (strcmp(ShenandoahGCMode, "satb") == 0) { + _gc_mode = new ShenandoahSATBMode(); } else if (strcmp(ShenandoahGCMode, "iu") == 0) { _gc_mode = new ShenandoahIUMode(); } else if (strcmp(ShenandoahGCMode, "passive") == 0) {
--- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp Mon May 11 18:33:42 2020 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp Mon May 11 18:33:50 2020 +0200 @@ -63,10 +63,10 @@ "This also caps the maximum TLAB size.") \ range(1, 100) \ \ - experimental(ccstr, ShenandoahGCMode, "normal", \ + experimental(ccstr, ShenandoahGCMode, "satb", \ "GC mode to use. Among other things, this defines which " \ "barriers are in in use. Possible values are:" \ - " normal - default concurrent GC (three pass mark-evac-update);" \ + " satb - snapshot-at-the-beginning concurrent GC (three pass mark-evac-update);" \ " iu - incremental-update concurrent GC (three pass mark-evac-update);" \ " passive - stop the world GC only (either degenerated or full)") \ \
--- a/test/hotspot/jtreg/gc/shenandoah/TestObjItrWithHeapDump.java Mon May 11 18:33:42 2020 +0200 +++ b/test/hotspot/jtreg/gc/shenandoah/TestObjItrWithHeapDump.java Mon May 11 18:33:50 2020 +0200 @@ -57,7 +57,7 @@ } String[][][] modeHeuristics = new String[][][] { - {{"normal"}, {"adaptive", "compact", "static", "aggressive"}}, + {{"satb"}, {"adaptive", "compact", "static", "aggressive"}}, {{"iu"}, {"adaptive", "aggressive"}}, {{"passive"}, {"passive"}} };
--- a/test/hotspot/jtreg/gc/shenandoah/oom/TestClassLoaderLeak.java Mon May 11 18:33:42 2020 +0200 +++ b/test/hotspot/jtreg/gc/shenandoah/oom/TestClassLoaderLeak.java Mon May 11 18:33:50 2020 +0200 @@ -126,7 +126,7 @@ } String[][][] modeHeuristics = new String[][][] { - {{"normal"}, {"adaptive", "compact", "static", "aggressive"}}, + {{"satb"}, {"adaptive", "compact", "static", "aggressive"}}, {{"iu"}, {"adaptive", "aggressive"}}, {{"passive"}, {"passive"}} };
--- a/test/hotspot/jtreg/gc/shenandoah/options/TestModeUnlock.java Mon May 11 18:33:42 2020 +0200 +++ b/test/hotspot/jtreg/gc/shenandoah/options/TestModeUnlock.java Mon May 11 18:33:50 2020 +0200 @@ -45,7 +45,7 @@ } public static void main(String[] args) throws Exception { - testWith("-XX:ShenandoahGCMode=normal", Mode.PRODUCT); + testWith("-XX:ShenandoahGCMode=satb", Mode.PRODUCT); testWith("-XX:ShenandoahGCMode=iu", Mode.EXPERIMENTAL); testWith("-XX:ShenandoahGCMode=passive", Mode.DIAGNOSTIC); }