| 1 | /* |
| 2 | * Copyright (c) 2012, 2019, Oracle and/or its affiliates. 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 | #ifndef SHARE_GC_SHARED_GCCONFIGURATION_HPP |
| 26 | #define SHARE_GC_SHARED_GCCONFIGURATION_HPP |
| 27 | |
| 28 | #include "gc/shared/gcName.hpp" |
| 29 | #include "oops/compressedOops.hpp" |
| 30 | #include "utilities/globalDefinitions.hpp" |
| 31 | |
| 32 | class GCConfiguration { |
| 33 | public: |
| 34 | GCName young_collector() const; |
| 35 | GCName old_collector() const; |
| 36 | uint num_parallel_gc_threads() const; |
| 37 | uint num_concurrent_gc_threads() const; |
| 38 | bool uses_dynamic_gc_threads() const; |
| 39 | bool is_explicit_gc_concurrent() const; |
| 40 | bool is_explicit_gc_disabled() const; |
| 41 | uintx gc_time_ratio() const; |
| 42 | |
| 43 | bool has_pause_target_default_value() const; |
| 44 | uintx pause_target() const; |
| 45 | }; |
| 46 | |
| 47 | class GCTLABConfiguration { |
| 48 | public: |
| 49 | bool uses_tlabs() const; |
| 50 | size_t min_tlab_size() const; |
| 51 | uint tlab_refill_waste_limit() const; |
| 52 | }; |
| 53 | |
| 54 | class GCSurvivorConfiguration { |
| 55 | public: |
| 56 | intx initial_tenuring_threshold() const; |
| 57 | intx max_tenuring_threshold() const; |
| 58 | }; |
| 59 | |
| 60 | class GCHeapConfiguration { |
| 61 | public: |
| 62 | size_t max_size() const; |
| 63 | size_t min_size() const; |
| 64 | size_t initial_size() const; |
| 65 | bool uses_compressed_oops() const; |
| 66 | CompressedOops::Mode narrow_oop_mode() const; |
| 67 | uint object_alignment_in_bytes() const; |
| 68 | int heap_address_size_in_bits() const; |
| 69 | }; |
| 70 | |
| 71 | class GCYoungGenerationConfiguration { |
| 72 | public: |
| 73 | bool has_max_size_default_value() const; |
| 74 | uintx max_size() const; |
| 75 | |
| 76 | uintx min_size() const; |
| 77 | intx new_ratio() const; |
| 78 | }; |
| 79 | |
| 80 | #endif // SHARE_GC_SHARED_GCCONFIGURATION_HPP |
| 81 | |