Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
5a65414c
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看板
提交
5a65414c
编写于
3月 16, 2012
作者:
B
brutisso
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7130974: G1: Remove G1ParCopyHelper
Reviewed-by: tonyp, johnc
上级
26afc937
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
17 addition
and
21 deletion
+17
-21
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+10
-5
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
+2
-1
src/share/vm/gc_implementation/g1/g1OopClosures.hpp
src/share/vm/gc_implementation/g1/g1OopClosures.hpp
+5
-15
未找到文件。
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
5a65414c
...
...
@@ -4355,7 +4355,8 @@ G1ParClosureSuper::G1ParClosureSuper(G1CollectedHeap* g1,
_during_initial_mark
(
_g1
->
g1_policy
()
->
during_initial_mark_pause
()),
_mark_in_progress
(
_g1
->
mark_in_progress
())
{
}
void
G1ParCopyHelper
::
mark_object
(
oop
obj
)
{
template
<
bool
do_gen_barrier
,
G1Barrier
barrier
,
bool
do_mark_object
>
void
G1ParCopyClosure
<
do_gen_barrier
,
barrier
,
do_mark_object
>::
mark_object
(
oop
obj
)
{
#ifdef ASSERT
HeapRegion
*
hr
=
_g1
->
heap_region_containing
(
obj
);
assert
(
hr
!=
NULL
,
"sanity"
);
...
...
@@ -4366,7 +4367,9 @@ void G1ParCopyHelper::mark_object(oop obj) {
_cm
->
grayRoot
(
obj
,
(
size_t
)
obj
->
size
(),
_worker_id
);
}
void
G1ParCopyHelper
::
mark_forwarded_object
(
oop
from_obj
,
oop
to_obj
)
{
template
<
bool
do_gen_barrier
,
G1Barrier
barrier
,
bool
do_mark_object
>
void
G1ParCopyClosure
<
do_gen_barrier
,
barrier
,
do_mark_object
>
::
mark_forwarded_object
(
oop
from_obj
,
oop
to_obj
)
{
#ifdef ASSERT
assert
(
from_obj
->
is_forwarded
(),
"from obj should be forwarded"
);
assert
(
from_obj
->
forwardee
()
==
to_obj
,
"to obj should be the forwardee"
);
...
...
@@ -4388,7 +4391,9 @@ void G1ParCopyHelper::mark_forwarded_object(oop from_obj, oop to_obj) {
_cm
->
grayRoot
(
to_obj
,
(
size_t
)
from_obj
->
size
(),
_worker_id
);
}
oop
G1ParCopyHelper
::
copy_to_survivor_space
(
oop
old
)
{
template
<
bool
do_gen_barrier
,
G1Barrier
barrier
,
bool
do_mark_object
>
oop
G1ParCopyClosure
<
do_gen_barrier
,
barrier
,
do_mark_object
>
::
copy_to_survivor_space
(
oop
old
)
{
size_t
word_sz
=
old
->
size
();
HeapRegion
*
from_region
=
_g1
->
heap_region_containing_raw
(
old
);
// +1 to make the -1 indexes valid...
...
...
@@ -4457,8 +4462,8 @@ oop G1ParCopyHelper::copy_to_survivor_space(oop old) {
}
else
{
// No point in using the slower heap_region_containing() method,
// given that we know obj is in the heap.
_scanner
->
set_region
(
_g1
->
heap_region_containing_raw
(
obj
));
obj
->
oop_iterate_backwards
(
_scanner
);
_scanner
.
set_region
(
_g1
->
heap_region_containing_raw
(
obj
));
obj
->
oop_iterate_backwards
(
&
_scanner
);
}
}
else
{
_par_scan_state
->
undo_allocation
(
alloc_purpose
,
obj_ptr
,
word_sz
);
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
浏览文件 @
5a65414c
...
...
@@ -199,7 +199,8 @@ class G1CollectedHeap : public SharedHeap {
friend
class
OldGCAllocRegion
;
// Closures used in implementation.
friend
class
G1ParCopyHelper
;
template
<
bool
do_gen_barrier
,
G1Barrier
barrier
,
bool
do_mark_object
>
friend
class
G1ParCopyClosure
;
friend
class
G1IsAliveClosure
;
friend
class
G1EvacuateFollowersClosure
;
friend
class
G1ParScanThreadState
;
...
...
src/share/vm/gc_implementation/g1/g1OopClosures.hpp
浏览文件 @
5a65414c
...
...
@@ -118,9 +118,11 @@ public:
virtual
void
do_oop
(
narrowOop
*
p
)
{
do_oop_nv
(
p
);
}
};
template
<
bool
do_gen_barrier
,
G1Barrier
barrier
,
bool
do_mark_object
>
class
G1ParCopyClosure
:
public
G1ParClosureSuper
{
G1ParScanClosure
_scanner
;
template
<
class
T
>
void
do_oop_work
(
T
*
p
);
class
G1ParCopyHelper
:
public
G1ParClosureSuper
{
G1ParScanClosure
*
_scanner
;
protected:
// Mark the object if it's not already marked. This is used to mark
// objects pointed to by roots that are guaranteed not to move
...
...
@@ -134,23 +136,11 @@ protected:
oop
copy_to_survivor_space
(
oop
obj
);
public:
G1ParCopyHelper
(
G1CollectedHeap
*
g1
,
G1ParScanThreadState
*
par_scan_state
,
G1ParScanClosure
*
scanner
)
:
G1ParClosureSuper
(
g1
,
par_scan_state
),
_scanner
(
scanner
)
{
}
};
template
<
bool
do_gen_barrier
,
G1Barrier
barrier
,
bool
do_mark_object
>
class
G1ParCopyClosure
:
public
G1ParCopyHelper
{
G1ParScanClosure
_scanner
;
template
<
class
T
>
void
do_oop_work
(
T
*
p
);
public:
G1ParCopyClosure
(
G1CollectedHeap
*
g1
,
G1ParScanThreadState
*
par_scan_state
,
ReferenceProcessor
*
rp
)
:
_scanner
(
g1
,
par_scan_state
,
rp
),
G1ParC
opyHelper
(
g1
,
par_scan_state
,
&
_scanner
)
{
G1ParC
losureSuper
(
g1
,
par_scan_state
)
{
assert
(
_ref_processor
==
NULL
,
"sanity"
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录