Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
d317f266
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看板
提交
d317f266
编写于
9月 08, 2014
作者:
M
mgerdin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8057722: G1: Code root hashtable updated incorrectly when evacuation failed
Reviewed-by: brutisso, jwilhelm
上级
6c3f70ca
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
27 addition
and
16 deletion
+27
-16
src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp
src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp
+27
-16
未找到文件。
src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp
浏览文件 @
d317f266
...
...
@@ -48,6 +48,7 @@ class CodeRootSetTable : public Hashtable<nmethod*, mtGC> {
return
hash
^
(
hash
>>
7
);
// code heap blocks are 128byte aligned
}
void
remove_entry
(
Entry
*
e
,
Entry
*
previous
);
Entry
*
new_entry
(
nmethod
*
nm
);
public:
...
...
@@ -67,7 +68,7 @@ class CodeRootSetTable : public Hashtable<nmethod*, mtGC> {
void
nmethods_do
(
CodeBlobClosure
*
blk
);
template
<
typename
CB
>
void
remove_if
(
CB
&
should_remove
);
int
remove_if
(
CB
&
should_remove
);
static
void
purge_list_append
(
CodeRootSetTable
*
tbl
);
static
void
purge
();
...
...
@@ -91,6 +92,18 @@ CodeRootSetTable::Entry* CodeRootSetTable::new_entry(nmethod* nm) {
return
entry
;
}
void
CodeRootSetTable
::
remove_entry
(
Entry
*
e
,
Entry
*
previous
)
{
int
index
=
hash_to_index
(
e
->
hash
());
assert
((
e
==
bucket
(
index
))
==
(
previous
==
NULL
),
"if e is the first entry then previous should be null"
);
if
(
previous
==
NULL
)
{
set_entry
(
index
,
e
->
next
());
}
else
{
previous
->
set_next
(
e
->
next
());
}
free_entry
(
e
);
}
CodeRootSetTable
::~
CodeRootSetTable
()
{
for
(
int
index
=
0
;
index
<
table_size
();
++
index
)
{
for
(
Entry
*
e
=
bucket
(
index
);
e
!=
NULL
;
)
{
...
...
@@ -133,12 +146,7 @@ bool CodeRootSetTable::remove(nmethod* nm) {
Entry
*
previous
=
NULL
;
for
(
Entry
*
e
=
bucket
(
index
);
e
!=
NULL
;
previous
=
e
,
e
=
e
->
next
())
{
if
(
e
->
literal
()
==
nm
)
{
if
(
previous
!=
NULL
)
{
previous
->
set_next
(
e
->
next
());
}
else
{
set_entry
(
index
,
e
->
next
());
}
free_entry
(
e
);
remove_entry
(
e
,
previous
);
return
true
;
}
}
...
...
@@ -163,25 +171,23 @@ void CodeRootSetTable::nmethods_do(CodeBlobClosure* blk) {
}
template
<
typename
CB
>
void
CodeRootSetTable
::
remove_if
(
CB
&
should_remove
)
{
int
CodeRootSetTable
::
remove_if
(
CB
&
should_remove
)
{
int
num_removed
=
0
;
for
(
int
index
=
0
;
index
<
table_size
();
++
index
)
{
Entry
*
previous
=
NULL
;
Entry
*
e
=
bucket
(
index
);
while
(
e
!=
NULL
)
{
Entry
*
next
=
e
->
next
();
if
(
should_remove
(
e
->
literal
()))
{
if
(
previous
!=
NULL
)
{
previous
->
set_next
(
next
);
}
else
{
set_entry
(
index
,
next
);
}
free_entry
(
e
);
remove_entry
(
e
,
previous
);
++
num_removed
;
}
else
{
previous
=
e
;
}
e
=
next
;
}
}
return
num_removed
;
}
G1CodeRootSet
::~
G1CodeRootSet
()
{
...
...
@@ -320,14 +326,19 @@ class CleanCallback : public StackObj {
bool
operator
()
(
nmethod
*
nm
)
{
_detector
.
_points_into
=
false
;
_blobs
.
do_code_blob
(
nm
);
return
_detector
.
_points_into
;
return
!
_detector
.
_points_into
;
}
};
void
G1CodeRootSet
::
clean
(
HeapRegion
*
owner
)
{
CleanCallback
should_clean
(
owner
);
if
(
_table
!=
NULL
)
{
_table
->
remove_if
(
should_clean
);
int
removed
=
_table
->
remove_if
(
should_clean
);
assert
((
size_t
)
removed
<=
_length
,
"impossible"
);
_length
-=
removed
;
}
if
(
_length
==
0
)
{
clear
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录