Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/gc_implementation/shared/gcConfiguration.cpp
38921 views
/*1* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/23#include "precompiled.hpp"2425#include "gc_interface/collectedHeap.hpp"26#include "gc_implementation/shared/gcConfiguration.hpp"27#include "memory/universe.hpp"28#include "runtime/arguments.hpp"29#include "runtime/globals.hpp"30#include "utilities/debug.hpp"3132GCName GCConfiguration::young_collector() const {33if (UseG1GC) {34return G1New;35}3637if (UseParallelGC) {38return ParallelScavenge;39}4041if (UseConcMarkSweepGC) {42return ParNew;43}4445return DefNew;46}4748GCName GCConfiguration::old_collector() const {49if (UseG1GC) {50return G1Old;51}5253if (UseConcMarkSweepGC) {54return ConcurrentMarkSweep;55}5657if (UseParallelOldGC) {58return ParallelOld;59}6061return SerialOld;62}6364uint GCConfiguration::num_parallel_gc_threads() const {65return ParallelGCThreads;66}6768uint GCConfiguration::num_concurrent_gc_threads() const {69return ConcGCThreads;70}7172bool GCConfiguration::uses_dynamic_gc_threads() const {73return UseDynamicNumberOfGCThreads;74}7576bool GCConfiguration::is_explicit_gc_concurrent() const {77return ExplicitGCInvokesConcurrent;78}7980bool GCConfiguration::is_explicit_gc_disabled() const {81return DisableExplicitGC;82}8384bool GCConfiguration::has_pause_target_default_value() const {85return FLAG_IS_DEFAULT(MaxGCPauseMillis);86}8788uintx GCConfiguration::pause_target() const {89return MaxGCPauseMillis;90}9192uintx GCConfiguration::gc_time_ratio() const {93return GCTimeRatio;94}9596bool GCTLABConfiguration::uses_tlabs() const {97return UseTLAB;98}99100size_t GCTLABConfiguration::min_tlab_size() const {101return MinTLABSize;102}103104uint GCTLABConfiguration::tlab_refill_waste_limit() const {105return TLABRefillWasteFraction;106}107108intx GCSurvivorConfiguration::max_tenuring_threshold() const {109return MaxTenuringThreshold;110}111112intx GCSurvivorConfiguration::initial_tenuring_threshold() const {113return InitialTenuringThreshold;114}115116size_t GCHeapConfiguration::max_size() const {117return MaxHeapSize;118}119120size_t GCHeapConfiguration::min_size() const {121return Arguments::min_heap_size();122}123124size_t GCHeapConfiguration::initial_size() const {125return InitialHeapSize;126}127128bool GCHeapConfiguration::uses_compressed_oops() const {129return UseCompressedOops;130}131132Universe::NARROW_OOP_MODE GCHeapConfiguration::narrow_oop_mode() const {133return Universe::narrow_oop_mode();134}135136uint GCHeapConfiguration::object_alignment_in_bytes() const {137return ObjectAlignmentInBytes;138}139140int GCHeapConfiguration::heap_address_size_in_bits() const {141return BitsPerHeapOop;142}143144bool GCYoungGenerationConfiguration::has_max_size_default_value() const {145return FLAG_IS_DEFAULT(MaxNewSize);146}147148uintx GCYoungGenerationConfiguration::max_size() const {149return MaxNewSize;150}151152uintx GCYoungGenerationConfiguration::min_size() const {153return NewSize;154}155156intx GCYoungGenerationConfiguration::new_ratio() const {157return NewRatio;158}159160161