Skip to content
Permalink
Browse files

8244739: Shenandoah: break superclass dependency on ShenandoahNormalMode

Reviewed-by: rkennke
  • Loading branch information
shipilev committed May 11, 2020
1 parent e3138f8 commit 4016667300a9b46402d0fd8a16e7bd8d06a7b996
@@ -55,3 +55,21 @@ void ShenandoahIUMode::initialize_flags() const {
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCASBarrier);
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier);
}

ShenandoahHeuristics* ShenandoahIUMode::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;
}
@@ -25,13 +25,14 @@
#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHIUMODE_HPP
#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHIUMODE_HPP

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

class ShenandoahHeuristics;

class ShenandoahIUMode : public ShenandoahNormalMode {
class ShenandoahIUMode : public ShenandoahMode {
public:
virtual void initialize_flags() const;
virtual ShenandoahHeuristics* initialize_heuristics() const;

virtual const char* name() { return "Incremental-Update"; }
virtual bool is_diagnostic() { return false; }
@@ -25,9 +25,9 @@
#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHPASSIVEMODE_HPP
#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHPASSIVEMODE_HPP

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

class ShenandoahPassiveMode : public ShenandoahNormalMode {
class ShenandoahPassiveMode : public ShenandoahMode {
public:
virtual void initialize_flags() const;
virtual ShenandoahHeuristics* initialize_heuristics() const;

0 comments on commit 4016667

Please sign in to comment.