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/shenandoah/shenandoahHeap.inline.hpp"
27 #include "gc/shenandoah/shenandoahHeapRegion.hpp"
28 #include "gc/shenandoah/shenandoahInitLogger.hpp"
29 #include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
30 #include "gc/shenandoah/mode/shenandoahMode.hpp"
31 #include "logging/log.hpp"
32 #include "runtime/globals.hpp"
33 #include "utilities/globalDefinitions.hpp"
34 





35 void ShenandoahInitLogger::print_heap() {
36   GCInitLogger::print_heap();
37 
38   ShenandoahHeap* heap = ShenandoahHeap::heap();
39 
40   log_info(gc, init)("Mode: %s",
41                      heap->mode()->name());
42 
43   log_info(gc, init)("Heuristics: %s",
44                      heap->heuristics()->name());
45 
46   log_info(gc, init)("Heap Region Count: " SIZE_FORMAT,
47                      ShenandoahHeapRegion::region_count());
48 
49   log_info(gc, init)("Heap Region Size: " SIZE_FORMAT "%s",
50                      byte_size_in_exact_unit(ShenandoahHeapRegion::region_size_bytes()),
51                      exact_unit_for_byte_size(ShenandoahHeapRegion::region_size_bytes()));
52 
53   log_info(gc, init)("TLAB Size Max: " SIZE_FORMAT "%s",
54                      byte_size_in_exact_unit(ShenandoahHeapRegion::max_tlab_size_bytes()),
55                      exact_unit_for_byte_size(ShenandoahHeapRegion::max_tlab_size_bytes()));
56 
57   log_info(gc, init)("Humongous Object Threshold: " SIZE_FORMAT "%s",
58           byte_size_in_exact_unit(ShenandoahHeapRegion::humongous_threshold_bytes()),
59           exact_unit_for_byte_size(ShenandoahHeapRegion::humongous_threshold_bytes()));
60 }
61 
62 void ShenandoahInitLogger::print() {
63   ShenandoahInitLogger init_log;
64   init_log.print_all();



65 }
--- EOF ---