代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Date: Mon, 5 Jun 2023 20:26:02 +0800
Subject: 8223162: Improve ergonomics for Sparse PRT entry sizing
---
.../share/vm/gc_implementation/g1/heapRegionRemSet.cpp | 8 ++++----
.../share/vm/gc_implementation/g1/heapRegionRemSet.hpp | 1 +
hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp | 4 +---
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
index 8167d2b09..9e9391ba6 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
@@ -868,12 +868,12 @@ HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
}
void HeapRegionRemSet::setup_remset_size() {
- // Setup sparse and fine-grain tables sizes.
- // table_size = base * (log(region_size / 1M) + 1)
const int LOG_M = 20;
- int region_size_log_mb = MAX2(HeapRegion::LogOfHRGrainBytes - LOG_M, 0);
+ guarantee(HeapRegion::LogOfHRGrainBytes >= LOG_M, err_msg("Code assumes the region size >= 1M, but is " SIZE_FORMAT "B", HeapRegion::GrainBytes));
+
+ int region_size_log_mb = HeapRegion::LogOfHRGrainBytes - LOG_M;
if (FLAG_IS_DEFAULT(G1RSetSparseRegionEntries)) {
- G1RSetSparseRegionEntries = G1RSetSparseRegionEntriesBase * (region_size_log_mb + 1);
+ G1RSetSparseRegionEntries = G1RSetSparseRegionEntriesBase * ((size_t)1 << (region_size_log_mb + 1));
}
if (FLAG_IS_DEFAULT(G1RSetRegionEntries)) {
G1RSetRegionEntries = G1RSetRegionEntriesBase * (region_size_log_mb + 1);
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp
index 77751b4a9..6659dc550 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp
@@ -271,6 +271,7 @@ public:
HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, HeapRegion* hr);
static uint num_par_rem_sets();
+ // Setup sparse and fine-grain tables sizes.
static void setup_remset_size();
HeapRegion* hr() const {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp
index 17bd4a145..3d2de1a95 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp
@@ -218,9 +218,7 @@ class SparsePRT VALUE_OBJ_CLASS_SPEC {
HeapRegion* _hr;
- enum SomeAdditionalPrivateConstants {
- InitialCapacity = 16
- };
+ static const size_t InitialCapacity = 8;
void expand();
--
2.22.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。