Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
afffc5eb
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看板
提交
afffc5eb
编写于
6月 24, 2014
作者:
S
stefank
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8047373: Clean the ExceptionCache in one pass
Summary: Also-reviewed-by: kim.barrett@oracle.com Reviewed-by: jmasa, jwilhelm
上级
bfa001f7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
26 deletion
+21
-26
src/share/vm/code/nmethod.cpp
src/share/vm/code/nmethod.cpp
+20
-25
src/share/vm/code/nmethod.hpp
src/share/vm/code/nmethod.hpp
+1
-1
未找到文件。
src/share/vm/code/nmethod.cpp
浏览文件 @
afffc5eb
...
...
@@ -384,27 +384,30 @@ void nmethod::add_exception_cache_entry(ExceptionCache* new_entry) {
set_exception_cache
(
new_entry
);
}
void
nmethod
::
remove_from_exception_cache
(
ExceptionCache
*
ec
)
{
void
nmethod
::
clean_exception_cache
(
BoolObjectClosure
*
is_alive
)
{
ExceptionCache
*
prev
=
NULL
;
ExceptionCache
*
curr
=
exception_cache
();
assert
(
curr
!=
NULL
,
"nothing to remove"
);
// find the previous and next entry of ec
while
(
curr
!=
ec
)
{
prev
=
curr
;
curr
=
curr
->
next
();
assert
(
curr
!=
NULL
,
"ExceptionCache not found"
);
}
// now: curr == ec
ExceptionCache
*
next
=
curr
->
next
();
if
(
prev
==
NULL
)
{
set_exception_cache
(
next
);
}
else
{
prev
->
set_next
(
next
);
while
(
curr
!=
NULL
)
{
ExceptionCache
*
next
=
curr
->
next
();
Klass
*
ex_klass
=
curr
->
exception_type
();
if
(
ex_klass
!=
NULL
&&
!
ex_klass
->
is_loader_alive
(
is_alive
))
{
if
(
prev
==
NULL
)
{
set_exception_cache
(
next
);
}
else
{
prev
->
set_next
(
next
);
}
delete
curr
;
// prev stays the same.
}
else
{
prev
=
curr
;
}
curr
=
next
;
}
delete
curr
;
}
// public method for accessing the exception cache
// These are the public access methods.
address
nmethod
::
handler_for_exception_and_pc
(
Handle
exception
,
address
pc
)
{
...
...
@@ -1650,15 +1653,7 @@ void nmethod::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred)
}
// Exception cache
ExceptionCache
*
ec
=
exception_cache
();
while
(
ec
!=
NULL
)
{
Klass
*
ex_klass
=
ec
->
exception_type
();
ExceptionCache
*
next_ec
=
ec
->
next
();
if
(
ex_klass
!=
NULL
&&
!
ex_klass
->
is_loader_alive
(
is_alive
))
{
remove_from_exception_cache
(
ec
);
}
ec
=
next_ec
;
}
clean_exception_cache
(
is_alive
);
// If class unloading occurred we first iterate over all inline caches and
// clear ICs where the cached oop is referring to an unloaded klass or method.
...
...
src/share/vm/code/nmethod.hpp
浏览文件 @
afffc5eb
...
...
@@ -534,7 +534,7 @@ public:
void
set_exception_cache
(
ExceptionCache
*
ec
)
{
_exception_cache
=
ec
;
}
address
handler_for_exception_and_pc
(
Handle
exception
,
address
pc
);
void
add_handler_for_exception_and_pc
(
Handle
exception
,
address
pc
,
address
handler
);
void
remove_from_exception_cache
(
ExceptionCache
*
ec
);
void
clean_exception_cache
(
BoolObjectClosure
*
is_alive
);
// implicit exceptions support
address
continuation_for_implicit_exception
(
address
pc
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录