Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
2a0e5163
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看板
提交
2a0e5163
编写于
8月 31, 2011
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7078382: JSR 292: don't count method handle adapters against inlining budgets
Reviewed-by: kvn, never
上级
1d3045c9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
41 addition
and
7 deletion
+41
-7
src/share/vm/c1/c1_GraphBuilder.cpp
src/share/vm/c1/c1_GraphBuilder.cpp
+1
-1
src/share/vm/ci/ciMethod.cpp
src/share/vm/ci/ciMethod.cpp
+28
-0
src/share/vm/ci/ciMethod.hpp
src/share/vm/ci/ciMethod.hpp
+3
-0
src/share/vm/ci/ciStreams.hpp
src/share/vm/ci/ciStreams.hpp
+2
-1
src/share/vm/interpreter/bytecodes.hpp
src/share/vm/interpreter/bytecodes.hpp
+2
-0
src/share/vm/opto/bytecodeInfo.cpp
src/share/vm/opto/bytecodeInfo.cpp
+5
-5
未找到文件。
src/share/vm/c1/c1_GraphBuilder.cpp
浏览文件 @
2a0e5163
...
...
@@ -3430,7 +3430,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) {
}
else
{
if
(
inline_level
()
>
MaxInlineLevel
)
INLINE_BAILOUT
(
"too-deep inlining"
);
if
(
recursive_inline_level
(
callee
)
>
MaxRecursiveInlineLevel
)
INLINE_BAILOUT
(
"too-deep recursive inlining"
);
if
(
callee
->
code_size
()
>
max_inline_size
()
)
INLINE_BAILOUT
(
"callee is too large"
);
if
(
callee
->
code_size
_for_inlining
()
>
max_inline_size
()
)
INLINE_BAILOUT
(
"callee is too large"
);
// don't inline throwable methods unless the inlining tree is rooted in a throwable class
if
(
callee
->
name
()
==
ciSymbol
::
object_initializer_name
()
&&
...
...
src/share/vm/ci/ciMethod.cpp
浏览文件 @
2a0e5163
...
...
@@ -1016,6 +1016,34 @@ int ciMethod::highest_osr_comp_level() {
return
get_methodOop
()
->
highest_osr_comp_level
();
}
// ------------------------------------------------------------------
// ciMethod::code_size_for_inlining
//
// Code size for inlining decisions.
//
// Don't fully count method handle adapters against inlining budgets:
// the metric we use here is the number of call sites in the adapter
// as they are probably the instructions which generate some code.
int
ciMethod
::
code_size_for_inlining
()
{
check_is_loaded
();
// Method handle adapters
if
(
is_method_handle_adapter
())
{
// Count call sites
int
call_site_count
=
0
;
ciBytecodeStream
iter
(
this
);
while
(
iter
.
next
()
!=
ciBytecodeStream
::
EOBC
())
{
if
(
Bytecodes
::
is_invoke
(
iter
.
cur_bc
()))
{
call_site_count
++
;
}
}
return
call_site_count
;
}
// Normal method
return
code_size
();
}
// ------------------------------------------------------------------
// ciMethod::instructions_size
//
...
...
src/share/vm/ci/ciMethod.hpp
浏览文件 @
2a0e5163
...
...
@@ -157,6 +157,9 @@ class ciMethod : public ciObject {
int
interpreter_invocation_count
()
const
{
check_is_loaded
();
return
_interpreter_invocation_count
;
}
int
interpreter_throwout_count
()
const
{
check_is_loaded
();
return
_interpreter_throwout_count
;
}
// Code size for inlining decisions.
int
code_size_for_inlining
();
int
comp_level
();
int
highest_osr_comp_level
();
...
...
src/share/vm/ci/ciStreams.hpp
浏览文件 @
2a0e5163
...
...
@@ -129,7 +129,8 @@ public:
// Return current ByteCode and increment PC to next bytecode, skipping all
// intermediate constants. Returns EOBC at end.
// Expected usage:
// while( (bc = iter.next()) != EOBC() ) { ... }
// ciBytecodeStream iter(m);
// while (iter.next() != ciBytecodeStream::EOBC()) { ... }
Bytecodes
::
Code
next
()
{
_bc_start
=
_pc
;
// Capture start of bc
if
(
_pc
>=
_end
)
return
EOBC
();
// End-Of-Bytecodes
...
...
src/share/vm/interpreter/bytecodes.hpp
浏览文件 @
2a0e5163
...
...
@@ -419,6 +419,8 @@ class Bytecodes: AllStatic {
static
bool
is_zero_const
(
Code
code
)
{
return
(
code
==
_aconst_null
||
code
==
_iconst_0
||
code
==
_fconst_0
||
code
==
_dconst_0
);
}
static
bool
is_invoke
(
Code
code
)
{
return
(
_invokevirtual
<=
code
&&
code
<=
_invokedynamic
);
}
static
int
compute_flags
(
const
char
*
format
,
int
more_flags
=
0
);
// compute the flags
static
int
flags
(
int
code
,
bool
is_wide
)
{
assert
(
code
==
(
u_char
)
code
,
"must be a byte"
);
...
...
src/share/vm/opto/bytecodeInfo.cpp
浏览文件 @
2a0e5163
...
...
@@ -45,7 +45,7 @@ InlineTree::InlineTree(Compile* c,
_method
(
callee
),
_site_invoke_ratio
(
site_invoke_ratio
),
_max_inline_level
(
max_inline_level
),
_count_inline_bcs
(
method
()
->
code_size
())
_count_inline_bcs
(
method
()
->
code_size
_for_inlining
())
{
NOT_PRODUCT
(
_count_inlines
=
0
;)
if
(
_caller_jvms
!=
NULL
)
{
...
...
@@ -107,7 +107,7 @@ const char* InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_
// positive filter: should send be inlined? returns NULL (--> yes)
// or rejection msg
int
size
=
callee_method
->
code_size
();
int
size
=
callee_method
->
code_size
_for_inlining
();
// Check for too many throws (and not too huge)
if
(
callee_method
->
interpreter_throwout_count
()
>
InlineThrowCount
&&
...
...
@@ -244,7 +244,7 @@ const char* InlineTree::should_not_inline(ciMethod *callee_method, ciMethod* cal
}
// use frequency-based objections only for non-trivial methods
if
(
callee_method
->
code_size
()
<=
MaxTrivialSize
)
return
NULL
;
if
(
callee_method
->
code_size
_for_inlining
()
<=
MaxTrivialSize
)
return
NULL
;
// don't use counts with -Xcomp or CTW
if
(
UseInterpreter
&&
!
CompileTheWorld
)
{
...
...
@@ -305,7 +305,7 @@ const char* InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_
}
// suppress a few checks for accessors and trivial methods
if
(
callee_method
->
code_size
()
>
MaxTrivialSize
)
{
if
(
callee_method
->
code_size
_for_inlining
()
>
MaxTrivialSize
)
{
// don't inline into giant methods
if
(
C
->
unique
()
>
(
uint
)
NodeCountInliningCutoff
)
{
...
...
@@ -349,7 +349,7 @@ const char* InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_
}
}
int
size
=
callee_method
->
code_size
();
int
size
=
callee_method
->
code_size
_for_inlining
();
if
(
UseOldInlining
&&
ClipInlining
&&
(
int
)
count_inline_bcs
()
+
size
>=
DesiredMethodLimit
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录