Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4c1f83e0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4c1f83e0
编写于
7月 21, 2009
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6857159: local schedule failed with checkcast of Thread.currentThread()
Reviewed-by: kvn
上级
fd5f88b7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
170 addition
and
0 deletion
+170
-0
src/share/vm/adlc/formssel.cpp
src/share/vm/adlc/formssel.cpp
+31
-0
src/share/vm/adlc/formssel.hpp
src/share/vm/adlc/formssel.hpp
+6
-0
test/compiler/6857159/Test6857159.java
test/compiler/6857159/Test6857159.java
+68
-0
test/compiler/6857159/Test6857159.sh
test/compiler/6857159/Test6857159.sh
+65
-0
未找到文件。
src/share/vm/adlc/formssel.cpp
浏览文件 @
4c1f83e0
...
...
@@ -420,6 +420,13 @@ Form::DataType InstructForm::is_ideal_load() const {
return
_matrule
->
is_ideal_load
();
}
// Return 'true' if this instruction matches an ideal 'LoadKlass' node
bool
InstructForm
::
skip_antidep_check
()
const
{
if
(
_matrule
==
NULL
)
return
false
;
return
_matrule
->
skip_antidep_check
();
}
// Return 'true' if this instruction matches an ideal 'Load?' node
Form
::
DataType
InstructForm
::
is_ideal_store
()
const
{
if
(
_matrule
==
NULL
)
return
Form
::
none
;
...
...
@@ -567,6 +574,8 @@ bool InstructForm::rematerialize(FormDict &globals, RegisterForm *registers ) {
// loads from memory, so must check for anti-dependence
bool
InstructForm
::
needs_anti_dependence_check
(
FormDict
&
globals
)
const
{
if
(
skip_antidep_check
()
)
return
false
;
// Machine independent loads must be checked for anti-dependences
if
(
is_ideal_load
()
!=
Form
::
none
)
return
true
;
...
...
@@ -3957,6 +3966,28 @@ Form::DataType MatchRule::is_ideal_load() const {
}
bool
MatchRule
::
skip_antidep_check
()
const
{
// Some loads operate on what is effectively immutable memory so we
// should skip the anti dep computations. For some of these nodes
// the rewritable field keeps the anti dep logic from triggering but
// for certain kinds of LoadKlass it does not since they are
// actually reading memory which could be rewritten by the runtime,
// though never by generated code. This disables it uniformly for
// the nodes that behave like this: LoadKlass, LoadNKlass and
// LoadRange.
if
(
_opType
&&
(
strcmp
(
_opType
,
"Set"
)
==
0
)
&&
_rChild
)
{
const
char
*
opType
=
_rChild
->
_opType
;
if
(
strcmp
(
"LoadKlass"
,
opType
)
==
0
||
strcmp
(
"LoadNKlass"
,
opType
)
==
0
||
strcmp
(
"LoadRange"
,
opType
)
==
0
)
{
return
true
;
}
}
return
false
;
}
Form
::
DataType
MatchRule
::
is_ideal_store
()
const
{
Form
::
DataType
ideal_store
=
Form
::
none
;
...
...
src/share/vm/adlc/formssel.hpp
浏览文件 @
4c1f83e0
...
...
@@ -158,6 +158,9 @@ public:
virtual
Form
::
CallType
is_ideal_call
()
const
;
// matches ideal 'Call'
virtual
Form
::
DataType
is_ideal_load
()
const
;
// node matches ideal 'LoadXNode'
// Should antidep checks be disabled for this Instruct
// See definition of MatchRule::skip_antidep_check
bool
skip_antidep_check
()
const
;
virtual
Form
::
DataType
is_ideal_store
()
const
;
// node matches ideal 'StoreXNode'
bool
is_ideal_mem
()
const
{
return
is_ideal_load
()
!=
Form
::
none
||
is_ideal_store
()
!=
Form
::
none
;
}
virtual
uint
two_address
(
FormDict
&
globals
);
// output reg must match input reg
...
...
@@ -1003,6 +1006,9 @@ public:
bool
is_ideal_loopEnd
()
const
;
// node matches ideal 'LoopEnd'
bool
is_ideal_bool
()
const
;
// node matches ideal 'Bool'
Form
::
DataType
is_ideal_load
()
const
;
// node matches ideal 'LoadXNode'
// Should antidep checks be disabled for this rule
// See definition of MatchRule::skip_antidep_check
bool
skip_antidep_check
()
const
;
Form
::
DataType
is_ideal_store
()
const
;
// node matches ideal 'StoreXNode'
// Check if 'mRule2' is a cisc-spill variant of this MatchRule
...
...
test/compiler/6857159/Test6857159.java
0 → 100644
浏览文件 @
4c1f83e0
/*
* 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 6857159
* @summary local schedule failed with checkcast of Thread.currentThread()
*
* @run shell Test6857159.sh
*/
public
class
Test6857159
extends
Thread
{
static
class
ct0
extends
Test6857159
{
public
void
message
()
{
// System.out.println("message");
}
public
void
run
()
{
message
();
ct0
ct
=
(
ct0
)
Thread
.
currentThread
();
ct
.
message
();
}
}
static
class
ct1
extends
ct0
{
public
void
message
()
{
// System.out.println("message");
}
}
static
class
ct2
extends
ct0
{
public
void
message
()
{
// System.out.println("message");
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
for
(
int
i
=
0
;
i
<
100000
;
i
++)
{
Thread
t
=
null
;
switch
(
i
%
3
)
{
case
0
:
t
=
new
ct0
();
break
;
case
1
:
t
=
new
ct1
();
break
;
case
2
:
t
=
new
ct2
();
break
;
}
t
.
start
();
t
.
join
();
}
}
}
test/compiler/6857159/Test6857159.sh
0 → 100644
浏览文件 @
4c1f83e0
#!/bin/sh
#
# 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.
#
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
set
-x
cp
${
TESTSRC
}
/Test6857159.java
.
cp
${
TESTSRC
}
/Test6857159.sh
.
${
TESTJAVA
}
/bin/javac
-d
.
Test6857159.java
${
TESTJAVA
}
/bin/java
${
TESTVMOPTS
}
-Xbatch
-XX
:+PrintCompilation
-XX
:CompileOnly
=
Test6857159
\$
ct.run Test6857159
>
test.out 2>&1
grep
"COMPILE SKIPPED"
test.out
result
=
$?
if
[
$result
-eq
1
]
then
echo
"Passed"
exit
0
else
echo
"Failed"
exit
1
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录