Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
32fea676
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
32fea676
编写于
10月 07, 2009
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6885584: A particular class structure causes large allocation spike for jit
Reviewed-by: kvn
上级
79c7977b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
85 addition
and
15 deletion
+85
-15
src/share/vm/opto/phaseX.cpp
src/share/vm/opto/phaseX.cpp
+1
-1
src/share/vm/opto/type.cpp
src/share/vm/opto/type.cpp
+23
-11
src/share/vm/opto/type.hpp
src/share/vm/opto/type.hpp
+3
-3
test/compiler/6885584/Test6885584.java
test/compiler/6885584/Test6885584.java
+58
-0
未找到文件。
src/share/vm/opto/phaseX.cpp
浏览文件 @
32fea676
...
...
@@ -1502,7 +1502,7 @@ Node *PhaseCCP::transform_once( Node *n ) {
//---------------------------------saturate------------------------------------
const
Type
*
PhaseCCP
::
saturate
(
const
Type
*
new_type
,
const
Type
*
old_type
,
const
Type
*
limit_type
)
const
{
const
Type
*
wide_type
=
new_type
->
widen
(
old_type
);
const
Type
*
wide_type
=
new_type
->
widen
(
old_type
,
limit_type
);
if
(
wide_type
!=
new_type
)
{
// did we widen?
// If so, we may have widened beyond the limit type. Clip it back down.
new_type
=
wide_type
->
filter
(
limit_type
);
...
...
src/share/vm/opto/type.cpp
浏览文件 @
32fea676
...
...
@@ -1115,7 +1115,7 @@ const Type *TypeInt::xdual() const {
//------------------------------widen------------------------------------------
// Only happens for optimistic top-down optimizations.
const
Type
*
TypeInt
::
widen
(
const
Type
*
old
)
const
{
const
Type
*
TypeInt
::
widen
(
const
Type
*
old
,
const
Type
*
limit
)
const
{
// Coming from TOP or such; no widening
if
(
old
->
base
()
!=
Int
)
return
this
;
const
TypeInt
*
ot
=
old
->
is_int
();
...
...
@@ -1134,15 +1134,21 @@ const Type *TypeInt::widen( const Type *old ) const {
// Now widen new guy.
// Check for widening too far
if
(
_widen
==
WidenMax
)
{
if
(
min_jint
<
_lo
&&
_hi
<
max_jint
)
{
int
max
=
max_jint
;
int
min
=
min_jint
;
if
(
limit
->
isa_int
())
{
max
=
limit
->
is_int
()
->
_hi
;
min
=
limit
->
is_int
()
->
_lo
;
}
if
(
min
<
_lo
&&
_hi
<
max
)
{
// If neither endpoint is extremal yet, push out the endpoint
// which is closer to its respective limit.
if
(
_lo
>=
0
||
// easy common case
(
juint
)(
_lo
-
min
_jint
)
>=
(
juint
)(
max_jint
-
_hi
))
{
(
juint
)(
_lo
-
min
)
>=
(
juint
)(
max
-
_hi
))
{
// Try to widen to an unsigned range type of 31 bits:
return
make
(
_lo
,
max
_jint
,
WidenMax
);
return
make
(
_lo
,
max
,
WidenMax
);
}
else
{
return
make
(
min
_jint
,
_hi
,
WidenMax
);
return
make
(
min
,
_hi
,
WidenMax
);
}
}
return
TypeInt
::
INT
;
...
...
@@ -1357,7 +1363,7 @@ const Type *TypeLong::xdual() const {
//------------------------------widen------------------------------------------
// Only happens for optimistic top-down optimizations.
const
Type
*
TypeLong
::
widen
(
const
Type
*
old
)
const
{
const
Type
*
TypeLong
::
widen
(
const
Type
*
old
,
const
Type
*
limit
)
const
{
// Coming from TOP or such; no widening
if
(
old
->
base
()
!=
Long
)
return
this
;
const
TypeLong
*
ot
=
old
->
is_long
();
...
...
@@ -1376,18 +1382,24 @@ const Type *TypeLong::widen( const Type *old ) const {
// Now widen new guy.
// Check for widening too far
if
(
_widen
==
WidenMax
)
{
if
(
min_jlong
<
_lo
&&
_hi
<
max_jlong
)
{
jlong
max
=
max_jlong
;
jlong
min
=
min_jlong
;
if
(
limit
->
isa_long
())
{
max
=
limit
->
is_long
()
->
_hi
;
min
=
limit
->
is_long
()
->
_lo
;
}
if
(
min
<
_lo
&&
_hi
<
max
)
{
// If neither endpoint is extremal yet, push out the endpoint
// which is closer to its respective limit.
if
(
_lo
>=
0
||
// easy common case
(
julong
)(
_lo
-
min
_jlong
)
>=
(
julong
)(
max_jlong
-
_hi
))
{
(
julong
)(
_lo
-
min
)
>=
(
julong
)(
max
-
_hi
))
{
// Try to widen to an unsigned range type of 32/63 bits:
if
(
_hi
<
max_juint
)
if
(
max
>=
max_juint
&&
_hi
<
max_juint
)
return
make
(
_lo
,
max_juint
,
WidenMax
);
else
return
make
(
_lo
,
max
_jlong
,
WidenMax
);
return
make
(
_lo
,
max
,
WidenMax
);
}
else
{
return
make
(
min
_jlong
,
_hi
,
WidenMax
);
return
make
(
min
,
_hi
,
WidenMax
);
}
}
return
TypeLong
::
LONG
;
...
...
src/share/vm/opto/type.hpp
浏览文件 @
32fea676
...
...
@@ -168,7 +168,7 @@ public:
// MEET operation; lower in lattice.
const
Type
*
meet
(
const
Type
*
t
)
const
;
// WIDEN: 'widens' for Ints and other range types
virtual
const
Type
*
widen
(
const
Type
*
old
)
const
{
return
this
;
}
virtual
const
Type
*
widen
(
const
Type
*
old
,
const
Type
*
limit
)
const
{
return
this
;
}
// NARROW: complement for widen, used by pessimistic phases
virtual
const
Type
*
narrow
(
const
Type
*
old
)
const
{
return
this
;
}
...
...
@@ -409,7 +409,7 @@ public:
virtual
const
Type
*
xmeet
(
const
Type
*
t
)
const
;
virtual
const
Type
*
xdual
()
const
;
// Compute dual right now.
virtual
const
Type
*
widen
(
const
Type
*
t
)
const
;
virtual
const
Type
*
widen
(
const
Type
*
t
,
const
Type
*
limit_type
)
const
;
virtual
const
Type
*
narrow
(
const
Type
*
t
)
const
;
// Do not kill _widen bits.
virtual
const
Type
*
filter
(
const
Type
*
kills
)
const
;
...
...
@@ -465,7 +465,7 @@ public:
virtual
const
Type
*
xmeet
(
const
Type
*
t
)
const
;
virtual
const
Type
*
xdual
()
const
;
// Compute dual right now.
virtual
const
Type
*
widen
(
const
Type
*
t
)
const
;
virtual
const
Type
*
widen
(
const
Type
*
t
,
const
Type
*
limit_type
)
const
;
virtual
const
Type
*
narrow
(
const
Type
*
t
)
const
;
// Do not kill _widen bits.
virtual
const
Type
*
filter
(
const
Type
*
kills
)
const
;
...
...
test/compiler/6885584/Test6885584.java
0 → 100644
浏览文件 @
32fea676
/*
* Copyright 2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
/**
* @test
* @bug 6885584
* @summary A particular class structure causes large allocation spike for jit
*
* @run main/othervm -Xbatch Test6885584
*/
public
class
Test6885584
{
static
private
int
i1
;
static
private
int
i2
;
static
private
int
i3
;
static
int
limit
=
Integer
.
MAX_VALUE
-
8
;
public
static
void
main
(
String
args
[])
{
// Run long enough to trigger an OSR
for
(
int
j
=
200000
;
j
!=
0
;
j
--)
{
}
// This must reference a field
i1
=
i2
;
// The resource leak is roughly proportional to this initial value
for
(
int
k
=
Integer
.
MAX_VALUE
-
1
;
k
!=
0
;
k
--)
{
// Make sure the body does some work
if
(
i2
>
i3
)
i1
=
k
;
if
(
k
<=
limit
)
break
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录