Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
a039f22b
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看板
提交
a039f22b
编写于
9月 30, 2008
作者:
J
jcoomes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6716466: par compact - remove VerifyParallelOldWithMarkSweep code
Reviewed-by: jmasa
上级
48ec7589
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
12 addition
and
197 deletion
+12
-197
src/share/vm/code/nmethod.cpp
src/share/vm/code/nmethod.cpp
+1
-5
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
..._implementation/parallelScavenge/parallelScavengeHeap.cpp
+0
-4
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
...are/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
+1
-6
src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp
..._implementation/parallelScavenge/psMarkSweepDecorator.cpp
+10
-20
src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
+0
-2
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
.../gc_implementation/parallelScavenge/psParallelCompact.cpp
+0
-144
src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
...share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
+0
-2
src/share/vm/gc_implementation/shared/markSweep.inline.hpp
src/share/vm/gc_implementation/shared/markSweep.inline.hpp
+0
-7
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+0
-7
未找到文件。
src/share/vm/code/nmethod.cpp
浏览文件 @
a039f22b
...
...
@@ -1350,11 +1350,7 @@ bool nmethod::can_unload(BoolObjectClosure* is_alive,
return
false
;
}
}
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{
// Cannot do this test if verification of the UseParallelOldGC
// code using the PSMarkSweep code is being done.
assert
(
unloading_occurred
,
"Inconsistency in unloading"
);
}
assert
(
unloading_occurred
,
"Inconsistency in unloading"
);
make_unloaded
(
is_alive
,
obj
);
return
true
;
}
...
...
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
浏览文件 @
a039f22b
...
...
@@ -210,10 +210,6 @@ void ParallelScavengeHeap::post_initialize() {
PSScavenge
::
initialize
();
if
(
UseParallelOldGC
)
{
PSParallelCompact
::
post_initialize
();
if
(
VerifyParallelOldWithMarkSweep
)
{
// Will be used for verification of par old.
PSMarkSweep
::
initialize
();
}
}
else
{
PSMarkSweep
::
initialize
();
}
...
...
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
浏览文件 @
a039f22b
...
...
@@ -35,9 +35,7 @@ void PSMarkSweep::initialize() {
_ref_processor
=
new
ReferenceProcessor
(
mr
,
true
,
// atomic_discovery
false
);
// mt_discovery
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{
_counters
=
new
CollectorCounters
(
"PSMarkSweep"
,
1
);
}
_counters
=
new
CollectorCounters
(
"PSMarkSweep"
,
1
);
}
// This method contains all heap specific policy for invoking mark sweep.
...
...
@@ -518,9 +516,6 @@ void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
follow_stack
();
// Process reference objects found during marking
// Skipping the reference processing for VerifyParallelOldWithMarkSweep
// affects the marking (makes it different).
{
ReferencePolicy
*
soft_ref_policy
;
if
(
clear_all_softrefs
)
{
...
...
src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp
浏览文件 @
a039f22b
...
...
@@ -152,20 +152,15 @@ void PSMarkSweepDecorator::precompact() {
oop
(
q
)
->
forward_to
(
oop
(
compact_top
));
assert
(
oop
(
q
)
->
is_gc_marked
(),
"encoding the pointer should preserve the mark"
);
}
else
{
// Don't clear the mark since it's confuses parallel old
// verification.
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{
// if the object isn't moving we can just set the mark to the default
// mark and handle it specially later on.
oop
(
q
)
->
init_mark
();
}
// if the object isn't moving we can just set the mark to the default
// mark and handle it specially later on.
oop
(
q
)
->
init_mark
();
assert
(
oop
(
q
)
->
forwardee
()
==
NULL
,
"should be forwarded to NULL"
);
}
// Update object start array
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{
if
(
start_array
)
start_array
->
allocate_block
(
compact_top
);
if
(
start_array
)
{
start_array
->
allocate_block
(
compact_top
);
}
VALIDATE_MARK_SWEEP_ONLY
(
MarkSweep
::
register_live_oop
(
oop
(
q
),
size
));
...
...
@@ -219,19 +214,14 @@ void PSMarkSweepDecorator::precompact() {
assert
(
oop
(
q
)
->
is_gc_marked
(),
"encoding the pointer should preserve the mark"
);
}
else
{
// if the object isn't moving we can just set the mark to the default
// Don't clear the mark since it's confuses parallel old
// verification.
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{
// mark and handle it specially later on.
oop
(
q
)
->
init_mark
();
}
// mark and handle it specially later on.
oop
(
q
)
->
init_mark
();
assert
(
oop
(
q
)
->
forwardee
()
==
NULL
,
"should be forwarded to NULL"
);
}
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{
// Update object start array
if
(
start_array
)
start_array
->
allocate_block
(
compact_top
);
// Update object start array
if
(
start_array
)
{
start_array
->
allocate_block
(
compact_top
);
}
VALIDATE_MARK_SWEEP_ONLY
(
MarkSweep
::
register_live_oop
(
oop
(
q
),
sz
));
...
...
src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
浏览文件 @
a039f22b
...
...
@@ -152,9 +152,7 @@ void PSOldGen::precompact() {
assert
(
heap
->
kind
()
==
CollectedHeap
::
ParallelScavengeHeap
,
"Sanity"
);
// Reset start array first.
debug_only
(
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{)
start_array
()
->
reset
();
debug_only
(})
object_mark_sweep
()
->
precompact
();
...
...
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
浏览文件 @
a039f22b
...
...
@@ -100,93 +100,6 @@ GrowableArray<HeapWord*>* PSParallelCompact::_last_gc_live_oops_moved_to = NULL;
GrowableArray
<
size_t
>
*
PSParallelCompact
::
_last_gc_live_oops_size
=
NULL
;
#endif
// XXX beg - verification code; only works while we also mark in object headers
static
void
verify_mark_bitmap
(
ParMarkBitMap
&
_mark_bitmap
)
{
ParallelScavengeHeap
*
heap
=
PSParallelCompact
::
gc_heap
();
PSPermGen
*
perm_gen
=
heap
->
perm_gen
();
PSOldGen
*
old_gen
=
heap
->
old_gen
();
PSYoungGen
*
young_gen
=
heap
->
young_gen
();
MutableSpace
*
perm_space
=
perm_gen
->
object_space
();
MutableSpace
*
old_space
=
old_gen
->
object_space
();
MutableSpace
*
eden_space
=
young_gen
->
eden_space
();
MutableSpace
*
from_space
=
young_gen
->
from_space
();
MutableSpace
*
to_space
=
young_gen
->
to_space
();
// 'from_space' here is the survivor space at the lower address.
if
(
to_space
->
bottom
()
<
from_space
->
bottom
())
{
from_space
=
to_space
;
to_space
=
young_gen
->
from_space
();
}
HeapWord
*
boundaries
[
12
];
unsigned
int
bidx
=
0
;
const
unsigned
int
bidx_max
=
sizeof
(
boundaries
)
/
sizeof
(
boundaries
[
0
]);
boundaries
[
0
]
=
perm_space
->
bottom
();
boundaries
[
1
]
=
perm_space
->
top
();
boundaries
[
2
]
=
old_space
->
bottom
();
boundaries
[
3
]
=
old_space
->
top
();
boundaries
[
4
]
=
eden_space
->
bottom
();
boundaries
[
5
]
=
eden_space
->
top
();
boundaries
[
6
]
=
from_space
->
bottom
();
boundaries
[
7
]
=
from_space
->
top
();
boundaries
[
8
]
=
to_space
->
bottom
();
boundaries
[
9
]
=
to_space
->
top
();
boundaries
[
10
]
=
to_space
->
end
();
boundaries
[
11
]
=
to_space
->
end
();
BitMap
::
idx_t
beg_bit
=
0
;
BitMap
::
idx_t
end_bit
;
BitMap
::
idx_t
tmp_bit
;
const
BitMap
::
idx_t
last_bit
=
_mark_bitmap
.
size
();
do
{
HeapWord
*
addr
=
_mark_bitmap
.
bit_to_addr
(
beg_bit
);
if
(
_mark_bitmap
.
is_marked
(
beg_bit
))
{
oop
obj
=
(
oop
)
addr
;
assert
(
obj
->
is_gc_marked
(),
"obj header is not marked"
);
end_bit
=
_mark_bitmap
.
find_obj_end
(
beg_bit
,
last_bit
);
const
size_t
size
=
_mark_bitmap
.
obj_size
(
beg_bit
,
end_bit
);
assert
(
size
==
(
size_t
)
obj
->
size
(),
"end bit wrong?"
);
beg_bit
=
_mark_bitmap
.
find_obj_beg
(
beg_bit
+
1
,
last_bit
);
assert
(
beg_bit
>
end_bit
,
"bit set in middle of an obj"
);
}
else
{
if
(
addr
>=
boundaries
[
bidx
]
&&
addr
<
boundaries
[
bidx
+
1
])
{
// a dead object in the current space.
oop
obj
=
(
oop
)
addr
;
end_bit
=
_mark_bitmap
.
addr_to_bit
(
addr
+
obj
->
size
());
assert
(
!
obj
->
is_gc_marked
(),
"obj marked in header, not in bitmap"
);
tmp_bit
=
beg_bit
+
1
;
beg_bit
=
_mark_bitmap
.
find_obj_beg
(
tmp_bit
,
end_bit
);
assert
(
beg_bit
==
end_bit
,
"beg bit set in unmarked obj"
);
beg_bit
=
_mark_bitmap
.
find_obj_end
(
tmp_bit
,
end_bit
);
assert
(
beg_bit
==
end_bit
,
"end bit set in unmarked obj"
);
}
else
if
(
addr
<
boundaries
[
bidx
+
2
])
{
// addr is between top in the current space and bottom in the next.
end_bit
=
beg_bit
+
pointer_delta
(
boundaries
[
bidx
+
2
],
addr
);
tmp_bit
=
beg_bit
;
beg_bit
=
_mark_bitmap
.
find_obj_beg
(
tmp_bit
,
end_bit
);
assert
(
beg_bit
==
end_bit
,
"beg bit set above top"
);
beg_bit
=
_mark_bitmap
.
find_obj_end
(
tmp_bit
,
end_bit
);
assert
(
beg_bit
==
end_bit
,
"end bit set above top"
);
bidx
+=
2
;
}
else
if
(
bidx
<
bidx_max
-
2
)
{
bidx
+=
2
;
// ???
}
else
{
tmp_bit
=
beg_bit
;
beg_bit
=
_mark_bitmap
.
find_obj_beg
(
tmp_bit
,
last_bit
);
assert
(
beg_bit
==
last_bit
,
"beg bit set outside heap"
);
beg_bit
=
_mark_bitmap
.
find_obj_end
(
tmp_bit
,
last_bit
);
assert
(
beg_bit
==
last_bit
,
"end bit set outside heap"
);
}
}
}
while
(
beg_bit
<
last_bit
);
}
// XXX end - verification code; only works while we also mark in object headers
#ifndef PRODUCT
const
char
*
PSParallelCompact
::
space_names
[]
=
{
"perm"
,
"old "
,
"eden"
,
"from"
,
"to "
...
...
@@ -1584,11 +1497,6 @@ void PSParallelCompact::summary_phase(ParCompactionManager* cm,
// trace("2");
#ifdef ASSERT
if
(
VerifyParallelOldWithMarkSweep
&&
(
PSParallelCompact
::
total_invocations
()
%
VerifyParallelOldWithMarkSweepInterval
)
==
0
)
{
verify_mark_bitmap
(
_mark_bitmap
);
}
if
(
TraceParallelOldGCMarkingPhase
)
{
tty
->
print_cr
(
"add_obj_count="
SIZE_FORMAT
" "
"add_obj_bytes="
SIZE_FORMAT
,
...
...
@@ -2038,39 +1946,9 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
}
#endif // #ifndef PRODUCT
#ifdef ASSERT
if
(
VerifyParallelOldWithMarkSweep
&&
(
PSParallelCompact
::
total_invocations
()
%
VerifyParallelOldWithMarkSweepInterval
)
==
0
)
{
gclog_or_tty
->
print_cr
(
"Verify marking with mark_sweep_phase1()"
);
if
(
PrintGCDetails
&&
Verbose
)
{
gclog_or_tty
->
print_cr
(
"mark_sweep_phase1:"
);
}
// Clear the discovered lists so that discovered objects
// don't look like they have been discovered twice.
ref_processor
()
->
clear_discovered_references
();
PSMarkSweep
::
allocate_stacks
();
MemRegion
mr
=
Universe
::
heap
()
->
reserved_region
();
PSMarkSweep
::
ref_processor
()
->
enable_discovery
();
PSMarkSweep
::
mark_sweep_phase1
(
maximum_heap_compaction
);
}
#endif
bool
max_on_system_gc
=
UseMaximumCompactionOnSystemGC
&&
is_system_gc
;
summary_phase
(
vmthread_cm
,
maximum_heap_compaction
||
max_on_system_gc
);
#ifdef ASSERT
if
(
VerifyParallelOldWithMarkSweep
&&
(
PSParallelCompact
::
total_invocations
()
%
VerifyParallelOldWithMarkSweepInterval
)
==
0
)
{
if
(
PrintGCDetails
&&
Verbose
)
{
gclog_or_tty
->
print_cr
(
"mark_sweep_phase2:"
);
}
PSMarkSweep
::
mark_sweep_phase2
();
}
#endif
COMPILER2_PRESENT
(
assert
(
DerivedPointerTable
::
is_active
(),
"Sanity"
));
COMPILER2_PRESENT
(
DerivedPointerTable
::
set_active
(
false
));
...
...
@@ -2078,28 +1956,6 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
// needed by the compaction for filling holes in the dense prefix.
adjust_roots
();
#ifdef ASSERT
if
(
VerifyParallelOldWithMarkSweep
&&
(
PSParallelCompact
::
total_invocations
()
%
VerifyParallelOldWithMarkSweepInterval
)
==
0
)
{
// Do a separate verify phase so that the verify
// code can use the the forwarding pointers to
// check the new pointer calculation. The restore_marks()
// has to be done before the real compact.
vmthread_cm
->
set_action
(
ParCompactionManager
::
VerifyUpdate
);
compact_perm
(
vmthread_cm
);
compact_serial
(
vmthread_cm
);
vmthread_cm
->
set_action
(
ParCompactionManager
::
ResetObjects
);
compact_perm
(
vmthread_cm
);
compact_serial
(
vmthread_cm
);
vmthread_cm
->
set_action
(
ParCompactionManager
::
UpdateAndCopy
);
// For debugging only
PSMarkSweep
::
restore_marks
();
PSMarkSweep
::
deallocate_stacks
();
}
#endif
compaction_start
.
update
();
// Does the perm gen always have to be done serially because
// klasses are used in the update of an object?
...
...
src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
浏览文件 @
a039f22b
...
...
@@ -123,8 +123,6 @@ void PSPermGen::move_and_update(ParCompactionManager* cm) {
void
PSPermGen
::
precompact
()
{
// Reset start array first.
debug_only
(
if
(
!
UseParallelOldGC
||
!
VerifyParallelOldWithMarkSweep
)
{)
_start_array
.
reset
();
debug_only
(})
object_mark_sweep
()
->
precompact
();
}
src/share/vm/gc_implementation/shared/markSweep.inline.hpp
浏览文件 @
a039f22b
...
...
@@ -23,13 +23,6 @@
*/
inline
void
MarkSweep
::
mark_object
(
oop
obj
)
{
#ifndef SERIALGC
if
(
UseParallelOldGC
&&
VerifyParallelOldWithMarkSweep
)
{
assert
(
PSParallelCompact
::
mark_bitmap
()
->
is_marked
(
obj
),
"Should be marked in the marking bitmap"
);
}
#endif // SERIALGC
// some marks may contain information we need to preserve so we store them away
// and overwrite the mark. We'll restore it at the end of markSweep.
markOop
mark
=
obj
->
mark
();
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
a039f22b
...
...
@@ -1189,13 +1189,6 @@ class CommandLineFlags {
product(uintx, ParallelCMSThreads, 0, \
"Max number of threads CMS will use for concurrent work") \
\
develop(bool, VerifyParallelOldWithMarkSweep, false, \
"Use the MarkSweep code to verify phases of Parallel Old") \
\
develop(uintx, VerifyParallelOldWithMarkSweepInterval, 1, \
"Interval at which the MarkSweep code is used to verify " \
"phases of Parallel Old") \
\
develop(bool, ParallelOldMTUnsafeMarkBitMap, false, \
"Use the Parallel Old MT unsafe in marking the bitmap") \
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录