Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
33fe8ef6
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看板
提交
33fe8ef6
编写于
3月 18, 2013
作者:
I
iignatyev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8008211: Some of WB tests on compiler fail
Reviewed-by: kvn, vlivanov
上级
f71c860d
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
23 addition
and
9 deletion
+23
-9
test/compiler/whitebox/CompilerWhiteBoxTest.java
test/compiler/whitebox/CompilerWhiteBoxTest.java
+15
-3
test/compiler/whitebox/DeoptimizeAllTest.java
test/compiler/whitebox/DeoptimizeAllTest.java
+2
-2
test/compiler/whitebox/DeoptimizeMethodTest.java
test/compiler/whitebox/DeoptimizeMethodTest.java
+2
-2
test/compiler/whitebox/IsMethodCompilableTest.java
test/compiler/whitebox/IsMethodCompilableTest.java
+2
-2
test/compiler/whitebox/MakeMethodNotCompilableTest.java
test/compiler/whitebox/MakeMethodNotCompilableTest.java
+2
-0
未找到文件。
test/compiler/whitebox/CompilerWhiteBoxTest.java
浏览文件 @
33fe8ef6
...
...
@@ -35,6 +35,8 @@ public abstract class CompilerWhiteBoxTest {
protected
static
final
Method
METHOD
=
getMethod
(
"method"
);
protected
static
final
int
COMPILE_THRESHOLD
=
Integer
.
parseInt
(
getVMOption
(
"CompileThreshold"
,
"10000"
));
protected
static
final
boolean
BACKGROUND_COMPILATION
=
Boolean
.
valueOf
(
getVMOption
(
"BackgroundCompilation"
,
"true"
));
protected
static
Method
getMethod
(
String
name
)
{
try
{
...
...
@@ -45,11 +47,16 @@ public abstract class CompilerWhiteBoxTest {
}
}
protected
static
String
getVMOption
(
String
name
,
String
defaultValue
)
{
protected
static
String
getVMOption
(
String
name
)
{
String
result
;
HotSpotDiagnosticMXBean
diagnostic
=
ManagementFactoryHelper
.
getDiagnosticMXBean
();
result
=
diagnostic
.
getVMOption
(
name
).
getValue
();
return
result
;
}
protected
static
String
getVMOption
(
String
name
,
String
defaultValue
)
{
String
result
=
getVMOption
(
name
);
return
result
==
null
?
defaultValue
:
result
;
}
...
...
@@ -66,6 +73,7 @@ public abstract class CompilerWhiteBoxTest {
}
catch
(
Exception
e
)
{
System
.
out
.
printf
(
"on exception '%s':"
,
e
.
getMessage
());
printInfo
(
METHOD
);
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
System
.
out
.
println
(
"at test's end:"
);
...
...
@@ -100,6 +108,9 @@ public abstract class CompilerWhiteBoxTest {
protected
static
void
waitBackgroundCompilation
(
Method
method
)
throws
InterruptedException
{
if
(!
BACKGROUND_COMPILATION
)
{
return
;
}
final
Object
obj
=
new
Object
();
synchronized
(
obj
)
{
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
...
...
@@ -129,13 +140,14 @@ public abstract class CompilerWhiteBoxTest {
protected
final
int
compile
()
{
int
result
=
0
;
for
(
int
i
=
0
;
i
<
COMPILE_THRESHOLD
;
++
i
)
{
int
count
=
Math
.
max
(
COMPILE_THRESHOLD
,
150000
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
result
+=
method
();
}
System
.
out
.
println
(
"method was invoked "
+
count
+
" times"
);
return
result
;
}
protected
int
method
()
{
return
42
;
}
...
...
test/compiler/whitebox/DeoptimizeAllTest.java
浏览文件 @
33fe8ef6
...
...
@@ -32,12 +32,12 @@
public
class
DeoptimizeAllTest
extends
CompilerWhiteBoxTest
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// to prevent inlining #method into #compile()
WHITE_BOX
.
setDontInlineMethod
(
METHOD
,
true
);
new
DeoptimizeAllTest
().
runTest
();
}
protected
void
test
()
throws
Exception
{
// to prevent inlining #method into #compile()
WHITE_BOX
.
setDontInlineMethod
(
METHOD
,
true
);
compile
();
checkCompiled
(
METHOD
);
WHITE_BOX
.
deoptimizeAll
();
...
...
test/compiler/whitebox/DeoptimizeMethodTest.java
浏览文件 @
33fe8ef6
...
...
@@ -32,12 +32,12 @@
public
class
DeoptimizeMethodTest
extends
CompilerWhiteBoxTest
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// to prevent inlining #method into #compile()
WHITE_BOX
.
setDontInlineMethod
(
METHOD
,
true
);
new
DeoptimizeMethodTest
().
runTest
();
}
protected
void
test
()
throws
Exception
{
// to prevent inlining #method into #compile()
WHITE_BOX
.
setDontInlineMethod
(
METHOD
,
true
);
compile
();
checkCompiled
(
METHOD
);
WHITE_BOX
.
deoptimizeMethod
(
METHOD
);
...
...
test/compiler/whitebox/IsMethodCompilableTest.java
浏览文件 @
33fe8ef6
...
...
@@ -44,6 +44,8 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// to prevent inlining #method into #compile()
WHITE_BOX
.
setDontInlineMethod
(
METHOD
,
true
);
new
IsMethodCompilableTest
().
runTest
();
}
...
...
@@ -58,8 +60,6 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
"Warning: test is not applicable if PerMethodRecompilationCutoff == Inf"
);
return
;
}
// to prevent inlining #method into #compile()
WHITE_BOX
.
setDontInlineMethod
(
METHOD
,
true
);
boolean
madeNotCompilable
=
false
;
for
(
long
i
=
0
;
i
<
PER_METHOD_RECOMPILATION_CUTOFF
;
++
i
)
{
...
...
test/compiler/whitebox/MakeMethodNotCompilableTest.java
浏览文件 @
33fe8ef6
...
...
@@ -32,6 +32,8 @@
public
class
MakeMethodNotCompilableTest
extends
CompilerWhiteBoxTest
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// to prevent inlining #method into #compile()
WHITE_BOX
.
setDontInlineMethod
(
METHOD
,
true
);
new
MakeMethodNotCompilableTest
().
runTest
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录