< prev index next > src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
Print this page
/*
* Copyright (c) 2018, 2022, Red Hat, Inc. All rights reserved.
+ * Copyright Amazon.com Inc. or its affiliates. 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.
#include "gc/shared/gcArguments.hpp"
#include "gc/shared/tlab_globals.hpp"
#include "gc/shared/workerPolicy.hpp"
#include "gc/shenandoah/shenandoahArguments.hpp"
#include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
+ #include "gc/shenandoah/shenandoahGenerationalHeap.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/java.hpp"
#include "utilities/defaultStream.hpp"
FLAG_SET_DEFAULT(ShenandoahGCHeuristics, "passive");
FLAG_SET_DEFAULT(ShenandoahSATBBarrier, false);
FLAG_SET_DEFAULT(ShenandoahLoadRefBarrier, false);
FLAG_SET_DEFAULT(ShenandoahCASBarrier, false);
+ FLAG_SET_DEFAULT(ShenandoahCardBarrier, false);
FLAG_SET_DEFAULT(ShenandoahCloneBarrier, false);
FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
#endif
if (UseLargePages) {
// storage allocation code NUMA-aware.
if (FLAG_IS_DEFAULT(UseNUMA)) {
FLAG_SET_DEFAULT(UseNUMA, true);
}
+ // We use this as the time period for tracking minimum mutator utilization (MMU).
+ // In generational mode, the MMU is used as a signal to adjust the size of the
+ // young generation.
+ if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
+ FLAG_SET_DEFAULT(GCPauseIntervalMillis, 5000);
+ }
+
// Set up default number of concurrent threads. We want to have cycles complete fast
// enough, but we also do not want to steal too much CPU from the concurrently running
// application. Using 1/4 of available threads for concurrent GC seems a good
// compromise here.
bool ergo_conc = FLAG_IS_DEFAULT(ConcGCThreads);
}
return align;
}
void ShenandoahArguments::initialize_alignments() {
+ CardTable::initialize_card_size();
+
// Need to setup sizes early to get correct alignments.
MaxHeapSize = ShenandoahHeapRegion::setup_sizes(MaxHeapSize);
// This is expected by our algorithm for ShenandoahHeap::heap_region_containing().
size_t align = ShenandoahHeapRegion::region_size_bytes();
SpaceAlignment = align;
HeapAlignment = align;
}
CollectedHeap* ShenandoahArguments::create_heap() {
! return new ShenandoahHeap(new ShenandoahCollectorPolicy());
}
SpaceAlignment = align;
HeapAlignment = align;
}
CollectedHeap* ShenandoahArguments::create_heap() {
! if (strcmp(ShenandoahGCMode, "generational") != 0) {
+ // Not generational
+ return new ShenandoahHeap(new ShenandoahCollectorPolicy());
+ } else {
+ return new ShenandoahGenerationalHeap(new ShenandoahCollectorPolicy());
+ }
}
< prev index next >