Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/share/gc/epsilon/epsilonInitLogger.cpp
41152 views
1
/*
2
* Copyright (c) 2020, Red Hat, Inc. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*
23
*/
24
25
#include "precompiled.hpp"
26
#include "gc/epsilon/epsilonHeap.hpp"
27
#include "gc/epsilon/epsilonInitLogger.hpp"
28
#include "gc/shared/tlab_globals.hpp"
29
#include "logging/log.hpp"
30
#include "runtime/globals.hpp"
31
#include "runtime/globals_extension.hpp"
32
#include "utilities/globalDefinitions.hpp"
33
34
void EpsilonInitLogger::print_gc_specific() {
35
// Warn users that non-resizable heap might be better for some configurations.
36
// We are not adjusting the heap size by ourselves, because it affects startup time.
37
if (InitialHeapSize != MaxHeapSize) {
38
log_warning(gc, init)("Consider setting -Xms equal to -Xmx to avoid resizing hiccups");
39
}
40
41
// Warn users that AlwaysPreTouch might be better for some configurations.
42
// We are not turning this on by ourselves, because it affects startup time.
43
if (FLAG_IS_DEFAULT(AlwaysPreTouch) && !AlwaysPreTouch) {
44
log_warning(gc, init)("Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups");
45
}
46
47
if (UseTLAB) {
48
size_t max_tlab = EpsilonHeap::heap()->max_tlab_size() * HeapWordSize;
49
log_info(gc, init)("TLAB Size Max: " SIZE_FORMAT "%s",
50
byte_size_in_exact_unit(max_tlab), exact_unit_for_byte_size(max_tlab));
51
if (EpsilonElasticTLAB) {
52
log_info(gc, init)("TLAB Size Elasticity: %.2fx", EpsilonTLABElasticity);
53
}
54
if (EpsilonElasticTLABDecay) {
55
log_info(gc, init)("TLAB Size Decay Time: " SIZE_FORMAT "ms", EpsilonTLABDecayTime);
56
}
57
} else {
58
log_info(gc, init)("TLAB: Disabled");
59
}
60
}
61
62
void EpsilonInitLogger::print() {
63
EpsilonInitLogger init_log;
64
init_log.print_all();
65
}
66
67