Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
48071d84
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看板
提交
48071d84
编写于
4月 16, 2009
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6741757: minor ctw improvements
Reviewed-by: kvn
上级
4437eeb8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
41 addition
and
26 deletion
+41
-26
src/share/vm/classfile/classLoader.cpp
src/share/vm/classfile/classLoader.cpp
+41
-26
未找到文件。
src/share/vm/classfile/classLoader.cpp
浏览文件 @
48071d84
...
...
@@ -1217,31 +1217,34 @@ void ClassLoader::compile_the_world_in(char* name, Handle loader, TRAPS) {
// valid class file. The class loader will check everything else.
if
(
strchr
(
buffer
,
'.'
)
==
NULL
)
{
_compile_the_world_counter
++
;
if
(
_compile_the_world_counter
>=
CompileTheWorldStartAt
&&
_compile_the_world_counter
<=
CompileTheWorldStopAt
)
{
// Construct name without extension
symbolHandle
sym
=
oopFactory
::
new_symbol_handle
(
buffer
,
CHECK
);
// Use loader to load and initialize class
klassOop
ik
=
SystemDictionary
::
resolve_or_null
(
sym
,
loader
,
Handle
(),
THREAD
);
instanceKlassHandle
k
(
THREAD
,
ik
);
if
(
k
.
not_null
()
&&
!
HAS_PENDING_EXCEPTION
)
{
k
->
initialize
(
THREAD
);
if
(
_compile_the_world_counter
>
CompileTheWorldStopAt
)
return
;
// Construct name without extension
symbolHandle
sym
=
oopFactory
::
new_symbol_handle
(
buffer
,
CHECK
);
// Use loader to load and initialize class
klassOop
ik
=
SystemDictionary
::
resolve_or_null
(
sym
,
loader
,
Handle
(),
THREAD
);
instanceKlassHandle
k
(
THREAD
,
ik
);
if
(
k
.
not_null
()
&&
!
HAS_PENDING_EXCEPTION
)
{
k
->
initialize
(
THREAD
);
}
bool
exception_occurred
=
HAS_PENDING_EXCEPTION
;
CLEAR_PENDING_EXCEPTION
;
if
(
CompileTheWorldPreloadClasses
&&
k
.
not_null
())
{
constantPoolKlass
::
preload_and_initialize_all_classes
(
k
->
constants
(),
THREAD
);
if
(
HAS_PENDING_EXCEPTION
)
{
// If something went wrong in preloading we just ignore it
CLEAR_PENDING_EXCEPTION
;
tty
->
print_cr
(
"Preloading failed for (%d) %s"
,
_compile_the_world_counter
,
buffer
);
}
bool
exception_occurred
=
HAS_PENDING_EXCEPTION
;
CLEAR_PENDING_EXCEPTION
;
}
if
(
_compile_the_world_counter
>=
CompileTheWorldStartAt
)
{
if
(
k
.
is_null
()
||
(
exception_occurred
&&
!
CompileTheWorldIgnoreInitErrors
))
{
// If something went wrong (e.g. ExceptionInInitializerError) we skip this class
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping %s"
,
_compile_the_world_counter
,
buffer
);
}
else
{
tty
->
print_cr
(
"CompileTheWorld (%d) : %s"
,
_compile_the_world_counter
,
buffer
);
// Preload all classes to get around uncommon traps
if
(
CompileTheWorldPreloadClasses
)
{
constantPoolKlass
::
preload_and_initialize_all_classes
(
k
->
constants
(),
THREAD
);
if
(
HAS_PENDING_EXCEPTION
)
{
// If something went wrong in preloading we just ignore it
CLEAR_PENDING_EXCEPTION
;
tty
->
print_cr
(
"Preloading failed for (%d) %s"
,
_compile_the_world_counter
,
buffer
);
}
}
// Iterate over all methods in class
for
(
int
n
=
0
;
n
<
k
->
methods
()
->
length
();
n
++
)
{
methodHandle
m
(
THREAD
,
methodOop
(
k
->
methods
()
->
obj_at
(
n
)));
...
...
@@ -1253,16 +1256,28 @@ void ClassLoader::compile_the_world_in(char* name, Handle loader, TRAPS) {
CLEAR_PENDING_EXCEPTION
;
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_counter
,
m
->
name
()
->
as_C_string
());
}
if
(
TieredCompilation
)
{
// Clobber the first compile and force second tier compilation
m
->
clear_code
();
CompileBroker
::
compile_method
(
m
,
InvocationEntryBci
,
methodHandle
(),
0
,
"CTW"
,
THREAD
);
if
(
HAS_PENDING_EXCEPTION
)
{
CLEAR_PENDING_EXCEPTION
;
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_counter
,
m
->
name
()
->
as_C_string
());
if
(
TieredCompilation
)
{
// Clobber the first compile and force second tier compilation
nmethod
*
nm
=
m
->
code
();
if
(
nm
!=
NULL
)
{
// Throw out the code so that the code cache doesn't fill up
nm
->
make_not_entrant
();
m
->
clear_code
();
}
CompileBroker
::
compile_method
(
m
,
InvocationEntryBci
,
methodHandle
(),
0
,
"CTW"
,
THREAD
);
if
(
HAS_PENDING_EXCEPTION
)
{
CLEAR_PENDING_EXCEPTION
;
tty
->
print_cr
(
"CompileTheWorld (%d) : Skipping method: %s"
,
_compile_the_world_counter
,
m
->
name
()
->
as_C_string
());
}
}
}
nmethod
*
nm
=
m
->
code
();
if
(
nm
!=
NULL
)
{
// Throw out the code so that the code cache doesn't fill up
nm
->
make_not_entrant
();
m
->
clear_code
();
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录