Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
bf649406
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看板
提交
bf649406
编写于
9月 12, 2013
作者:
T
twisti
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
41139e91
13b030dc
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
24 addition
and
4 deletion
+24
-4
src/share/vm/classfile/classLoader.cpp
src/share/vm/classfile/classLoader.cpp
+24
-4
未找到文件。
src/share/vm/classfile/classLoader.cpp
浏览文件 @
bf649406
...
...
@@ -1319,6 +1319,25 @@ static void clear_pending_exception_if_not_oom(TRAPS) {
// The CHECK at the caller will propagate the exception out
}
/**
* Returns if the given method should be compiled when doing compile-the-world.
*
* TODO: This should be a private method in a CompileTheWorld class.
*/
static
bool
can_be_compiled
(
methodHandle
m
,
int
comp_level
)
{
assert
(
CompileTheWorld
,
"must be"
);
// It's not valid to compile a native wrapper for MethodHandle methods
// that take a MemberName appendix since the bytecode signature is not
// correct.
vmIntrinsics
::
ID
iid
=
m
->
intrinsic_id
();
if
(
MethodHandles
::
is_signature_polymorphic
(
iid
)
&&
MethodHandles
::
has_member_arg
(
iid
))
{
return
false
;
}
return
CompilationPolicy
::
can_be_compiled
(
m
,
comp_level
);
}
void
ClassLoader
::
compile_the_world_in
(
char
*
name
,
Handle
loader
,
TRAPS
)
{
int
len
=
(
int
)
strlen
(
name
);
if
(
len
>
6
&&
strcmp
(
".class"
,
name
+
len
-
6
)
==
0
)
{
...
...
@@ -1362,8 +1381,7 @@ void ClassLoader::compile_the_world_in(char* name, Handle loader, TRAPS) {
int
comp_level
=
CompilationPolicy
::
policy
()
->
initial_compile_level
();
for
(
int
n
=
0
;
n
<
k
->
methods
()
->
length
();
n
++
)
{
methodHandle
m
(
THREAD
,
k
->
methods
()
->
at
(
n
));
if
(
CompilationPolicy
::
can_be_compiled
(
m
,
comp_level
))
{
if
(
can_be_compiled
(
m
,
comp_level
))
{
if
(
++
_codecache_sweep_counter
==
CompileTheWorldSafepointInterval
)
{
// Give sweeper a chance to keep up with CTW
VM_ForceSafepoint
op
;
...
...
@@ -1375,7 +1393,7 @@ void ClassLoader::compile_the_world_in(char* name, Handle loader, TRAPS) {
methodHandle
(),
0
,
"CTW"
,
THREAD
);
if
(
HAS_PENDING_EXCEPTION
)
{
clear_pending_exception_if_not_oom
(
CHECK
);
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_class_counter
,
m
->
name
()
->
as_C_string
());
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_class_counter
,
m
->
name
_and_sig_
as_C_string
());
}
else
{
_compile_the_world_method_counter
++
;
}
...
...
@@ -1391,11 +1409,13 @@ void ClassLoader::compile_the_world_in(char* name, Handle loader, TRAPS) {
methodHandle
(),
0
,
"CTW"
,
THREAD
);
if
(
HAS_PENDING_EXCEPTION
)
{
clear_pending_exception_if_not_oom
(
CHECK
);
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_class_counter
,
m
->
name
()
->
as_C_string
());
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_class_counter
,
m
->
name
_and_sig_
as_C_string
());
}
else
{
_compile_the_world_method_counter
++
;
}
}
}
else
{
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_class_counter
,
m
->
name_and_sig_as_C_string
());
}
nmethod
*
nm
=
m
->
code
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录