1 Star 0 Fork 81

zhaosai/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
0011-Optimizing-ObjectInputStream-by-FreqInlineSize.patch 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
Date: Mon, 5 Jun 2023 20:35:04 +0800
Subject: Optimizing ObjectInputStream by FreqInlineSize
---
hotspot/src/share/vm/opto/bytecodeInfo.cpp | 2 +-
.../share/classes/java/io/ObjectInputStream.java | 2 +-
.../share/classes/java/io/ObjectOutputStream.java | 2 +-
4 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hotspot/src/share/vm/opto/bytecodeInfo.cpp b/hotspot/src/share/vm/opto/bytecodeInfo.cpp
index 4fa8e12f1..f9191ec06 100644
--- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp
+++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp
@@ -171,7 +171,7 @@ bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
is_unboxing_method(callee_method, C) ||
is_init_with_ea(callee_method, caller_method, C)) {
- max_inline_size = C->freq_inline_size();
+ max_inline_size = (int)FreqInlineSize;
if (size <= max_inline_size && TraceFrequencyInlining) {
CompileTask::print_inline_indent(inline_level());
tty->print_cr("Inlined frequent method (freq=%d count=%d):", freq, call_site_count);
diff --git a/jdk/src/share/classes/java/io/ObjectInputStream.java b/jdk/src/share/classes/java/io/ObjectInputStream.java
index 85e3958b4..6a7280eab 100644
--- a/jdk/src/share/classes/java/io/ObjectInputStream.java
+++ b/jdk/src/share/classes/java/io/ObjectInputStream.java
@@ -387,7 +387,7 @@ public class ObjectInputStream
/**
* value of "useFastSerializer" property
*/
- private static final boolean defaultFastSerializer = UNSAFE.getUseFastSerializer();
+ private final boolean defaultFastSerializer = UNSAFE.getUseFastSerializer();
/**
* true or false for open FastSerilizer
diff --git a/jdk/src/share/classes/java/io/ObjectOutputStream.java b/jdk/src/share/classes/java/io/ObjectOutputStream.java
index 23c1fff59..328f47589 100644
--- a/jdk/src/share/classes/java/io/ObjectOutputStream.java
+++ b/jdk/src/share/classes/java/io/ObjectOutputStream.java
@@ -240,7 +240,7 @@ public class ObjectOutputStream
* Value of "UseFastSerializer" property. The fastSerializer is turned
* on when it is true.
*/
- private static final boolean useFastSerializer = UNSAFE.getUseFastSerializer();
+ private final boolean useFastSerializer = UNSAFE.getUseFastSerializer();
/**
* value of "printFastSerializer" property,
--
2.22.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaosai-Simon/openjdk-1.8.0.git
git@gitee.com:zhaosai-Simon/openjdk-1.8.0.git
zhaosai-Simon
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助