Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
bdd04bef
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看板
提交
bdd04bef
编写于
3月 06, 2014
作者:
M
mgerdin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8038399: Remove dead oop_iterate MemRegion variants from SharedHeap, Generation and Space classes
Reviewed-by: tschatzl, stefank
上级
5f2ab917
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
5 addition
and
155 deletion
+5
-155
src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
...entation/concurrentMarkSweep/compactibleFreeListSpace.cpp
+0
-47
src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp
...entation/concurrentMarkSweep/compactibleFreeListSpace.hpp
+0
-1
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+0
-10
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
+0
-1
src/share/vm/memory/genCollectedHeap.cpp
src/share/vm/memory/genCollectedHeap.cpp
+0
-6
src/share/vm/memory/genCollectedHeap.hpp
src/share/vm/memory/genCollectedHeap.hpp
+0
-1
src/share/vm/memory/generation.cpp
src/share/vm/memory/generation.cpp
+5
-11
src/share/vm/memory/generation.hpp
src/share/vm/memory/generation.hpp
+0
-4
src/share/vm/memory/sharedHeap.hpp
src/share/vm/memory/sharedHeap.hpp
+0
-3
src/share/vm/memory/space.cpp
src/share/vm/memory/space.cpp
+0
-40
src/share/vm/memory/space.hpp
src/share/vm/memory/space.hpp
+0
-31
未找到文件。
src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
浏览文件 @
bdd04bef
...
@@ -795,53 +795,6 @@ void CompactibleFreeListSpace::oop_iterate(ExtendedOopClosure* cl) {
...
@@ -795,53 +795,6 @@ void CompactibleFreeListSpace::oop_iterate(ExtendedOopClosure* cl) {
}
}
}
}
// Apply the given closure to each oop in the space \intersect memory region.
void
CompactibleFreeListSpace
::
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
)
{
assert_lock_strong
(
freelistLock
());
if
(
is_empty
())
{
return
;
}
MemRegion
cur
=
MemRegion
(
bottom
(),
end
());
mr
=
mr
.
intersection
(
cur
);
if
(
mr
.
is_empty
())
{
return
;
}
if
(
mr
.
equals
(
cur
))
{
oop_iterate
(
cl
);
return
;
}
assert
(
mr
.
end
()
<=
end
(),
"just took an intersection above"
);
HeapWord
*
obj_addr
=
block_start
(
mr
.
start
());
HeapWord
*
t
=
mr
.
end
();
SpaceMemRegionOopsIterClosure
smr_blk
(
cl
,
mr
);
if
(
block_is_obj
(
obj_addr
))
{
// Handle first object specially.
oop
obj
=
oop
(
obj_addr
);
obj_addr
+=
adjustObjectSize
(
obj
->
oop_iterate
(
&
smr_blk
));
}
else
{
FreeChunk
*
fc
=
(
FreeChunk
*
)
obj_addr
;
obj_addr
+=
fc
->
size
();
}
while
(
obj_addr
<
t
)
{
HeapWord
*
obj
=
obj_addr
;
obj_addr
+=
block_size
(
obj_addr
);
// If "obj_addr" is not greater than top, then the
// entire object "obj" is within the region.
if
(
obj_addr
<=
t
)
{
if
(
block_is_obj
(
obj
))
{
oop
(
obj
)
->
oop_iterate
(
cl
);
}
}
else
{
// "obj" extends beyond end of region
if
(
block_is_obj
(
obj
))
{
oop
(
obj
)
->
oop_iterate
(
&
smr_blk
);
}
break
;
}
}
}
// NOTE: In the following methods, in order to safely be able to
// NOTE: In the following methods, in order to safely be able to
// apply the closure to an object, we need to be sure that the
// apply the closure to an object, we need to be sure that the
// object has been initialized. We are guaranteed that an object
// object has been initialized. We are guaranteed that an object
...
...
src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp
浏览文件 @
bdd04bef
...
@@ -350,7 +350,6 @@ class CompactibleFreeListSpace: public CompactibleSpace {
...
@@ -350,7 +350,6 @@ class CompactibleFreeListSpace: public CompactibleSpace {
Mutex
*
freelistLock
()
const
{
return
&
_freelistLock
;
}
Mutex
*
freelistLock
()
const
{
return
&
_freelistLock
;
}
// Iteration support
// Iteration support
void
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
);
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
void
object_iterate
(
ObjectClosure
*
blk
);
void
object_iterate
(
ObjectClosure
*
blk
);
...
...
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
浏览文件 @
bdd04bef
...
@@ -3167,16 +3167,6 @@ ConcurrentMarkSweepGeneration::younger_refs_iterate(OopsInGenClosure* cl) {
...
@@ -3167,16 +3167,6 @@ ConcurrentMarkSweepGeneration::younger_refs_iterate(OopsInGenClosure* cl) {
cl
->
reset_generation
();
cl
->
reset_generation
();
}
}
void
ConcurrentMarkSweepGeneration
::
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
)
{
if
(
freelistLock
()
->
owned_by_self
())
{
Generation
::
oop_iterate
(
mr
,
cl
);
}
else
{
MutexLockerEx
x
(
freelistLock
(),
Mutex
::
_no_safepoint_check_flag
);
Generation
::
oop_iterate
(
mr
,
cl
);
}
}
void
void
ConcurrentMarkSweepGeneration
::
oop_iterate
(
ExtendedOopClosure
*
cl
)
{
ConcurrentMarkSweepGeneration
::
oop_iterate
(
ExtendedOopClosure
*
cl
)
{
if
(
freelistLock
()
->
owned_by_self
())
{
if
(
freelistLock
()
->
owned_by_self
())
{
...
...
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
浏览文件 @
bdd04bef
...
@@ -1285,7 +1285,6 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
...
@@ -1285,7 +1285,6 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
void
save_sweep_limit
();
void
save_sweep_limit
();
// More iteration support
// More iteration support
virtual
void
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
);
virtual
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
virtual
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
virtual
void
safe_object_iterate
(
ObjectClosure
*
cl
);
virtual
void
safe_object_iterate
(
ObjectClosure
*
cl
);
virtual
void
object_iterate
(
ObjectClosure
*
cl
);
virtual
void
object_iterate
(
ObjectClosure
*
cl
);
...
...
src/share/vm/memory/genCollectedHeap.cpp
浏览文件 @
bdd04bef
...
@@ -846,12 +846,6 @@ void GenCollectedHeap::oop_iterate(ExtendedOopClosure* cl) {
...
@@ -846,12 +846,6 @@ void GenCollectedHeap::oop_iterate(ExtendedOopClosure* cl) {
}
}
}
}
void
GenCollectedHeap
::
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
)
{
for
(
int
i
=
0
;
i
<
_n_gens
;
i
++
)
{
_gens
[
i
]
->
oop_iterate
(
mr
,
cl
);
}
}
void
GenCollectedHeap
::
object_iterate
(
ObjectClosure
*
cl
)
{
void
GenCollectedHeap
::
object_iterate
(
ObjectClosure
*
cl
)
{
for
(
int
i
=
0
;
i
<
_n_gens
;
i
++
)
{
for
(
int
i
=
0
;
i
<
_n_gens
;
i
++
)
{
_gens
[
i
]
->
object_iterate
(
cl
);
_gens
[
i
]
->
object_iterate
(
cl
);
...
...
src/share/vm/memory/genCollectedHeap.hpp
浏览文件 @
bdd04bef
...
@@ -220,7 +220,6 @@ public:
...
@@ -220,7 +220,6 @@ public:
// Iteration functions.
// Iteration functions.
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
void
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
);
void
object_iterate
(
ObjectClosure
*
cl
);
void
object_iterate
(
ObjectClosure
*
cl
);
void
safe_object_iterate
(
ObjectClosure
*
cl
);
void
safe_object_iterate
(
ObjectClosure
*
cl
);
Space
*
space_containing
(
const
void
*
addr
)
const
;
Space
*
space_containing
(
const
void
*
addr
)
const
;
...
...
src/share/vm/memory/generation.cpp
浏览文件 @
bdd04bef
...
@@ -297,22 +297,16 @@ bool Generation::block_is_obj(const HeapWord* p) const {
...
@@ -297,22 +297,16 @@ bool Generation::block_is_obj(const HeapWord* p) const {
class
GenerationOopIterateClosure
:
public
SpaceClosure
{
class
GenerationOopIterateClosure
:
public
SpaceClosure
{
public:
public:
ExtendedOopClosure
*
cl
;
ExtendedOopClosure
*
_cl
;
MemRegion
mr
;
virtual
void
do_space
(
Space
*
s
)
{
virtual
void
do_space
(
Space
*
s
)
{
s
->
oop_iterate
(
mr
,
cl
);
s
->
oop_iterate
(
_
cl
);
}
}
GenerationOopIterateClosure
(
ExtendedOopClosure
*
_cl
,
MemRegion
_mr
)
:
GenerationOopIterateClosure
(
ExtendedOopClosure
*
cl
)
:
cl
(
_cl
),
mr
(
_mr
)
{}
_cl
(
cl
)
{}
};
};
void
Generation
::
oop_iterate
(
ExtendedOopClosure
*
cl
)
{
void
Generation
::
oop_iterate
(
ExtendedOopClosure
*
cl
)
{
GenerationOopIterateClosure
blk
(
cl
,
_reserved
);
GenerationOopIterateClosure
blk
(
cl
);
space_iterate
(
&
blk
);
}
void
Generation
::
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
)
{
GenerationOopIterateClosure
blk
(
cl
,
mr
);
space_iterate
(
&
blk
);
space_iterate
(
&
blk
);
}
}
...
...
src/share/vm/memory/generation.hpp
浏览文件 @
bdd04bef
...
@@ -543,10 +543,6 @@ class Generation: public CHeapObj<mtGC> {
...
@@ -543,10 +543,6 @@ class Generation: public CHeapObj<mtGC> {
// generation, calling "cl.do_oop" on each.
// generation, calling "cl.do_oop" on each.
virtual
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
virtual
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
// Same as above, restricted to the intersection of a memory region and
// the generation.
virtual
void
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
);
// Iterate over all objects in the generation, calling "cl.do_object" on
// Iterate over all objects in the generation, calling "cl.do_object" on
// each.
// each.
virtual
void
object_iterate
(
ObjectClosure
*
cl
);
virtual
void
object_iterate
(
ObjectClosure
*
cl
);
...
...
src/share/vm/memory/sharedHeap.hpp
浏览文件 @
bdd04bef
...
@@ -163,9 +163,6 @@ public:
...
@@ -163,9 +163,6 @@ public:
// Iteration functions.
// Iteration functions.
void
oop_iterate
(
ExtendedOopClosure
*
cl
)
=
0
;
void
oop_iterate
(
ExtendedOopClosure
*
cl
)
=
0
;
// Same as above, restricted to a memory region.
virtual
void
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
)
=
0
;
// Iterate over all spaces in use in the heap, in an undefined order.
// Iterate over all spaces in use in the heap, in an undefined order.
virtual
void
space_iterate
(
SpaceClosure
*
cl
)
=
0
;
virtual
void
space_iterate
(
SpaceClosure
*
cl
)
=
0
;
...
...
src/share/vm/memory/space.cpp
浏览文件 @
bdd04bef
...
@@ -44,9 +44,6 @@
...
@@ -44,9 +44,6 @@
#include "utilities/globalDefinitions.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
#include "utilities/macros.hpp"
void
SpaceMemRegionOopsIterClosure
::
do_oop
(
oop
*
p
)
{
SpaceMemRegionOopsIterClosure
::
do_oop_work
(
p
);
}
void
SpaceMemRegionOopsIterClosure
::
do_oop
(
narrowOop
*
p
)
{
SpaceMemRegionOopsIterClosure
::
do_oop_work
(
p
);
}
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
HeapWord
*
DirtyCardToOopClosure
::
get_actual_top
(
HeapWord
*
top
,
HeapWord
*
DirtyCardToOopClosure
::
get_actual_top
(
HeapWord
*
top
,
...
@@ -690,43 +687,6 @@ void ContiguousSpace::oop_iterate(ExtendedOopClosure* blk) {
...
@@ -690,43 +687,6 @@ void ContiguousSpace::oop_iterate(ExtendedOopClosure* blk) {
}
}
}
}
void
ContiguousSpace
::
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
blk
)
{
if
(
is_empty
())
{
return
;
}
MemRegion
cur
=
MemRegion
(
bottom
(),
top
());
mr
=
mr
.
intersection
(
cur
);
if
(
mr
.
is_empty
())
{
return
;
}
if
(
mr
.
equals
(
cur
))
{
oop_iterate
(
blk
);
return
;
}
assert
(
mr
.
end
()
<=
top
(),
"just took an intersection above"
);
HeapWord
*
obj_addr
=
block_start
(
mr
.
start
());
HeapWord
*
t
=
mr
.
end
();
// Handle first object specially.
oop
obj
=
oop
(
obj_addr
);
SpaceMemRegionOopsIterClosure
smr_blk
(
blk
,
mr
);
obj_addr
+=
obj
->
oop_iterate
(
&
smr_blk
);
while
(
obj_addr
<
t
)
{
oop
obj
=
oop
(
obj_addr
);
assert
(
obj
->
is_oop
(),
"expected an oop"
);
obj_addr
+=
obj
->
size
();
// If "obj_addr" is not greater than top, then the
// entire object "obj" is within the region.
if
(
obj_addr
<=
t
)
{
obj
->
oop_iterate
(
blk
);
}
else
{
// "obj" extends beyond end of region
obj
->
oop_iterate
(
&
smr_blk
);
break
;
}
};
}
void
ContiguousSpace
::
object_iterate
(
ObjectClosure
*
blk
)
{
void
ContiguousSpace
::
object_iterate
(
ObjectClosure
*
blk
)
{
if
(
is_empty
())
return
;
if
(
is_empty
())
return
;
WaterMark
bm
=
bottom_mark
();
WaterMark
bm
=
bottom_mark
();
...
...
src/share/vm/memory/space.hpp
浏览文件 @
bdd04bef
...
@@ -65,31 +65,6 @@ class GenRemSet;
...
@@ -65,31 +65,6 @@ class GenRemSet;
class
CardTableRS
;
class
CardTableRS
;
class
DirtyCardToOopClosure
;
class
DirtyCardToOopClosure
;
// An oop closure that is circumscribed by a filtering memory region.
class
SpaceMemRegionOopsIterClosure
:
public
ExtendedOopClosure
{
private:
ExtendedOopClosure
*
_cl
;
MemRegion
_mr
;
protected:
template
<
class
T
>
void
do_oop_work
(
T
*
p
)
{
if
(
_mr
.
contains
(
p
))
{
_cl
->
do_oop
(
p
);
}
}
public:
SpaceMemRegionOopsIterClosure
(
ExtendedOopClosure
*
cl
,
MemRegion
mr
)
:
_cl
(
cl
),
_mr
(
mr
)
{}
virtual
void
do_oop
(
oop
*
p
);
virtual
void
do_oop
(
narrowOop
*
p
);
virtual
bool
do_metadata
()
{
// _cl is of type ExtendedOopClosure instead of OopClosure, so that we can check this.
assert
(
!
_cl
->
do_metadata
(),
"I've checked all call paths, this shouldn't happen."
);
return
false
;
}
virtual
void
do_klass
(
Klass
*
k
)
{
ShouldNotReachHere
();
}
virtual
void
do_class_loader_data
(
ClassLoaderData
*
cld
)
{
ShouldNotReachHere
();
}
};
// A Space describes a heap area. Class Space is an abstract
// A Space describes a heap area. Class Space is an abstract
// base class.
// base class.
//
//
...
@@ -205,11 +180,6 @@ class Space: public CHeapObj<mtGC> {
...
@@ -205,11 +180,6 @@ class Space: public CHeapObj<mtGC> {
// applications of the closure are not included in the iteration.
// applications of the closure are not included in the iteration.
virtual
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
virtual
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
// Same as above, restricted to the intersection of a memory region and
// the space. Fields in objects allocated by applications of the closure
// are not included in the iteration.
virtual
void
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
)
=
0
;
// Iterate over all objects in the space, calling "cl.do_object" on
// Iterate over all objects in the space, calling "cl.do_object" on
// each. Objects allocated by applications of the closure are not
// each. Objects allocated by applications of the closure are not
// included in the iteration.
// included in the iteration.
...
@@ -584,7 +554,6 @@ class ContiguousSpace: public CompactibleSpace {
...
@@ -584,7 +554,6 @@ class ContiguousSpace: public CompactibleSpace {
// Iteration
// Iteration
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
void
oop_iterate
(
ExtendedOopClosure
*
cl
);
void
oop_iterate
(
MemRegion
mr
,
ExtendedOopClosure
*
cl
);
void
object_iterate
(
ObjectClosure
*
blk
);
void
object_iterate
(
ObjectClosure
*
blk
);
// For contiguous spaces this method will iterate safely over objects
// For contiguous spaces this method will iterate safely over objects
// in the space (i.e., between bottom and top) when at a safepoint.
// in the space (i.e., between bottom and top) when at a safepoint.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录