Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4db6420a
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看板
提交
4db6420a
编写于
11月 12, 2015
作者:
S
stefank
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8058563: InstanceKlass::_dependencies list isn't cleared from empty nmethodBucket entries
Reviewed-by: mgerdin, vlivanov
上级
295f7ff9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
11 deletion
+28
-11
src/share/vm/code/nmethod.cpp
src/share/vm/code/nmethod.cpp
+5
-1
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+1
-5
src/share/vm/oops/instanceKlass.cpp
src/share/vm/oops/instanceKlass.cpp
+19
-2
src/share/vm/oops/instanceKlass.hpp
src/share/vm/oops/instanceKlass.hpp
+2
-1
src/share/vm/oops/klass.cpp
src/share/vm/oops/klass.cpp
+1
-2
未找到文件。
src/share/vm/code/nmethod.cpp
浏览文件 @
4db6420a
...
...
@@ -1619,7 +1619,11 @@ void nmethod::flush_dependencies(BoolObjectClosure* is_alive) {
// During GC the is_alive closure is non-NULL, and is used to
// determine liveness of dependees that need to be updated.
if
(
is_alive
==
NULL
||
klass
->
is_loader_alive
(
is_alive
))
{
InstanceKlass
::
cast
(
klass
)
->
remove_dependent_nmethod
(
this
);
// The GC defers deletion of this entry, since there might be multiple threads
// iterating over the _dependencies graph. Other call paths are single-threaded
// and may delete it immediately.
bool
delete_immediately
=
is_alive
==
NULL
;
InstanceKlass
::
cast
(
klass
)
->
remove_dependent_nmethod
(
this
,
delete_immediately
);
}
}
}
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
4db6420a
...
...
@@ -5045,12 +5045,8 @@ class G1KlassCleaningTask : public StackObj {
public:
void
clean_klass
(
InstanceKlass
*
ik
)
{
ik
->
clean_implementors_list
(
_is_alive
);
ik
->
clean_method_data
(
_is_alive
);
ik
->
clean_weak_instanceklass_links
(
_is_alive
);
// G1 specific cleanup work that has
// been moved here to be done in parallel.
ik
->
clean_dependent_nmethods
();
if
(
JvmtiExport
::
has_redefined_a_class
())
{
InstanceKlass
::
purge_previous_versions
(
ik
);
}
...
...
src/share/vm/oops/instanceKlass.cpp
浏览文件 @
4db6420a
...
...
@@ -1969,7 +1969,7 @@ void InstanceKlass::add_dependent_nmethod(nmethod* nm) {
// find a corresponding bucket otherwise there's a bug in the
// recording of dependecies.
//
void
InstanceKlass
::
remove_dependent_nmethod
(
nmethod
*
nm
)
{
void
InstanceKlass
::
remove_dependent_nmethod
(
nmethod
*
nm
,
bool
delete_immediately
)
{
assert_locked_or_safepoint
(
CodeCache_lock
);
nmethodBucket
*
b
=
_dependencies
;
nmethodBucket
*
last
=
NULL
;
...
...
@@ -1978,7 +1978,17 @@ void InstanceKlass::remove_dependent_nmethod(nmethod* nm) {
int
val
=
b
->
decrement
();
guarantee
(
val
>=
0
,
err_msg
(
"Underflow: %d"
,
val
));
if
(
val
==
0
)
{
set_has_unloaded_dependent
(
true
);
if
(
delete_immediately
)
{
if
(
last
==
NULL
)
{
_dependencies
=
b
->
next
();
}
else
{
last
->
set_next
(
b
->
next
());
}
delete
b
;
}
else
{
// The deletion of this entry is deferred until a later, potentially parallel GC phase.
set_has_unloaded_dependent
(
true
);
}
}
return
;
}
...
...
@@ -2318,6 +2328,13 @@ int InstanceKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
#endif // INCLUDE_ALL_GCS
void
InstanceKlass
::
clean_weak_instanceklass_links
(
BoolObjectClosure
*
is_alive
)
{
clean_implementors_list
(
is_alive
);
clean_method_data
(
is_alive
);
clean_dependent_nmethods
();
}
void
InstanceKlass
::
clean_implementors_list
(
BoolObjectClosure
*
is_alive
)
{
assert
(
class_loader_data
()
->
is_alive
(
is_alive
),
"this klass should be live"
);
if
(
is_interface
())
{
...
...
src/share/vm/oops/instanceKlass.hpp
浏览文件 @
4db6420a
...
...
@@ -785,7 +785,7 @@ class InstanceKlass: public Klass {
// maintenance of deoptimization dependencies
int
mark_dependent_nmethods
(
DepChange
&
changes
);
void
add_dependent_nmethod
(
nmethod
*
nm
);
void
remove_dependent_nmethod
(
nmethod
*
nm
);
void
remove_dependent_nmethod
(
nmethod
*
nm
,
bool
delete_immediately
);
// On-stack replacement support
nmethod
*
osr_nmethods_head
()
const
{
return
_osr_nmethods_head
;
};
...
...
@@ -974,6 +974,7 @@ class InstanceKlass: public Klass {
void
oop_follow_contents
(
oop
obj
);
int
oop_adjust_pointers
(
oop
obj
);
void
clean_weak_instanceklass_links
(
BoolObjectClosure
*
is_alive
);
void
clean_implementors_list
(
BoolObjectClosure
*
is_alive
);
void
clean_method_data
(
BoolObjectClosure
*
is_alive
);
void
clean_dependent_nmethods
();
...
...
src/share/vm/oops/klass.cpp
浏览文件 @
4db6420a
...
...
@@ -454,8 +454,7 @@ void Klass::clean_weak_klass_links(BoolObjectClosure* is_alive, bool clean_alive
// Clean the implementors list and method data.
if
(
clean_alive_klasses
&&
current
->
oop_is_instance
())
{
InstanceKlass
*
ik
=
InstanceKlass
::
cast
(
current
);
ik
->
clean_implementors_list
(
is_alive
);
ik
->
clean_method_data
(
is_alive
);
ik
->
clean_weak_instanceklass_links
(
is_alive
);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录