代码拉取完成,页面将自动刷新
同步操作将从 misaka00251/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 21a76a7829958e0064051956d1d1f6ddb8b48650 Mon Sep 17 00:00:00 2001
From: eapen <[email protected]>
Date: Mon, 24 Oct 2022 14:54:04 +0800
Subject: [PATCH 28/33] I68TO2: 8065402: G1 does not expand marking stack when mark
stack overflow happens during concurrent marking
---
.../vm/gc_implementation/g1/concurrentMark.cpp | 22 ++++++----------------
.../vm/gc_implementation/g1/concurrentMark.hpp | 4 ----
2 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
index 831ec94..df901a5 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -247,7 +247,6 @@ bool CMMarkStack::allocate(size_t capacity) {
setEmpty();
_capacity = (jint) capacity;
_saved_index = -1;
- _should_expand = false;
NOT_PRODUCT(_max_depth = 0);
return true;
}
@@ -256,8 +255,6 @@ void CMMarkStack::expand() {
// Called, during remark, if we've overflown the marking stack during marking.
assert(isEmpty(), "stack should been emptied while handling overflow");
assert(_capacity <= (jint) MarkStackSizeMax, "stack bigger than permitted");
- // Clear expansion flag
- _should_expand = false;
if (_capacity == (jint) MarkStackSizeMax) {
if (PrintGCDetails && Verbose) {
gclog_or_tty->print_cr(" (benign) Can't expand marking stack capacity, at max size limit");
@@ -290,13 +287,6 @@ void CMMarkStack::expand() {
}
}
-void CMMarkStack::set_should_expand() {
- // If we're resetting the marking state because of an
- // marking stack overflow, record that we should, if
- // possible, expand the stack.
- _should_expand = _cm->has_overflown();
-}
-
CMMarkStack::~CMMarkStack() {
if (_base != NULL) {
_base = NULL;
@@ -795,8 +785,13 @@ void ConcurrentMark::reset() {
void ConcurrentMark::reset_marking_state(bool clear_overflow) {
- _markStack.set_should_expand();
_markStack.setEmpty(); // Also clears the _markStack overflow flag
+
+ // Expand the marking stack, if we have to and if we can.
+ if (has_overflown()) {
+ _markStack.expand();
+ }
+
if (clear_overflow) {
clear_has_overflown();
} else {
@@ -1367,11 +1362,6 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
set_non_marking_state();
}
- // Expand the marking stack, if we have to and if we can.
- if (_markStack.should_expand()) {
- _markStack.expand();
- }
-
// Statistics
double now = os::elapsedTime();
_remark_mark_times.add((mark_work_end - start) * 1000.0);
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp
index f78b1cb..bbd5d59 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp
@@ -178,7 +178,6 @@ class CMMarkStack VALUE_OBJ_CLASS_SPEC {
NOT_PRODUCT(jint _max_depth;) // max depth plumbed during run
bool _overflow;
- bool _should_expand;
DEBUG_ONLY(bool _drain_in_progress;)
DEBUG_ONLY(bool _drain_in_progress_yields;)
@@ -255,9 +254,6 @@ class CMMarkStack VALUE_OBJ_CLASS_SPEC {
bool overflow() { return _overflow; }
void clear_overflow() { _overflow = false; }
- bool should_expand() const { return _should_expand; }
- void set_should_expand();
-
// Expand the stack, typically in response to an overflow condition
void expand();
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。