Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
8a8e237b
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8a8e237b
编写于
4月 22, 2020
作者:
T
thartmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8242108: Performance regression after fix for JDK-8229496
Summary: Backed out the fix for 8229496. Reviewed-by: kvn, roland
上级
a8cf5f23
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
105 addition
and
159 deletion
+105
-159
src/hotspot/cpu/aarch64/aarch64.ad
src/hotspot/cpu/aarch64/aarch64.ad
+0
-11
src/hotspot/cpu/arm/arm.ad
src/hotspot/cpu/arm/arm.ad
+0
-8
src/hotspot/cpu/ppc/ppc.ad
src/hotspot/cpu/ppc/ppc.ad
+0
-8
src/hotspot/cpu/s390/s390.ad
src/hotspot/cpu/s390/s390.ad
+0
-8
src/hotspot/cpu/sparc/sparc.ad
src/hotspot/cpu/sparc/sparc.ad
+0
-8
src/hotspot/cpu/x86/x86_32.ad
src/hotspot/cpu/x86/x86_32.ad
+0
-9
src/hotspot/cpu/x86/x86_64.ad
src/hotspot/cpu/x86/x86_64.ad
+0
-11
src/hotspot/share/opto/castnode.cpp
src/hotspot/share/opto/castnode.cpp
+0
-52
src/hotspot/share/opto/castnode.hpp
src/hotspot/share/opto/castnode.hpp
+0
-13
src/hotspot/share/opto/cfgnode.cpp
src/hotspot/share/opto/cfgnode.cpp
+3
-4
src/hotspot/share/opto/classes.hpp
src/hotspot/share/opto/classes.hpp
+0
-1
src/hotspot/share/opto/graphKit.cpp
src/hotspot/share/opto/graphKit.cpp
+19
-21
src/hotspot/share/opto/node.hpp
src/hotspot/share/opto/node.hpp
+1
-4
src/hotspot/share/runtime/vmStructs.cpp
src/hotspot/share/runtime/vmStructs.cpp
+0
-1
test/micro/org/openjdk/bench/java/text/DefFormatterBench.java
.../micro/org/openjdk/bench/java/text/DefFormatterBench.java
+82
-0
未找到文件。
src/hotspot/cpu/aarch64/aarch64.ad
浏览文件 @
8a8e237b
...
...
@@ -7916,17 +7916,6 @@ instruct castII(iRegI dst)
ins_pipe(pipe_class_empty);
%}
instruct castLL(iRegL dst)
%{
match(Set dst (CastLL dst));
size(0);
format %{ "# castLL of $dst" %}
ins_encode(/* empty encoding */);
ins_cost(0);
ins_pipe(pipe_class_empty);
%}
// ============================================================================
// Atomic operation instructions
//
...
...
src/hotspot/cpu/arm/arm.ad
浏览文件 @
8a8e237b
...
...
@@ -6901,14 +6901,6 @@ instruct castII( iRegI dst ) %{
ins_pipe(empty);
%}
instruct castLL( iRegL dst ) %{
match(Set dst (CastLL dst));
format %{ "! castLL of $dst" %}
ins_encode( /*empty encoding*/ );
ins_cost(0);
ins_pipe(empty);
%}
//----------Arithmetic Instructions--------------------------------------------
// Addition Instructions
// Register Addition
...
...
src/hotspot/cpu/ppc/ppc.ad
浏览文件 @
8a8e237b
...
...
@@ -10821,14 +10821,6 @@ instruct castII(iRegIdst dst) %{
ins_pipe(pipe_class_default);
%}
instruct castLL(iRegLdst dst) %{
match(Set dst (CastLL dst));
format %{ " -- \t// castLL of $dst" %}
size(0);
ins_encode( /*empty*/ );
ins_pipe(pipe_class_default);
%}
instruct checkCastPP(iRegPdst dst) %{
match(Set dst (CheckCastPP dst));
format %{ " -- \t// checkcastPP of $dst" %}
...
...
src/hotspot/cpu/s390/s390.ad
浏览文件 @
8a8e237b
...
...
@@ -5371,14 +5371,6 @@ instruct castII(iRegI dst) %{
ins_pipe(pipe_class_dummy);
%}
instruct castLL(iRegL dst) %{
match(Set dst (CastLL dst));
size(0);
format %{ "# castLL of $dst" %}
ins_encode(/*empty*/);
ins_pipe(pipe_class_dummy);
%}
//----------Conditional_store--------------------------------------------------
// Conditional-store of the updated heap-top.
...
...
src/hotspot/cpu/sparc/sparc.ad
浏览文件 @
8a8e237b
...
...
@@ -6812,14 +6812,6 @@ instruct castII( iRegI dst ) %{
ins_pipe(empty);
%}
instruct castLL( iRegL dst ) %{
match(Set dst (CastLL dst));
format %{ "# castLL of $dst" %}
ins_encode( /*empty encoding*/ );
ins_cost(0);
ins_pipe(empty);
%}
//----------Arithmetic Instructions--------------------------------------------
// Addition Instructions
// Register Addition
...
...
src/hotspot/cpu/x86/x86_32.ad
浏览文件 @
8a8e237b
...
...
@@ -7324,15 +7324,6 @@ instruct castII( rRegI dst ) %{
ins_pipe( empty );
%}
instruct castLL( eRegL dst ) %{
match(Set dst (CastLL dst));
format %{ "#castLL of $dst" %}
ins_encode( /*empty encoding*/ );
ins_cost(0);
ins_pipe( empty );
%}
// Load-locked - same as a regular pointer load when used with compare-swap
instruct loadPLocked(eRegP dst, memory mem) %{
match(Set dst (LoadPLocked mem));
...
...
src/hotspot/cpu/x86/x86_64.ad
浏览文件 @
8a8e237b
...
...
@@ -7489,17 +7489,6 @@ instruct castII(rRegI dst)
ins_pipe(empty);
%}
instruct castLL(rRegL dst)
%{
match(Set dst (CastLL dst));
size(0);
format %{ "# castLL of $dst" %}
ins_encode(/* empty encoding */);
ins_cost(0);
ins_pipe(empty);
%}
// LoadP-locked same as a regular LoadP when used with compare-swap
instruct loadPLocked(rRegP dst, memory mem)
%{
...
...
src/hotspot/share/opto/castnode.cpp
浏览文件 @
8a8e237b
...
...
@@ -63,14 +63,6 @@ const Type* ConstraintCastNode::Value(PhaseGVN* phase) const {
if
(
rt
->
empty
())
assert
(
ft
==
Type
::
TOP
,
"special case #2"
);
break
;
}
case
Op_CastLL
:
{
const
Type
*
t1
=
phase
->
type
(
in
(
1
));
if
(
t1
==
Type
::
TOP
)
assert
(
ft
==
Type
::
TOP
,
"special case #1"
);
const
Type
*
rt
=
t1
->
join_speculative
(
_type
);
if
(
rt
->
empty
())
assert
(
ft
==
Type
::
TOP
,
"special case #2"
);
break
;
}
case
Op_CastPP
:
if
(
phase
->
type
(
in
(
1
))
==
TypePtr
::
NULL_PTR
&&
_type
->
isa_ptr
()
&&
_type
->
is_ptr
()
->
_ptr
==
TypePtr
::
NotNull
)
...
...
@@ -104,11 +96,6 @@ Node* ConstraintCastNode::make_cast(int opcode, Node* c, Node *n, const Type *t,
cast
->
set_req
(
0
,
c
);
return
cast
;
}
case
Op_CastLL
:
{
Node
*
cast
=
new
CastLLNode
(
n
,
t
,
carry_dependency
);
cast
->
set_req
(
0
,
c
);
return
cast
;
}
case
Op_CastPP
:
{
Node
*
cast
=
new
CastPPNode
(
n
,
t
,
carry_dependency
);
cast
->
set_req
(
0
,
c
);
...
...
@@ -292,45 +279,6 @@ void CastIINode::dump_spec(outputStream* st) const {
}
#endif
Node
*
CastLLNode
::
Ideal
(
PhaseGVN
*
phase
,
bool
can_reshape
)
{
Node
*
progress
=
ConstraintCastNode
::
Ideal
(
phase
,
can_reshape
);
if
(
progress
!=
NULL
)
{
return
progress
;
}
// Same as in CastIINode::Ideal but for TypeLong instead of TypeInt
if
(
can_reshape
&&
!
phase
->
C
->
major_progress
())
{
const
TypeLong
*
this_type
=
this
->
type
()
->
is_long
();
const
TypeLong
*
in_type
=
phase
->
type
(
in
(
1
))
->
isa_long
();
if
(
in_type
!=
NULL
&&
this_type
!=
NULL
&&
(
in_type
->
_lo
!=
this_type
->
_lo
||
in_type
->
_hi
!=
this_type
->
_hi
))
{
jlong
lo1
=
this_type
->
_lo
;
jlong
hi1
=
this_type
->
_hi
;
int
w1
=
this_type
->
_widen
;
if
(
lo1
>=
0
)
{
// Keep a range assertion of >=0.
lo1
=
0
;
hi1
=
max_jlong
;
}
else
if
(
hi1
<
0
)
{
// Keep a range assertion of <0.
lo1
=
min_jlong
;
hi1
=
-
1
;
}
else
{
lo1
=
min_jlong
;
hi1
=
max_jlong
;
}
const
TypeLong
*
wtype
=
TypeLong
::
make
(
MAX2
(
in_type
->
_lo
,
lo1
),
MIN2
(
in_type
->
_hi
,
hi1
),
MAX2
((
int
)
in_type
->
_widen
,
w1
));
if
(
wtype
!=
type
())
{
set_type
(
wtype
);
return
this
;
}
}
}
return
NULL
;
}
//=============================================================================
//------------------------------Identity---------------------------------------
// If input is already higher or equal to cast type, then this is an identity.
...
...
src/hotspot/share/opto/castnode.hpp
浏览文件 @
8a8e237b
...
...
@@ -91,19 +91,6 @@ class CastIINode: public ConstraintCastNode {
#endif
};
//------------------------------CastLLNode-------------------------------------
// cast long to long (different range)
class
CastLLNode
:
public
ConstraintCastNode
{
public:
CastLLNode
(
Node
*
n
,
const
Type
*
t
,
bool
carry_dependency
=
false
)
:
ConstraintCastNode
(
n
,
t
,
carry_dependency
)
{
init_class_id
(
Class_CastLL
);
}
virtual
int
Opcode
()
const
;
virtual
uint
ideal_reg
()
const
{
return
Op_RegL
;
}
virtual
Node
*
Ideal
(
PhaseGVN
*
phase
,
bool
can_reshape
);
};
//------------------------------CastPPNode-------------------------------------
// cast pointer to pointer (different type)
class
CastPPNode
:
public
ConstraintCastNode
{
...
...
src/hotspot/share/opto/cfgnode.cpp
浏览文件 @
8a8e237b
...
...
@@ -1727,13 +1727,12 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
// Wait until after parsing for the type information to propagate from the casts.
assert
(
can_reshape
,
"Invalid during parsing"
);
const
Type
*
phi_type
=
bottom_type
();
assert
(
phi_type
->
isa_int
()
||
phi_type
->
isa_long
()
||
phi_type
->
isa_ptr
(),
"bad phi type"
);
// Add casts to carry the control dependency of the Phi that is going away
assert
(
phi_type
->
isa_int
()
||
phi_type
->
isa_ptr
(),
"bad phi type"
);
// Add casts to carry the control dependency of the Phi that is
// going away
Node
*
cast
=
NULL
;
if
(
phi_type
->
isa_int
())
{
cast
=
ConstraintCastNode
::
make_cast
(
Op_CastII
,
r
,
uin
,
phi_type
,
true
);
}
else
if
(
phi_type
->
isa_long
())
{
cast
=
ConstraintCastNode
::
make_cast
(
Op_CastLL
,
r
,
uin
,
phi_type
,
true
);
}
else
{
const
Type
*
uin_type
=
phase
->
type
(
uin
);
if
(
!
phi_type
->
isa_oopptr
()
&&
!
uin_type
->
isa_oopptr
())
{
...
...
src/hotspot/share/opto/classes.hpp
浏览文件 @
8a8e237b
...
...
@@ -57,7 +57,6 @@ macro(CallLeafNoFP)
macro
(
CallRuntime
)
macro
(
CallStaticJava
)
macro
(
CastII
)
macro
(
CastLL
)
macro
(
CastX2P
)
macro
(
CastP2X
)
macro
(
CastPP
)
...
...
src/hotspot/share/opto/graphKit.cpp
浏览文件 @
8a8e237b
...
...
@@ -1362,37 +1362,35 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
// Cast obj to not-null on this path, if there is no null_control.
// (If there is a null_control, a non-null value may come back to haunt us.)
return
cast_not_null
(
value
,
(
null_control
==
NULL
||
(
*
null_control
)
==
top
()));
if
(
type
==
T_OBJECT
)
{
Node
*
cast
=
cast_not_null
(
value
,
false
);
if
(
null_control
==
NULL
||
(
*
null_control
)
==
top
())
replace_in_map
(
value
,
cast
);
value
=
cast
;
}
return
value
;
}
//------------------------------cast_not_null----------------------------------
// Cast obj to not-null on this path
Node
*
GraphKit
::
cast_not_null
(
Node
*
obj
,
bool
do_replace_in_map
)
{
Node
*
cast
=
NULL
;
const
Type
*
t
=
_gvn
.
type
(
obj
);
if
(
t
->
make_ptr
()
!=
NULL
)
{
const
Type
*
t_not_null
=
t
->
join_speculative
(
TypePtr
::
NOTNULL
);
// Object is already not-null?
if
(
t
==
t_not_null
)
{
return
obj
;
}
cast
=
ConstraintCastNode
::
make_cast
(
Op_CastPP
,
control
(),
obj
,
t_not_null
,
false
);
}
else
if
(
t
->
isa_int
()
!=
NULL
)
{
cast
=
ConstraintCastNode
::
make_cast
(
Op_CastII
,
control
(),
obj
,
TypeInt
::
INT
,
true
);
}
else
if
(
t
->
isa_long
()
!=
NULL
)
{
cast
=
ConstraintCastNode
::
make_cast
(
Op_CastLL
,
control
(),
obj
,
TypeLong
::
LONG
,
true
);
}
else
{
fatal
(
"unexpected type: %s"
,
type2name
(
t
->
basic_type
()));
}
cast
=
_gvn
.
transform
(
cast
);
const
Type
*
t
=
_gvn
.
type
(
obj
);
const
Type
*
t_not_null
=
t
->
join_speculative
(
TypePtr
::
NOTNULL
);
// Object is already not-null?
if
(
t
==
t_not_null
)
return
obj
;
Node
*
cast
=
new
CastPPNode
(
obj
,
t_not_null
);
cast
->
init_req
(
0
,
control
());
cast
=
_gvn
.
transform
(
cast
);
// Scan for instances of 'obj' in the current JVM mapping.
// These instances are known to be not-null after the test.
if
(
do_replace_in_map
)
{
if
(
do_replace_in_map
)
replace_in_map
(
obj
,
cast
);
}
return
cast
;
return
cast
;
// Return casted value
}
// Sometimes in intrinsics, we implicitly know an object is not null
...
...
src/hotspot/share/opto/node.hpp
浏览文件 @
8a8e237b
...
...
@@ -52,7 +52,6 @@ class CallNode;
class
CallRuntimeNode
;
class
CallStaticJavaNode
;
class
CastIINode
;
class
CastLLNode
;
class
CatchNode
;
class
CatchProjNode
;
class
CheckCastPPNode
;
...
...
@@ -668,8 +667,7 @@ public:
DEFINE_CLASS_ID
(
Phi
,
Type
,
0
)
DEFINE_CLASS_ID
(
ConstraintCast
,
Type
,
1
)
DEFINE_CLASS_ID
(
CastII
,
ConstraintCast
,
0
)
DEFINE_CLASS_ID
(
CastLL
,
ConstraintCast
,
1
)
DEFINE_CLASS_ID
(
CheckCastPP
,
ConstraintCast
,
2
)
DEFINE_CLASS_ID
(
CheckCastPP
,
ConstraintCast
,
1
)
DEFINE_CLASS_ID
(
CMove
,
Type
,
3
)
DEFINE_CLASS_ID
(
SafePointScalarObject
,
Type
,
4
)
DEFINE_CLASS_ID
(
DecodeNarrowPtr
,
Type
,
5
)
...
...
@@ -809,7 +807,6 @@ public:
DEFINE_CLASS_QUERY
(
CatchProj
)
DEFINE_CLASS_QUERY
(
CheckCastPP
)
DEFINE_CLASS_QUERY
(
CastII
)
DEFINE_CLASS_QUERY
(
CastLL
)
DEFINE_CLASS_QUERY
(
ConstraintCast
)
DEFINE_CLASS_QUERY
(
ClearArray
)
DEFINE_CLASS_QUERY
(
CMove
)
...
...
src/hotspot/share/runtime/vmStructs.cpp
浏览文件 @
8a8e237b
...
...
@@ -1608,7 +1608,6 @@ typedef PaddedEnd<ObjectMonitor> PaddedObjectMonitor;
declare_c2_type(DecodeNKlassNode, TypeNode) \
declare_c2_type(ConstraintCastNode, TypeNode) \
declare_c2_type(CastIINode, ConstraintCastNode) \
declare_c2_type(CastLLNode, ConstraintCastNode) \
declare_c2_type(CastPPNode, ConstraintCastNode) \
declare_c2_type(CheckCastPPNode, TypeNode) \
declare_c2_type(Conv2BNode, Node) \
...
...
test/micro/org/openjdk/bench/java/text/DefFormatterBench.java
0 → 100644
浏览文件 @
8a8e237b
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
org.openjdk.bench.java.text
;
import
java.text.NumberFormat
;
import
java.util.Locale
;
import
java.util.concurrent.TimeUnit
;
import
org.openjdk.jmh.annotations.Benchmark
;
import
org.openjdk.jmh.annotations.BenchmarkMode
;
import
org.openjdk.jmh.annotations.Fork
;
import
org.openjdk.jmh.annotations.Measurement
;
import
org.openjdk.jmh.annotations.Mode
;
import
org.openjdk.jmh.annotations.OutputTimeUnit
;
import
org.openjdk.jmh.annotations.Param
;
import
org.openjdk.jmh.annotations.Scope
;
import
org.openjdk.jmh.annotations.State
;
import
org.openjdk.jmh.annotations.Warmup
;
import
org.openjdk.jmh.infra.Blackhole
;
import
org.openjdk.jmh.runner.Runner
;
import
org.openjdk.jmh.runner.options.Options
;
import
org.openjdk.jmh.runner.options.OptionsBuilder
;
@BenchmarkMode
(
Mode
.
Throughput
)
@OutputTimeUnit
(
TimeUnit
.
MILLISECONDS
)
@Warmup
(
iterations
=
5
,
time
=
5
,
timeUnit
=
TimeUnit
.
SECONDS
)
@Measurement
(
iterations
=
5
,
time
=
10
,
timeUnit
=
TimeUnit
.
SECONDS
)
@Fork
(
1
)
@State
(
Scope
.
Benchmark
)
public
class
DefFormatterBench
{
@Param
({
"1.23"
,
"1.49"
,
"1.80"
,
"1.7"
,
"0.0"
,
"-1.49"
,
"-1.50"
,
"9999.9123"
,
"1.494"
,
"1.495"
,
"1.03"
,
"25.996"
,
"-25.996"
})
public
double
value
;
private
DefNumerFormat
dnf
=
new
DefNumerFormat
();
@Benchmark
public
void
testDefNumberFormatter
(
final
Blackhole
blackhole
)
{
blackhole
.
consume
(
this
.
dnf
.
format
(
this
.
value
));
}
public
static
void
main
(
String
...
args
)
throws
Exception
{
Options
opts
=
new
OptionsBuilder
().
include
(
DefFormatterBench
.
class
.
getSimpleName
()).
shouldDoGC
(
true
).
build
();
new
Runner
(
opts
).
run
();
}
private
static
class
DefNumerFormat
{
private
final
NumberFormat
n
;
public
DefNumerFormat
()
{
this
.
n
=
NumberFormat
.
getInstance
(
Locale
.
ENGLISH
);
this
.
n
.
setMaximumFractionDigits
(
2
);
this
.
n
.
setMinimumFractionDigits
(
2
);
this
.
n
.
setGroupingUsed
(
false
);
}
public
String
format
(
final
double
d
)
{
return
this
.
n
.
format
(
d
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录