Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
8f3fa589
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看板
提交
8f3fa589
编写于
6月 25, 2014
作者:
M
mgerdin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8047819: G1 HeapRegionDCTOC does not need to inherit ContiguousSpaceDCTOC
Reviewed-by: stefank, tschatzl
上级
35663fc8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
39 deletion
+12
-39
src/share/vm/gc_implementation/g1/heapRegion.cpp
src/share/vm/gc_implementation/g1/heapRegion.cpp
+10
-11
src/share/vm/gc_implementation/g1/heapRegion.hpp
src/share/vm/gc_implementation/g1/heapRegion.hpp
+2
-28
未找到文件。
src/share/vm/gc_implementation/g1/heapRegion.cpp
浏览文件 @
8f3fa589
...
@@ -48,7 +48,7 @@ HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1,
...
@@ -48,7 +48,7 @@ HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1,
HeapRegion
*
hr
,
ExtendedOopClosure
*
cl
,
HeapRegion
*
hr
,
ExtendedOopClosure
*
cl
,
CardTableModRefBS
::
PrecisionStyle
precision
,
CardTableModRefBS
::
PrecisionStyle
precision
,
FilterKind
fk
)
:
FilterKind
fk
)
:
ContiguousSpaceDCTOC
(
hr
,
cl
,
precision
,
NULL
),
DirtyCardToOopClosure
(
hr
,
cl
,
precision
,
NULL
),
_hr
(
hr
),
_fk
(
fk
),
_g1
(
g1
)
{
}
_hr
(
hr
),
_fk
(
fk
),
_g1
(
g1
)
{
}
FilterOutOfRegionClosure
::
FilterOutOfRegionClosure
(
HeapRegion
*
r
,
FilterOutOfRegionClosure
::
FilterOutOfRegionClosure
(
HeapRegion
*
r
,
...
@@ -77,19 +77,18 @@ HeapWord* walk_mem_region_loop(ClosureType* cl, G1CollectedHeap* g1h,
...
@@ -77,19 +77,18 @@ HeapWord* walk_mem_region_loop(ClosureType* cl, G1CollectedHeap* g1h,
return
cur
;
return
cur
;
}
}
void
HeapRegionDCTOC
::
walk_mem_region_with_cl
(
MemRegion
mr
,
void
HeapRegionDCTOC
::
walk_mem_region
(
MemRegion
mr
,
HeapWord
*
bottom
,
HeapWord
*
bottom
,
HeapWord
*
top
,
HeapWord
*
top
)
{
ExtendedOopClosure
*
cl
)
{
G1CollectedHeap
*
g1h
=
_g1
;
G1CollectedHeap
*
g1h
=
_g1
;
int
oop_size
;
int
oop_size
;
ExtendedOopClosure
*
cl2
=
NULL
;
ExtendedOopClosure
*
cl2
=
NULL
;
FilterIntoCSClosure
intoCSFilt
(
this
,
g1h
,
cl
);
FilterIntoCSClosure
intoCSFilt
(
this
,
g1h
,
_
cl
);
FilterOutOfRegionClosure
outOfRegionFilt
(
_hr
,
cl
);
FilterOutOfRegionClosure
outOfRegionFilt
(
_hr
,
_
cl
);
switch
(
_fk
)
{
switch
(
_fk
)
{
case
NoFilterKind
:
cl2
=
cl
;
break
;
case
NoFilterKind
:
cl2
=
_
cl
;
break
;
case
IntoCSFilterKind
:
cl2
=
&
intoCSFilt
;
break
;
case
IntoCSFilterKind
:
cl2
=
&
intoCSFilt
;
break
;
case
OutOfRegionFilterKind
:
cl2
=
&
outOfRegionFilt
;
break
;
case
OutOfRegionFilterKind
:
cl2
=
&
outOfRegionFilt
;
break
;
default:
ShouldNotReachHere
();
default:
ShouldNotReachHere
();
...
@@ -111,17 +110,17 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr,
...
@@ -111,17 +110,17 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr,
// We replicate the loop below for several kinds of possible filters.
// We replicate the loop below for several kinds of possible filters.
switch
(
_fk
)
{
switch
(
_fk
)
{
case
NoFilterKind
:
case
NoFilterKind
:
bottom
=
walk_mem_region_loop
(
cl
,
g1h
,
_hr
,
bottom
,
top
);
bottom
=
walk_mem_region_loop
(
_
cl
,
g1h
,
_hr
,
bottom
,
top
);
break
;
break
;
case
IntoCSFilterKind
:
{
case
IntoCSFilterKind
:
{
FilterIntoCSClosure
filt
(
this
,
g1h
,
cl
);
FilterIntoCSClosure
filt
(
this
,
g1h
,
_
cl
);
bottom
=
walk_mem_region_loop
(
&
filt
,
g1h
,
_hr
,
bottom
,
top
);
bottom
=
walk_mem_region_loop
(
&
filt
,
g1h
,
_hr
,
bottom
,
top
);
break
;
break
;
}
}
case
OutOfRegionFilterKind
:
{
case
OutOfRegionFilterKind
:
{
FilterOutOfRegionClosure
filt
(
_hr
,
cl
);
FilterOutOfRegionClosure
filt
(
_hr
,
_
cl
);
bottom
=
walk_mem_region_loop
(
&
filt
,
g1h
,
_hr
,
bottom
,
top
);
bottom
=
walk_mem_region_loop
(
&
filt
,
g1h
,
_hr
,
bottom
,
top
);
break
;
break
;
}
}
...
...
src/share/vm/gc_implementation/g1/heapRegion.hpp
浏览文件 @
8f3fa589
...
@@ -71,7 +71,7 @@ class nmethod;
...
@@ -71,7 +71,7 @@ class nmethod;
// in the concurrent marker used by G1 to filter remembered
// in the concurrent marker used by G1 to filter remembered
// sets.
// sets.
class
HeapRegionDCTOC
:
public
ContiguousSpaceDCTOC
{
class
HeapRegionDCTOC
:
public
DirtyCardToOopClosure
{
public:
public:
// Specification of possible DirtyCardToOopClosure filtering.
// Specification of possible DirtyCardToOopClosure filtering.
enum
FilterKind
{
enum
FilterKind
{
...
@@ -85,39 +85,13 @@ protected:
...
@@ -85,39 +85,13 @@ protected:
FilterKind
_fk
;
FilterKind
_fk
;
G1CollectedHeap
*
_g1
;
G1CollectedHeap
*
_g1
;
void
walk_mem_region_with_cl
(
MemRegion
mr
,
HeapWord
*
bottom
,
HeapWord
*
top
,
ExtendedOopClosure
*
cl
);
// We don't specialize this for FilteringClosure; filtering is handled by
// the "FilterKind" mechanism. But we provide this to avoid a compiler
// warning.
void
walk_mem_region_with_cl
(
MemRegion
mr
,
HeapWord
*
bottom
,
HeapWord
*
top
,
FilteringClosure
*
cl
)
{
HeapRegionDCTOC
::
walk_mem_region_with_cl
(
mr
,
bottom
,
top
,
(
ExtendedOopClosure
*
)
cl
);
}
// Get the actual top of the area on which the closure will
// operate, given where the top is assumed to be (the end of the
// memory region passed to do_MemRegion) and where the object
// at the top is assumed to start. For example, an object may
// start at the top but actually extend past the assumed top,
// in which case the top becomes the end of the object.
HeapWord
*
get_actual_top
(
HeapWord
*
top
,
HeapWord
*
top_obj
)
{
return
ContiguousSpaceDCTOC
::
get_actual_top
(
top
,
top_obj
);
}
// Walk the given memory region from bottom to (actual) top
// Walk the given memory region from bottom to (actual) top
// looking for objects and applying the oop closure (_cl) to
// looking for objects and applying the oop closure (_cl) to
// them. The base implementation of this treats the area as
// them. The base implementation of this treats the area as
// blocks, where a block may or may not be an object. Sub-
// blocks, where a block may or may not be an object. Sub-
// classes should override this to provide more accurate
// classes should override this to provide more accurate
// or possibly more efficient walking.
// or possibly more efficient walking.
void
walk_mem_region
(
MemRegion
mr
,
HeapWord
*
bottom
,
HeapWord
*
top
)
{
void
walk_mem_region
(
MemRegion
mr
,
HeapWord
*
bottom
,
HeapWord
*
top
);
Filtering_DCTOC
::
walk_mem_region
(
mr
,
bottom
,
top
);
}
public:
public:
HeapRegionDCTOC
(
G1CollectedHeap
*
g1
,
HeapRegionDCTOC
(
G1CollectedHeap
*
g1
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录