Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
908e0bc9
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看板
提交
908e0bc9
编写于
1月 11, 2013
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8005817: Shark: implement deoptimization support
Reviewed-by: twisti Contributed-by:
N
Roman Kennke
<
rkennke@redhat.com
>
上级
534d157f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
39 addition
and
13 deletion
+39
-13
src/cpu/zero/vm/frame_zero.cpp
src/cpu/zero/vm/frame_zero.cpp
+14
-4
src/cpu/zero/vm/frame_zero.inline.hpp
src/cpu/zero/vm/frame_zero.inline.hpp
+12
-3
src/cpu/zero/vm/sharkFrame_zero.hpp
src/cpu/zero/vm/sharkFrame_zero.hpp
+4
-0
src/share/vm/shark/sharkInvariants.hpp
src/share/vm/shark/sharkInvariants.hpp
+5
-3
src/share/vm/shark/sharkTopLevelBlock.cpp
src/share/vm/shark/sharkTopLevelBlock.cpp
+4
-3
未找到文件。
src/cpu/zero/vm/frame_zero.cpp
浏览文件 @
908e0bc9
...
...
@@ -98,10 +98,20 @@ BasicObjectLock* frame::interpreter_frame_monitor_end() const {
#endif // CC_INTERP
void
frame
::
patch_pc
(
Thread
*
thread
,
address
pc
)
{
// We borrow this call to set the thread pointer in the interpreter
// state; the hook to set up deoptimized frames isn't supplied it.
assert
(
pc
==
NULL
,
"should be"
);
get_interpreterState
()
->
set_thread
((
JavaThread
*
)
thread
);
if
(
pc
!=
NULL
)
{
_cb
=
CodeCache
::
find_blob
(
pc
);
SharkFrame
*
sharkframe
=
zeroframe
()
->
as_shark_frame
();
sharkframe
->
set_pc
(
pc
);
_pc
=
pc
;
_deopt_state
=
is_deoptimized
;
}
else
{
// We borrow this call to set the thread pointer in the interpreter
// state; the hook to set up deoptimized frames isn't supplied it.
assert
(
pc
==
NULL
,
"should be"
);
get_interpreterState
()
->
set_thread
((
JavaThread
*
)
thread
);
}
}
bool
frame
::
safe_for_sender
(
JavaThread
*
thread
)
{
...
...
src/cpu/zero/vm/frame_zero.inline.hpp
浏览文件 @
908e0bc9
...
...
@@ -45,27 +45,36 @@ inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
case
ZeroFrame
::
ENTRY_FRAME
:
_pc
=
StubRoutines
::
call_stub_return_pc
();
_cb
=
NULL
;
_deopt_state
=
not_deoptimized
;
break
;
case
ZeroFrame
::
INTERPRETER_FRAME
:
_pc
=
NULL
;
_cb
=
NULL
;
_deopt_state
=
not_deoptimized
;
break
;
case
ZeroFrame
::
SHARK_FRAME
:
case
ZeroFrame
::
SHARK_FRAME
:
{
_pc
=
zero_sharkframe
()
->
pc
();
_cb
=
CodeCache
::
find_blob_unsafe
(
pc
());
address
original_pc
=
nmethod
::
get_deopt_original_pc
(
this
);
if
(
original_pc
!=
NULL
)
{
_pc
=
original_pc
;
_deopt_state
=
is_deoptimized
;
}
else
{
_deopt_state
=
not_deoptimized
;
}
break
;
}
case
ZeroFrame
::
FAKE_STUB_FRAME
:
_pc
=
NULL
;
_cb
=
NULL
;
_deopt_state
=
not_deoptimized
;
break
;
default:
ShouldNotReachHere
();
}
_deopt_state
=
not_deoptimized
;
}
// Accessors
...
...
src/cpu/zero/vm/sharkFrame_zero.hpp
浏览文件 @
908e0bc9
...
...
@@ -68,6 +68,10 @@ class SharkFrame : public ZeroFrame {
return
(
address
)
value_of_word
(
pc_off
);
}
void
set_pc
(
address
pc
)
const
{
*
((
address
*
)
addr_of_word
(
pc_off
))
=
pc
;
}
intptr_t
*
unextended_sp
()
const
{
return
(
intptr_t
*
)
value_of_word
(
unextended_sp_off
);
}
...
...
src/share/vm/shark/sharkInvariants.hpp
浏览文件 @
908e0bc9
...
...
@@ -99,13 +99,15 @@ class SharkCompileInvariants : public ResourceObj {
DebugInformationRecorder
*
debug_info
()
const
{
return
env
()
->
debug_info
();
}
Dependencies
*
dependencies
()
const
{
return
env
()
->
dependencies
();
}
SharkCodeBuffer
*
code_buffer
()
const
{
return
builder
()
->
code_buffer
();
}
public:
Dependencies
*
dependencies
()
const
{
return
env
()
->
dependencies
();
}
// Commonly used classes
protected:
ciInstanceKlass
*
java_lang_Object_klass
()
const
{
...
...
src/share/vm/shark/sharkTopLevelBlock.cpp
浏览文件 @
908e0bc9
...
...
@@ -1030,7 +1030,6 @@ ciMethod* SharkTopLevelBlock::improve_virtual_call(ciMethod* caller,
dest_method
->
holder
()
==
java_lang_Object_klass
())
return
dest_method
;
#ifdef SHARK_CAN_DEOPTIMIZE_ANYWHERE
// This code can replace a virtual call with a direct call if this
// class is the only one in the entire set of loaded classes that
// implements this method. This makes the compiled code dependent
...
...
@@ -1064,6 +1063,8 @@ ciMethod* SharkTopLevelBlock::improve_virtual_call(ciMethod* caller,
if
(
monomorphic_target
!=
NULL
)
{
assert
(
!
monomorphic_target
->
is_abstract
(),
"shouldn't be"
);
function
()
->
dependencies
()
->
assert_unique_concrete_method
(
actual_receiver
,
monomorphic_target
);
// Opto has a bunch of type checking here that I don't
// understand. It's to inhibit casting in one direction,
// possibly because objects in Opto can have inexact
...
...
@@ -1097,7 +1098,6 @@ ciMethod* SharkTopLevelBlock::improve_virtual_call(ciMethod* caller,
// with non-monomorphic targets if the receiver has an exact
// type. We don't mark types this way, so we can't do this.
#endif // SHARK_CAN_DEOPTIMIZE_ANYWHERE
return
NULL
;
}
...
...
@@ -1298,8 +1298,9 @@ void SharkTopLevelBlock::do_call() {
// Try to inline the call
if
(
!
call_is_virtual
)
{
if
(
SharkInliner
::
attempt_inline
(
call_method
,
current_state
()))
if
(
SharkInliner
::
attempt_inline
(
call_method
,
current_state
()))
{
return
;
}
}
// Find the method we are calling
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录