Skip to content
Permalink
Browse files

8244740: Shenandoah: rename ShenandoahNormalMode to ShenandoahSATBMode

Reviewed-by: rkennke
  • Loading branch information
shipilev committed May 11, 2020
1 parent 4016667 commit d5414d7929d8a3f8ab369891c02609b9aa0fca10
@@ -28,11 +28,11 @@
#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 "gc/shenandoah/mode/shenandoahSATBMode.hpp"
#include "logging/log.hpp"
#include "logging/logTag.hpp"

void ShenandoahNormalMode::initialize_flags() const {
void ShenandoahSATBMode::initialize_flags() const {
if (ShenandoahConcurrentRoots::can_do_concurrent_class_unloading()) {
FLAG_SET_DEFAULT(ShenandoahSuspendibleWorkers, true);
FLAG_SET_DEFAULT(VerifyBeforeExit, false);
@@ -49,7 +49,7 @@ void ShenandoahNormalMode::initialize_flags() const {
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier);
}

ShenandoahHeuristics* ShenandoahNormalMode::initialize_heuristics() const {
ShenandoahHeuristics* ShenandoahSATBMode::initialize_heuristics() const {
if (ShenandoahGCHeuristics != NULL) {
if (strcmp(ShenandoahGCHeuristics, "aggressive") == 0) {
return new ShenandoahAggressiveHeuristics();
@@ -22,20 +22,20 @@
*
*/

#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP
#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP
#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP
#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP

#include "gc/shenandoah/mode/shenandoahMode.hpp"

class ShenandoahHeuristics;

class ShenandoahNormalMode : public ShenandoahMode {
class ShenandoahSATBMode : public ShenandoahMode {
public:
virtual void initialize_flags() 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_experimental() { return false; }
};

#endif // SHARE_GC_SHENANDOAH_MODE_SHENANDOAHNORMALMODE_HPP
#endif // SHARE_GC_SHENANDOAH_MODE_SHENANDOAHSATBMODE_HPP
@@ -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 @@ jint ShenandoahHeap::initialize() {

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) {
@@ -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)") \
\
@@ -57,7 +57,7 @@ public static void main(String[] args) throws Exception {
}

String[][][] modeHeuristics = new String[][][] {
{{"normal"}, {"adaptive", "compact", "static", "aggressive"}},
{{"satb"}, {"adaptive", "compact", "static", "aggressive"}},
{{"iu"}, {"adaptive", "aggressive"}},
{{"passive"}, {"passive"}}
};
@@ -126,7 +126,7 @@ public static void main(String[] args) throws Exception {
}

String[][][] modeHeuristics = new String[][][] {
{{"normal"}, {"adaptive", "compact", "static", "aggressive"}},
{{"satb"}, {"adaptive", "compact", "static", "aggressive"}},
{{"iu"}, {"adaptive", "aggressive"}},
{{"passive"}, {"passive"}}
};
@@ -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);
}

0 comments on commit d5414d7

Please sign in to comment.