Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
5033fdc9
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看板
提交
5033fdc9
编写于
10月 04, 2013
作者:
T
twisti
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
6c2aaba3
1c68d9e5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
17 deletion
+31
-17
src/share/vm/opto/bytecodeInfo.cpp
src/share/vm/opto/bytecodeInfo.cpp
+29
-17
src/share/vm/opto/parse.hpp
src/share/vm/opto/parse.hpp
+2
-0
未找到文件。
src/share/vm/opto/bytecodeInfo.cpp
浏览文件 @
5033fdc9
...
...
@@ -197,6 +197,7 @@ bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
// negative filter: should callee NOT be inlined?
bool
InlineTree
::
should_not_inline
(
ciMethod
*
callee_method
,
ciMethod
*
caller_method
,
JVMState
*
jvms
,
WarmCallInfo
*
wci_result
)
{
const
char
*
fail_msg
=
NULL
;
...
...
@@ -226,7 +227,7 @@ bool InlineTree::should_not_inline(ciMethod *callee_method,
// don't inline exception code unless the top method belongs to an
// exception class
if
(
callee_method
->
holder
()
->
is_subclass_of
(
C
->
env
()
->
Throwable_klass
()))
{
ciMethod
*
top_method
=
caller_jvms
()
?
caller_jvms
()
->
of_depth
(
1
)
->
method
()
:
method
();
ciMethod
*
top_method
=
jvms
->
caller
()
!=
NULL
?
jvms
->
caller
()
->
of_depth
(
1
)
->
method
()
:
method
();
if
(
!
top_method
->
holder
()
->
is_subclass_of
(
C
->
env
()
->
Throwable_klass
()))
{
wci_result
->
set_profit
(
wci_result
->
profit
()
*
0.1
);
}
...
...
@@ -328,7 +329,7 @@ bool InlineTree::should_not_inline(ciMethod *callee_method,
// return true if ok
// Relocated from "InliningClosure::try_to_inline"
bool
InlineTree
::
try_to_inline
(
ciMethod
*
callee_method
,
ciMethod
*
caller_method
,
int
caller_bci
,
ciCallProfile
&
profile
,
int
caller_bci
,
JVMState
*
jvms
,
ciCallProfile
&
profile
,
WarmCallInfo
*
wci_result
,
bool
&
should_delay
)
{
// Old algorithm had funny accumulating BC-size counters
...
...
@@ -346,7 +347,7 @@ bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method,
wci_result
))
{
return
false
;
}
if
(
should_not_inline
(
callee_method
,
caller_method
,
wci_result
))
{
if
(
should_not_inline
(
callee_method
,
caller_method
,
jvms
,
wci_result
))
{
return
false
;
}
...
...
@@ -397,24 +398,35 @@ bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method,
}
// detect direct and indirect recursive inlining
if
(
!
callee_method
->
is_compiled_lambda_form
())
{
{
// count the current method and the callee
int
inline_level
=
(
method
()
==
callee_method
)
?
1
:
0
;
if
(
inline_level
>
MaxRecursiveInlineLevel
)
{
set_msg
(
"recursively inlining too deep"
);
return
false
;
const
bool
is_compiled_lambda_form
=
callee_method
->
is_compiled_lambda_form
();
int
inline_level
=
0
;
if
(
!
is_compiled_lambda_form
)
{
if
(
method
()
==
callee_method
)
{
inline_level
++
;
}
}
// count callers of current method and callee
JVMState
*
jvms
=
caller_jvms
();
while
(
jvms
!=
NULL
&&
jvms
->
has_method
())
{
if
(
jvms
->
method
()
==
callee_method
)
{
inline_level
++
;
if
(
inline_level
>
MaxRecursiveInlineLevel
)
{
set_msg
(
"recursively inlining too deep"
);
return
false
;
Node
*
callee_argument0
=
is_compiled_lambda_form
?
jvms
->
map
()
->
argument
(
jvms
,
0
)
->
uncast
()
:
NULL
;
for
(
JVMState
*
j
=
jvms
->
caller
();
j
!=
NULL
&&
j
->
has_method
();
j
=
j
->
caller
())
{
if
(
j
->
method
()
==
callee_method
)
{
if
(
is_compiled_lambda_form
)
{
// Since compiled lambda forms are heavily reused we allow recursive inlining. If it is truly
// a recursion (using the same "receiver") we limit inlining otherwise we can easily blow the
// compiler stack.
Node
*
caller_argument0
=
j
->
map
()
->
argument
(
j
,
0
)
->
uncast
();
if
(
caller_argument0
==
callee_argument0
)
{
inline_level
++
;
}
}
else
{
inline_level
++
;
}
}
jvms
=
jvms
->
caller
();
}
if
(
inline_level
>
MaxRecursiveInlineLevel
)
{
set_msg
(
"recursive inlining is too deep"
);
return
false
;
}
}
...
...
@@ -536,7 +548,7 @@ WarmCallInfo* InlineTree::ok_to_inline(ciMethod* callee_method, JVMState* jvms,
// Check if inlining policy says no.
WarmCallInfo
wci
=
*
(
initial_wci
);
bool
success
=
try_to_inline
(
callee_method
,
caller_method
,
caller_bci
,
profile
,
&
wci
,
should_delay
);
jvms
,
profile
,
&
wci
,
should_delay
);
#ifndef PRODUCT
if
(
UseOldInlining
&&
InlineWarmCalls
...
...
src/share/vm/opto/parse.hpp
浏览文件 @
5033fdc9
...
...
@@ -73,6 +73,7 @@ protected:
bool
try_to_inline
(
ciMethod
*
callee_method
,
ciMethod
*
caller_method
,
int
caller_bci
,
JVMState
*
jvms
,
ciCallProfile
&
profile
,
WarmCallInfo
*
wci_result
,
bool
&
should_delay
);
...
...
@@ -83,6 +84,7 @@ protected:
WarmCallInfo
*
wci_result
);
bool
should_not_inline
(
ciMethod
*
callee_method
,
ciMethod
*
caller_method
,
JVMState
*
jvms
,
WarmCallInfo
*
wci_result
);
void
print_inlining
(
ciMethod
*
callee_method
,
int
caller_bci
,
bool
success
)
const
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录