Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
5ff05585
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看板
提交
5ff05585
编写于
1月 11, 2013
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8005820: Shark: enable JSR292 support
Reviewed-by: twisti Contributed-by:
N
Roman Kennke
<
rkennke@redhat.com
>
上级
77ac5c1b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
36 addition
and
5 deletion
+36
-5
src/share/vm/compiler/abstractCompiler.hpp
src/share/vm/compiler/abstractCompiler.hpp
+1
-0
src/share/vm/compiler/compileBroker.cpp
src/share/vm/compiler/compileBroker.cpp
+1
-1
src/share/vm/shark/sharkBlock.cpp
src/share/vm/shark/sharkBlock.cpp
+1
-1
src/share/vm/shark/sharkCompiler.hpp
src/share/vm/shark/sharkCompiler.hpp
+3
-0
src/share/vm/shark/sharkConstant.cpp
src/share/vm/shark/sharkConstant.cpp
+6
-1
src/share/vm/shark/sharkInliner.cpp
src/share/vm/shark/sharkInliner.cpp
+1
-1
src/share/vm/shark/sharkTopLevelBlock.cpp
src/share/vm/shark/sharkTopLevelBlock.cpp
+23
-1
未找到文件。
src/share/vm/compiler/abstractCompiler.hpp
浏览文件 @
5ff05585
...
@@ -50,6 +50,7 @@ class AbstractCompiler : public CHeapObj<mtCompiler> {
...
@@ -50,6 +50,7 @@ class AbstractCompiler : public CHeapObj<mtCompiler> {
// Missing feature tests
// Missing feature tests
virtual
bool
supports_native
()
{
return
true
;
}
virtual
bool
supports_native
()
{
return
true
;
}
virtual
bool
supports_osr
()
{
return
true
;
}
virtual
bool
supports_osr
()
{
return
true
;
}
virtual
bool
can_compile_method
(
methodHandle
method
)
{
return
true
;
}
#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK))
#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK))
virtual
bool
is_c1
()
{
return
false
;
}
virtual
bool
is_c1
()
{
return
false
;
}
virtual
bool
is_c2
()
{
return
false
;
}
virtual
bool
is_c2
()
{
return
false
;
}
...
...
src/share/vm/compiler/compileBroker.cpp
浏览文件 @
5ff05585
...
@@ -1218,7 +1218,7 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
...
@@ -1218,7 +1218,7 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
// lock, make sure that the compilation
// lock, make sure that the compilation
// isn't prohibited in a straightforward way.
// isn't prohibited in a straightforward way.
if
(
compiler
(
comp_level
)
==
NULL
||
compilation_is_prohibited
(
method
,
osr_bci
,
comp_level
))
{
if
(
compiler
(
comp_level
)
==
NULL
||
!
compiler
(
comp_level
)
->
can_compile_method
(
method
)
||
compilation_is_prohibited
(
method
,
osr_bci
,
comp_level
))
{
return
NULL
;
return
NULL
;
}
}
...
...
src/share/vm/shark/sharkBlock.cpp
浏览文件 @
5ff05585
...
@@ -1032,7 +1032,7 @@ void SharkBlock::do_field_access(bool is_get, bool is_field) {
...
@@ -1032,7 +1032,7 @@ void SharkBlock::do_field_access(bool is_get, bool is_field) {
check_null
(
value
);
check_null
(
value
);
object
=
value
->
generic_value
();
object
=
value
->
generic_value
();
}
}
if
(
is_get
&&
field
->
is_constant
())
{
if
(
is_get
&&
field
->
is_constant
()
&&
field
->
is_static
()
)
{
SharkConstant
*
constant
=
SharkConstant
::
for_field
(
iter
());
SharkConstant
*
constant
=
SharkConstant
::
for_field
(
iter
());
if
(
constant
->
is_loaded
())
if
(
constant
->
is_loaded
())
value
=
constant
->
value
(
builder
());
value
=
constant
->
value
(
builder
());
...
...
src/share/vm/shark/sharkCompiler.hpp
浏览文件 @
5ff05585
...
@@ -46,6 +46,9 @@ class SharkCompiler : public AbstractCompiler {
...
@@ -46,6 +46,9 @@ class SharkCompiler : public AbstractCompiler {
// Missing feature tests
// Missing feature tests
bool
supports_native
()
{
return
true
;
}
bool
supports_native
()
{
return
true
;
}
bool
supports_osr
()
{
return
true
;
}
bool
supports_osr
()
{
return
true
;
}
bool
can_compile_method
(
methodHandle
method
)
{
return
!
(
method
->
is_method_handle_intrinsic
()
||
method
->
is_compiled_lambda_form
());
}
// Customization
// Customization
bool
needs_adapters
()
{
return
false
;
}
bool
needs_adapters
()
{
return
false
;
}
...
...
src/share/vm/shark/sharkConstant.cpp
浏览文件 @
5ff05585
...
@@ -37,7 +37,12 @@ SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) {
...
@@ -37,7 +37,12 @@ SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) {
ciType
*
type
=
NULL
;
ciType
*
type
=
NULL
;
if
(
constant
.
basic_type
()
==
T_OBJECT
)
{
if
(
constant
.
basic_type
()
==
T_OBJECT
)
{
ciEnv
*
env
=
ciEnv
::
current
();
ciEnv
*
env
=
ciEnv
::
current
();
assert
(
constant
.
as_object
()
->
klass
()
==
env
->
String_klass
()
||
constant
.
as_object
()
->
klass
()
==
env
->
Class_klass
(),
"should be"
);
assert
(
constant
.
as_object
()
->
klass
()
==
env
->
String_klass
()
||
constant
.
as_object
()
->
klass
()
==
env
->
Class_klass
()
||
constant
.
as_object
()
->
klass
()
->
is_subtype_of
(
env
->
MethodType_klass
())
||
constant
.
as_object
()
->
klass
()
->
is_subtype_of
(
env
->
MethodHandle_klass
()),
"should be"
);
type
=
constant
.
as_object
()
->
klass
();
type
=
constant
.
as_object
()
->
klass
();
}
}
return
new
SharkConstant
(
constant
,
type
);
return
new
SharkConstant
(
constant
,
type
);
...
...
src/share/vm/shark/sharkInliner.cpp
浏览文件 @
5ff05585
...
@@ -725,7 +725,7 @@ bool SharkInlinerHelper::do_field_access(bool is_get, bool is_field) {
...
@@ -725,7 +725,7 @@ bool SharkInlinerHelper::do_field_access(bool is_get, bool is_field) {
// Push the result if necessary
// Push the result if necessary
if
(
is_get
)
{
if
(
is_get
)
{
bool
result_pushed
=
false
;
bool
result_pushed
=
false
;
if
(
field
->
is_constant
())
{
if
(
field
->
is_constant
()
&&
field
->
is_static
()
)
{
SharkConstant
*
sc
=
SharkConstant
::
for_field
(
iter
());
SharkConstant
*
sc
=
SharkConstant
::
for_field
(
iter
());
if
(
sc
->
is_loaded
())
{
if
(
sc
->
is_loaded
())
{
push
(
sc
->
is_nonzero
());
push
(
sc
->
is_nonzero
());
...
...
src/share/vm/shark/sharkTopLevelBlock.cpp
浏览文件 @
5ff05585
...
@@ -113,7 +113,19 @@ void SharkTopLevelBlock::scan_for_traps() {
...
@@ -113,7 +113,19 @@ void SharkTopLevelBlock::scan_for_traps() {
ciSignature
*
sig
;
ciSignature
*
sig
;
method
=
iter
()
->
get_method
(
will_link
,
&
sig
);
method
=
iter
()
->
get_method
(
will_link
,
&
sig
);
assert
(
will_link
,
"typeflow responsibility"
);
assert
(
will_link
,
"typeflow responsibility"
);
// We can't compile calls to method handle intrinsics, because we use
// the interpreter entry points and they expect the top frame to be an
// interpreter frame. We need to implement the intrinsics for Shark.
if
(
method
->
is_method_handle_intrinsic
()
||
method
->
is_compiled_lambda_form
())
{
if
(
SharkPerformanceWarnings
)
{
warning
(
"JSR292 optimization not yet implemented in Shark"
);
}
set_trap
(
Deoptimization
::
make_trap_request
(
Deoptimization
::
Reason_unhandled
,
Deoptimization
::
Action_make_not_compilable
),
bci
());
return
;
}
if
(
!
method
->
holder
()
->
is_linked
())
{
if
(
!
method
->
holder
()
->
is_linked
())
{
set_trap
(
set_trap
(
Deoptimization
::
make_trap_request
(
Deoptimization
::
make_trap_request
(
...
@@ -158,6 +170,16 @@ void SharkTopLevelBlock::scan_for_traps() {
...
@@ -158,6 +170,16 @@ void SharkTopLevelBlock::scan_for_traps() {
return
;
return
;
}
}
break
;
break
;
case
Bytecodes
::
_invokedynamic
:
case
Bytecodes
::
_invokehandle
:
if
(
SharkPerformanceWarnings
)
{
warning
(
"JSR292 optimization not yet implemented in Shark"
);
}
set_trap
(
Deoptimization
::
make_trap_request
(
Deoptimization
::
Reason_unhandled
,
Deoptimization
::
Action_make_not_compilable
),
bci
());
return
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录