代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 844511f2b4b6a4be079fc5ac2f2d5b56826df85a Mon Sep 17 00:00:00 2001
Date: Tue, 4 Jun 2024 19:09:40 +0800
Subject: [PATCH] [Huawei]Keep objects when remove unshareable info
---
hotspot/src/share/vm/oops/instanceKlass.cpp | 18 +++---------------
.../Thread/TestThreadDumpClassInitMonitor.java | 15 +++++++++++----
2 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index 833cf9afe..df9aaabfb 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -2467,21 +2467,6 @@ void InstanceKlass::remove_unshareable_info() {
m->remove_unshareable_info();
}
- if (UseAppCDS || DynamicDumpSharedSpaces) {
- if (_oop_map_cache != NULL) {
- delete _oop_map_cache;
- _oop_map_cache = NULL;
- }
-
- JNIid::deallocate(jni_ids());
- set_jni_ids(NULL);
-
- jmethodID* jmeths = methods_jmethod_ids_acquire();
- if (jmeths != (jmethodID*)NULL) {
- release_set_methods_jmethod_ids(NULL);
- FreeHeap(jmeths);
- }
- }
// do array classes also.
array_klasses_do(remove_unshareable_in_class);
// These are not allocated from metaspace. They are safe to set to NULL.
@@ -2489,6 +2474,9 @@ void InstanceKlass::remove_unshareable_info() {
_member_names = NULL;
_osr_nmethods_head = NULL;
_init_thread = NULL;
+ _oop_map_cache = NULL;
+ _jni_ids = NULL;
+ _methods_jmethod_ids = NULL;
}
void InstanceKlass::remove_java_mirror() {
diff --git a/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java b/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java
index 8aa218efb..a2111c362 100644
--- a/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java
+++ b/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java
@@ -148,34 +148,41 @@ public class TestThreadDumpClassInitMonitor {
throw new Error("Unexpected thread state line: " + line);
}
if (isProduct) {
- foundLines += 3;
+ foundLines += 4;
} else {
foundLines++;
}
continue;
}
case 2: { // Debug build
+ if (!line.trim().equals(JAVATHREAD_STATE)) {
+ throw new Error("Unexpected JavaThread state line: " + line);
+ }
+ foundLines++;
+ continue;
+ }
+ case 3: { // Debug build
if (!line.startsWith(THREAD_INFO)) {
throw new Error("Unexpected thread info line: " + line);
}
foundLines++;
continue;
}
- case 3: { // Debug build
+ case 4: { // Debug build
if (!line.trim().equals(JAVATHREAD_STATE)) {
throw new Error("Unexpected JavaThread state line: " + line);
}
foundLines++;
continue;
}
- case 4: {
+ case 5: {
if (!line.trim().startsWith(CURRENT_METHOD)) {
throw new Error("Unexpected current method line: " + line);
}
foundLines++;
continue;
}
- case 5: {
+ case 6: {
if (!line.trim().equals(WAIT_INFO)) {
throw new Error("Unexpected monitor information line: " + line);
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。