8244740: Shenandoah: rename ShenandoahNormalMode to ShenandoahSATBMode

Reviewed-by: rkennke
This commit is contained in:
Aleksey Shipilev 2020-05-11 18:33:50 +02:00
parent 4016667300
commit d5414d7929
7 changed files with 16 additions and 16 deletions

View File

@ -28,11 +28,11 @@
#include "gc/shenandoah/heuristics/shenandoahAggressiveHeuristics.hpp" #include "gc/shenandoah/heuristics/shenandoahAggressiveHeuristics.hpp"
#include "gc/shenandoah/heuristics/shenandoahCompactHeuristics.hpp" #include "gc/shenandoah/heuristics/shenandoahCompactHeuristics.hpp"
#include "gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp" #include "gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp"
#include "gc/shenandoah/mode/shenandoahNormalMode.hpp" #include "gc/shenandoah/mode/shenandoahSATBMode.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "logging/logTag.hpp" #include "logging/logTag.hpp"
void ShenandoahNormalMode::initialize_flags() const { void ShenandoahSATBMode::initialize_flags() const {
if (ShenandoahConcurrentRoots::can_do_concurrent_class_unloading()) { if (ShenandoahConcurrentRoots::can_do_concurrent_class_unloading()) {
FLAG_SET_DEFAULT(ShenandoahSuspendibleWorkers, true); FLAG_SET_DEFAULT(ShenandoahSuspendibleWorkers, true);
FLAG_SET_DEFAULT(VerifyBeforeExit, false); FLAG_SET_DEFAULT(VerifyBeforeExit, false);
@ -49,7 +49,7 @@ void ShenandoahNormalMode::initialize_flags() const {
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier); SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier);
} }
ShenandoahHeuristics* ShenandoahNormalMode::initialize_heuristics() const { ShenandoahHeuristics* ShenandoahSATBMode::initialize_heuristics() const {
if (ShenandoahGCHeuristics != NULL) { if (ShenandoahGCHeuristics != NULL) {
if (strcmp(ShenandoahGCHeuristics, "aggressive") == 0) { if (strcmp(ShenandoahGCHeuristics, "aggressive") == 0) {
return new ShenandoahAggressiveHeuristics(); return new ShenandoahAggressiveHeuristics();

View File

@ -22,20 +22,20 @@
* *
*/ */
#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP #ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP
#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP #define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP
#include "gc/shenandoah/mode/shenandoahMode.hpp" #include "gc/shenandoah/mode/shenandoahMode.hpp"
class ShenandoahHeuristics; class ShenandoahHeuristics;
class ShenandoahNormalMode : public ShenandoahMode { class ShenandoahSATBMode : public ShenandoahMode {
public: public:
virtual void initialize_flags() const; virtual void initialize_flags() const;
virtual ShenandoahHeuristics* initialize_heuristics() const; virtual ShenandoahHeuristics* initialize_heuristics() const;
virtual const char* name() { return "Normal"; } virtual const char* name() { return "Snapshot-At-TheBeginning"; }
virtual bool is_diagnostic() { return false; } virtual bool is_diagnostic() { return false; }
virtual bool is_experimental() { return false; } virtual bool is_experimental() { return false; }
}; };
#endif // SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP #endif // SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP

View File

@ -65,8 +65,8 @@
#include "gc/shenandoah/shenandoahWorkGroup.hpp" #include "gc/shenandoah/shenandoahWorkGroup.hpp"
#include "gc/shenandoah/shenandoahWorkerPolicy.hpp" #include "gc/shenandoah/shenandoahWorkerPolicy.hpp"
#include "gc/shenandoah/mode/shenandoahIUMode.hpp" #include "gc/shenandoah/mode/shenandoahIUMode.hpp"
#include "gc/shenandoah/mode/shenandoahNormalMode.hpp"
#include "gc/shenandoah/mode/shenandoahPassiveMode.hpp" #include "gc/shenandoah/mode/shenandoahPassiveMode.hpp"
#include "gc/shenandoah/mode/shenandoahSATBMode.hpp"
#if INCLUDE_JFR #if INCLUDE_JFR
#include "gc/shenandoah/shenandoahJfrSupport.hpp" #include "gc/shenandoah/shenandoahJfrSupport.hpp"
#endif #endif
@ -398,8 +398,8 @@ jint ShenandoahHeap::initialize() {
void ShenandoahHeap::initialize_heuristics() { void ShenandoahHeap::initialize_heuristics() {
if (ShenandoahGCMode != NULL) { if (ShenandoahGCMode != NULL) {
if (strcmp(ShenandoahGCMode, "normal") == 0) { if (strcmp(ShenandoahGCMode, "satb") == 0) {
_gc_mode = new ShenandoahNormalMode(); _gc_mode = new ShenandoahSATBMode();
} else if (strcmp(ShenandoahGCMode, "iu") == 0) { } else if (strcmp(ShenandoahGCMode, "iu") == 0) {
_gc_mode = new ShenandoahIUMode(); _gc_mode = new ShenandoahIUMode();
} else if (strcmp(ShenandoahGCMode, "passive") == 0) { } else if (strcmp(ShenandoahGCMode, "passive") == 0) {

View File

@ -63,10 +63,10 @@
"This also caps the maximum TLAB size.") \ "This also caps the maximum TLAB size.") \
range(1, 100) \ range(1, 100) \
\ \
experimental(ccstr, ShenandoahGCMode, "normal", \ experimental(ccstr, ShenandoahGCMode, "satb", \
"GC mode to use. Among other things, this defines which " \ "GC mode to use. Among other things, this defines which " \
"barriers are in in use. Possible values are:" \ "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);" \ " iu - incremental-update concurrent GC (three pass mark-evac-update);" \
" passive - stop the world GC only (either degenerated or full)") \ " passive - stop the world GC only (either degenerated or full)") \
\ \

View File

@ -57,7 +57,7 @@ public class TestObjItrWithHeapDump {
} }
String[][][] modeHeuristics = new String[][][] { String[][][] modeHeuristics = new String[][][] {
{{"normal"}, {"adaptive", "compact", "static", "aggressive"}}, {{"satb"}, {"adaptive", "compact", "static", "aggressive"}},
{{"iu"}, {"adaptive", "aggressive"}}, {{"iu"}, {"adaptive", "aggressive"}},
{{"passive"}, {"passive"}} {{"passive"}, {"passive"}}
}; };

View File

@ -126,7 +126,7 @@ public class TestClassLoaderLeak {
} }
String[][][] modeHeuristics = new String[][][] { String[][][] modeHeuristics = new String[][][] {
{{"normal"}, {"adaptive", "compact", "static", "aggressive"}}, {{"satb"}, {"adaptive", "compact", "static", "aggressive"}},
{{"iu"}, {"adaptive", "aggressive"}}, {{"iu"}, {"adaptive", "aggressive"}},
{{"passive"}, {"passive"}} {{"passive"}, {"passive"}}
}; };

View File

@ -45,7 +45,7 @@ public class TestModeUnlock {
} }
public static void main(String[] args) throws Exception { 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=iu", Mode.EXPERIMENTAL);
testWith("-XX:ShenandoahGCMode=passive", Mode.DIAGNOSTIC); testWith("-XX:ShenandoahGCMode=passive", Mode.DIAGNOSTIC);
} }