Path: blob/master/src/hotspot/share/gc/epsilon/epsilonInitLogger.cpp
41152 views
/*1* Copyright (c) 2020, Red Hat, Inc. 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*/2324#include "precompiled.hpp"25#include "gc/epsilon/epsilonHeap.hpp"26#include "gc/epsilon/epsilonInitLogger.hpp"27#include "gc/shared/tlab_globals.hpp"28#include "logging/log.hpp"29#include "runtime/globals.hpp"30#include "runtime/globals_extension.hpp"31#include "utilities/globalDefinitions.hpp"3233void EpsilonInitLogger::print_gc_specific() {34// Warn users that non-resizable heap might be better for some configurations.35// We are not adjusting the heap size by ourselves, because it affects startup time.36if (InitialHeapSize != MaxHeapSize) {37log_warning(gc, init)("Consider setting -Xms equal to -Xmx to avoid resizing hiccups");38}3940// Warn users that AlwaysPreTouch might be better for some configurations.41// We are not turning this on by ourselves, because it affects startup time.42if (FLAG_IS_DEFAULT(AlwaysPreTouch) && !AlwaysPreTouch) {43log_warning(gc, init)("Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups");44}4546if (UseTLAB) {47size_t max_tlab = EpsilonHeap::heap()->max_tlab_size() * HeapWordSize;48log_info(gc, init)("TLAB Size Max: " SIZE_FORMAT "%s",49byte_size_in_exact_unit(max_tlab), exact_unit_for_byte_size(max_tlab));50if (EpsilonElasticTLAB) {51log_info(gc, init)("TLAB Size Elasticity: %.2fx", EpsilonTLABElasticity);52}53if (EpsilonElasticTLABDecay) {54log_info(gc, init)("TLAB Size Decay Time: " SIZE_FORMAT "ms", EpsilonTLABDecayTime);55}56} else {57log_info(gc, init)("TLAB: Disabled");58}59}6061void EpsilonInitLogger::print() {62EpsilonInitLogger init_log;63init_log.print_all();64}656667