Skip to content
Permalink
Browse files

8235759: Extend GCConfig::is_gc_supported to mean supported not only …

…included in build

Reviewed-by: pliden
  • Loading branch information
stefank committed Dec 11, 2019
1 parent 8c27388 commit 938a4951ab63931355fdca4890195b4695130cf0
Showing with 6 additions and 1 deletion.
  1. +5 −0 src/hotspot/share/gc/shared/gcArguments.hpp
  2. +1 −1 src/hotspot/share/gc/shared/gcConfig.cpp
@@ -48,6 +48,11 @@ class GCArguments {
virtual size_t conservative_max_heap_alignment() = 0;
virtual CollectedHeap* create_heap() = 0;

// Allows GCs to tell external code if it's supported or not in the current setup.
virtual bool is_supported() const {
return true;
}

void initialize_heap_sizes();

static size_t compute_heap_alignment();
@@ -186,7 +186,7 @@ void GCConfig::initialize() {

bool GCConfig::is_gc_supported(CollectedHeap::Name name) {
FOR_EACH_INCLUDED_GC(gc) {
if (gc->_name == name) {
if (gc->_name == name && gc->_arguments.is_supported()) {
// Supported
return true;
}

0 comments on commit 938a495

Please sign in to comment.
You can’t perform that action at this time.