17 Star 6 Fork 65

src-openEuler/openjdk-11

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ZGC-correct-free-heap-size-excluding-waste-in-rule_allocation_rate.patch 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
Noah 提交于 2020-09-11 18:20 . Add several patches
From f3ec83e45b3c6f7f3183c2726701dccd11a00550 Mon Sep 17 00:00:00 2001
Date: Wed, 3 Jun 2020 09:39:34 +0000
Subject: [PATCH] ZGC: correct free heap size excluding waste in
rule_allocation_rate
Summary: <gc>: <need to consider waste for free heap size >
LLT:
Bug url:
---
src/hotspot/share/gc/z/zDirector.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/share/gc/z/zDirector.cpp b/src/hotspot/share/gc/z/zDirector.cpp
index 209bf0a..6f894c3 100644
--- a/src/hotspot/share/gc/z/zDirector.cpp
+++ b/src/hotspot/share/gc/z/zDirector.cpp
@@ -120,7 +120,9 @@ bool ZDirector::rule_allocation_rate() const {
// the allocation rate variance, which means the probability is 1 in 1000
// that a sample is outside of the confidence interval.
const double max_alloc_rate = (ZStatAllocRate::avg() * ZAllocationSpikeTolerance) + (ZStatAllocRate::avg_sd() * one_in_1000);
- const double time_until_oom = free / (max_alloc_rate + 1.0); // Plus 1.0B/s to avoid division by zero
+
+ // Plus 1.0B/s to avoid division by zero. Small or medium page allow 12.5% waste, so 87.5% used.
+ const double time_until_oom = (0.875 * free) / (max_alloc_rate + 1.0);
// Calculate max duration of a GC cycle. The duration of GC is a moving
// average, we add ~3.3 sigma to account for the GC duration variance.
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/src-openeuler/openjdk-11.git
git@gitee.com:src-openeuler/openjdk-11.git
src-openeuler
openjdk-11
openjdk-11
master

搜索帮助