1 Star 0 Fork 81

wujiahua/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Reduce-the-probability-of-the-crash-related-to-ciObj.patch 2.46 KB
一键复制 编辑 原始数据 按行查看 历史
jdkboy 提交于 2020-03-21 11:30 . delete redundant info
From 29e183488a96a4c169f89eab9410e0a91a903476 Mon Sep 17 00:00:00 2001
Date: Tue, 22 Oct 2019 19:18:39 +0000
Subject: [PATCH] Reduce the probability of the crash related to
ciObjectFactory::create_new_metadata
Summary: <interpreter>: add load acquire barriers when profiling klass
LLT:
Bug url:
---
hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp | 10 ++++++++++
hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp | 1 +
hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
index d8926cd87d..58fc267f99 100644
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
@@ -3234,6 +3234,16 @@ void MacroAssembler::load_klass(Register dst, Register src) {
}
}
+void MacroAssembler::load_klass_acquire(Register dst, Register src) {
+ lea(dst, Address(src, oopDesc::klass_offset_in_bytes()));
+ if (UseCompressedClassPointers) {
+ ldarw(dst, dst);
+ decode_klass_not_null(dst);
+ } else {
+ ldar(dst, dst);
+ }
+}
+
void MacroAssembler::cmp_klass(Register oop, Register trial_klass, Register tmp) {
if (UseCompressedClassPointers) {
ldrw(tmp, Address(oop, oopDesc::klass_offset_in_bytes()));
diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
index 2cf827dcf0..168fe4d3b1 100644
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
@@ -790,6 +790,7 @@ public:
// oop manipulations
void load_klass(Register dst, Register src);
+ void load_klass_acquire(Register dst, Register src);
void store_klass(Register dst, Register src);
void cmp_klass(Register oop, Register trial_klass, Register tmp);
diff --git a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp
index 1e590780b7..7ee4e317d4 100644
--- a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp
@@ -3243,7 +3243,7 @@ void TemplateTable::invokevirtual_helper(Register index,
// get receiver klass
__ null_check(recv, oopDesc::klass_offset_in_bytes());
- __ load_klass(r0, recv);
+ __ load_klass_acquire(r0, recv);
// profile this call
__ profile_virtual_call(r0, rlocals, r3);
--
2.12.3
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/varlardohaeris/openjdk-1.8.0.git
git@gitee.com:varlardohaeris/openjdk-1.8.0.git
varlardohaeris
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385