Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
7b3dcc29
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看板
提交
7b3dcc29
编写于
4月 24, 2013
作者:
S
stefank
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8013132: Add a flag to turn off the output of the verbose verification code
Reviewed-by: johnc, brutisso
上级
563afc34
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
49 addition
and
61 deletion
+49
-61
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+7
-11
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
+1
-1
src/share/vm/gc_implementation/g1/concurrentMark.cpp
src/share/vm/gc_implementation/g1/concurrentMark.cpp
+10
-15
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+1
-2
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
+7
-6
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
...are/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
+2
-4
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
.../gc_implementation/parallelScavenge/psParallelCompact.cpp
+2
-4
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
...hare/vm/gc_implementation/parallelScavenge/psScavenge.cpp
+2
-4
src/share/vm/memory/genCollectedHeap.cpp
src/share/vm/memory/genCollectedHeap.cpp
+2
-4
src/share/vm/memory/universe.cpp
src/share/vm/memory/universe.cpp
+3
-2
src/share/vm/memory/universe.hpp
src/share/vm/memory/universe.hpp
+5
-5
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+3
-0
src/share/vm/runtime/thread.cpp
src/share/vm/runtime/thread.cpp
+2
-1
src/share/vm/runtime/vmThread.cpp
src/share/vm/runtime/vmThread.cpp
+1
-1
src/share/vm/runtime/vm_operations.hpp
src/share/vm/runtime/vm_operations.hpp
+1
-1
未找到文件。
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
浏览文件 @
7b3dcc29
...
...
@@ -2444,8 +2444,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
// initial marking in checkpointRootsInitialWork has been completed
if
(
VerifyDuringGC
&&
GenCollectedHeap
::
heap
()
->
total_collections
()
>=
VerifyGCStartAt
)
{
gclog_or_tty
->
print
(
"Verify before initial mark: "
);
Universe
::
verify
();
Universe
::
verify
(
"Verify before initial mark: "
);
}
{
bool
res
=
markFromRoots
(
false
);
...
...
@@ -2456,8 +2455,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
case
FinalMarking
:
if
(
VerifyDuringGC
&&
GenCollectedHeap
::
heap
()
->
total_collections
()
>=
VerifyGCStartAt
)
{
gclog_or_tty
->
print
(
"Verify before re-mark: "
);
Universe
::
verify
();
Universe
::
verify
(
"Verify before re-mark: "
);
}
checkpointRootsFinal
(
false
,
clear_all_soft_refs
,
init_mark_was_synchronous
);
...
...
@@ -2468,8 +2466,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
// final marking in checkpointRootsFinal has been completed
if
(
VerifyDuringGC
&&
GenCollectedHeap
::
heap
()
->
total_collections
()
>=
VerifyGCStartAt
)
{
gclog_or_tty
->
print
(
"Verify before sweep: "
);
Universe
::
verify
();
Universe
::
verify
(
"Verify before sweep: "
);
}
sweep
(
false
);
assert
(
_collectorState
==
Resizing
,
"Incorrect state"
);
...
...
@@ -2484,8 +2481,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
// The heap has been resized.
if
(
VerifyDuringGC
&&
GenCollectedHeap
::
heap
()
->
total_collections
()
>=
VerifyGCStartAt
)
{
gclog_or_tty
->
print
(
"Verify before reset: "
);
Universe
::
verify
();
Universe
::
verify
(
"Verify before reset: "
);
}
reset
(
false
);
assert
(
_collectorState
==
Idling
,
"Collector state should "
...
...
@@ -2853,8 +2849,8 @@ class VerifyMarkedClosure: public BitMapClosure {
bool
failed
()
{
return
_failed
;
}
};
bool
CMSCollector
::
verify_after_remark
()
{
gclog_or_tty
->
print
(
" [Verifying CMS Marking... "
);
bool
CMSCollector
::
verify_after_remark
(
bool
silent
)
{
if
(
!
silent
)
gclog_or_tty
->
print
(
" [Verifying CMS Marking... "
);
MutexLockerEx
ml
(
verification_mark_bm
()
->
lock
(),
Mutex
::
_no_safepoint_check_flag
);
static
bool
init
=
false
;
...
...
@@ -2915,7 +2911,7 @@ bool CMSCollector::verify_after_remark() {
warning
(
"Unrecognized value %d for CMSRemarkVerifyVariant"
,
CMSRemarkVerifyVariant
);
}
gclog_or_tty
->
print
(
" done] "
);
if
(
!
silent
)
gclog_or_tty
->
print
(
" done] "
);
return
true
;
}
...
...
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
浏览文件 @
7b3dcc29
...
...
@@ -990,7 +990,7 @@ class CMSCollector: public CHeapObj<mtGC> {
// debugging
void
verify
();
bool
verify_after_remark
();
bool
verify_after_remark
(
bool
silent
=
VerifySilently
);
void
verify_ok_to_terminate
()
const
PRODUCT_RETURN
;
void
verify_work_stacks_empty
()
const
PRODUCT_RETURN
;
void
verify_overflow_empty
()
const
PRODUCT_RETURN
;
...
...
src/share/vm/gc_implementation/g1/concurrentMark.cpp
浏览文件 @
7b3dcc29
...
...
@@ -1273,10 +1273,9 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
if
(
VerifyDuringGC
)
{
HandleMark
hm
;
// handle scope
gclog_or_tty
->
print
(
" VerifyDuringGC:(before)"
);
Universe
::
heap
()
->
prepare_for_verify
();
Universe
::
verify
(
/* silent */
false
,
/* option */
VerifyOption_G1UsePrevMarking
);
Universe
::
verify
(
VerifyOption_G1UsePrevMarking
,
" VerifyDuringGC:(before)"
);
}
G1CollectorPolicy
*
g1p
=
g1h
->
g1_policy
();
...
...
@@ -1300,10 +1299,9 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
// Verify the heap w.r.t. the previous marking bitmap.
if
(
VerifyDuringGC
)
{
HandleMark
hm
;
// handle scope
gclog_or_tty
->
print
(
" VerifyDuringGC:(overflow)"
);
Universe
::
heap
()
->
prepare_for_verify
();
Universe
::
verify
(
/* silent */
false
,
/* option */
VerifyOption_G1UsePrevMarking
);
Universe
::
verify
(
VerifyOption_G1UsePrevMarking
,
" VerifyDuringGC:(overflow)"
);
}
// Clear the marking state because we will be restarting
...
...
@@ -1323,10 +1321,9 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
if
(
VerifyDuringGC
)
{
HandleMark
hm
;
// handle scope
gclog_or_tty
->
print
(
" VerifyDuringGC:(after)"
);
Universe
::
heap
()
->
prepare_for_verify
();
Universe
::
verify
(
/* silent */
false
,
/* option */
VerifyOption_G1UseNextMarking
);
Universe
::
verify
(
VerifyOption_G1UseNextMarking
,
" VerifyDuringGC:(after)"
);
}
assert
(
!
restart_for_overflow
(),
"sanity"
);
// Completely reset the marking state since marking completed
...
...
@@ -1972,10 +1969,9 @@ void ConcurrentMark::cleanup() {
if
(
VerifyDuringGC
)
{
HandleMark
hm
;
// handle scope
gclog_or_tty
->
print
(
" VerifyDuringGC:(before)"
);
Universe
::
heap
()
->
prepare_for_verify
();
Universe
::
verify
(
/* silent */
false
,
/* option */
VerifyOption_G1UsePrevMarking
);
Universe
::
verify
(
VerifyOption_G1UsePrevMarking
,
" VerifyDuringGC:(before)"
);
}
G1CollectorPolicy
*
g1p
=
G1CollectedHeap
::
heap
()
->
g1_policy
();
...
...
@@ -2127,10 +2123,9 @@ void ConcurrentMark::cleanup() {
if
(
VerifyDuringGC
)
{
HandleMark
hm
;
// handle scope
gclog_or_tty
->
print
(
" VerifyDuringGC:(after)"
);
Universe
::
heap
()
->
prepare_for_verify
();
Universe
::
verify
(
/* silent */
false
,
/* option */
VerifyOption_G1UsePrevMarking
);
Universe
::
verify
(
VerifyOption_G1UsePrevMarking
,
" VerifyDuringGC:(after)"
);
}
g1h
->
verify_region_sets_optional
();
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
7b3dcc29
...
...
@@ -1271,9 +1271,8 @@ double G1CollectedHeap::verify(bool guard, const char* msg) {
if
(
guard
&&
total_collections
()
>=
VerifyGCStartAt
)
{
double
verify_start
=
os
::
elapsedTime
();
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
msg
);
prepare_for_verify
();
Universe
::
verify
(
false
/* silent */
,
VerifyOption_G1UsePrevMarkin
g
);
Universe
::
verify
(
VerifyOption_G1UsePrevMarking
,
ms
g
);
verify_time_ms
=
(
os
::
elapsedTime
()
-
verify_start
)
*
1000
;
}
...
...
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
浏览文件 @
7b3dcc29
...
...
@@ -170,7 +170,6 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
if
(
VerifyDuringGC
)
{
HandleMark
hm
;
// handle scope
COMPILER2_PRESENT
(
DerivedPointerTableDeactivate
dpt_deact
);
gclog_or_tty
->
print
(
" VerifyDuringGC:(full)[Verifying "
);
Universe
::
heap
()
->
prepare_for_verify
();
// Note: we can verify only the heap here. When an object is
// marked, the previous value of the mark word (including
...
...
@@ -182,11 +181,13 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
// fail. At the end of the GC, the orginal mark word values
// (including hash values) are restored to the appropriate
// objects.
Universe
::
heap
()
->
verify
(
/* silent */
false
,
/* option */
VerifyOption_G1UseMarkWord
);
G1CollectedHeap
*
g1h
=
G1CollectedHeap
::
heap
();
gclog_or_tty
->
print_cr
(
"]"
);
if
(
!
VerifySilently
)
{
gclog_or_tty
->
print
(
" VerifyDuringGC:(full)[Verifying "
);
}
Universe
::
heap
()
->
verify
(
VerifySilently
,
VerifyOption_G1UseMarkWord
);
if
(
!
VerifySilently
)
{
gclog_or_tty
->
print_cr
(
"]"
);
}
}
}
...
...
src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
浏览文件 @
7b3dcc29
...
...
@@ -138,8 +138,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
if
(
VerifyBeforeGC
&&
heap
->
total_collections
()
>=
VerifyGCStartAt
)
{
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
" VerifyBeforeGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyBeforeGC:"
);
}
// Verify object start arrays
...
...
@@ -341,8 +340,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
if
(
VerifyAfterGC
&&
heap
->
total_collections
()
>=
VerifyGCStartAt
)
{
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
" VerifyAfterGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyAfterGC:"
);
}
// Re-verify object start arrays
...
...
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
浏览文件 @
7b3dcc29
...
...
@@ -966,8 +966,7 @@ void PSParallelCompact::pre_compact(PreGCValues* pre_gc_values)
if
(
VerifyBeforeGC
&&
heap
->
total_collections
()
>=
VerifyGCStartAt
)
{
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
" VerifyBeforeGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyBeforeGC:"
);
}
// Verify object start arrays
...
...
@@ -2168,8 +2167,7 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
if
(
VerifyAfterGC
&&
heap
->
total_collections
()
>=
VerifyGCStartAt
)
{
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
" VerifyAfterGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyAfterGC:"
);
}
// Re-verify object start arrays
...
...
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
浏览文件 @
7b3dcc29
...
...
@@ -314,8 +314,7 @@ bool PSScavenge::invoke_no_policy() {
if
(
VerifyBeforeGC
&&
heap
->
total_collections
()
>=
VerifyGCStartAt
)
{
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
" VerifyBeforeGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyBeforeGC:"
);
}
{
...
...
@@ -638,8 +637,7 @@ bool PSScavenge::invoke_no_policy() {
if
(
VerifyAfterGC
&&
heap
->
total_collections
()
>=
VerifyGCStartAt
)
{
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
" VerifyAfterGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyAfterGC:"
);
}
heap
->
print_heap_after_gc
();
...
...
src/share/vm/memory/genCollectedHeap.cpp
浏览文件 @
7b3dcc29
...
...
@@ -447,8 +447,7 @@ void GenCollectedHeap::do_collection(bool full,
prepare_for_verify
();
prepared_for_verification
=
true
;
}
gclog_or_tty
->
print
(
" VerifyBeforeGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyBeforeGC:"
);
}
COMPILER2_PRESENT
(
DerivedPointerTable
::
clear
());
...
...
@@ -519,8 +518,7 @@ void GenCollectedHeap::do_collection(bool full,
if
(
VerifyAfterGC
&&
i
>=
VerifyGCLevel
&&
total_collections
()
>=
VerifyGCStartAt
)
{
HandleMark
hm
;
// Discard invalid handles created during verification
gclog_or_tty
->
print
(
" VerifyAfterGC:"
);
Universe
::
verify
();
Universe
::
verify
(
" VerifyAfterGC:"
);
}
if
(
PrintGCDetails
)
{
...
...
src/share/vm/memory/universe.cpp
浏览文件 @
7b3dcc29
...
...
@@ -1270,7 +1270,7 @@ void Universe::print_heap_after_gc(outputStream* st, bool ignore_extended) {
st
->
print_cr
(
"}"
);
}
void
Universe
::
verify
(
bool
silent
,
VerifyOption
option
)
{
void
Universe
::
verify
(
VerifyOption
option
,
const
char
*
prefix
,
bool
silent
)
{
// The use of _verify_in_progress is a temporary work around for
// 6320749. Don't bother with a creating a class to set and clear
// it since it is only used in this method and the control flow is
...
...
@@ -1287,11 +1287,12 @@ void Universe::verify(bool silent, VerifyOption option) {
HandleMark
hm
;
// Handles created during verification can be zapped
_verify_count
++
;
if
(
!
silent
)
gclog_or_tty
->
print
(
prefix
);
if
(
!
silent
)
gclog_or_tty
->
print
(
"[Verifying "
);
if
(
!
silent
)
gclog_or_tty
->
print
(
"threads "
);
Threads
::
verify
();
if
(
!
silent
)
gclog_or_tty
->
print
(
"heap "
);
heap
()
->
verify
(
silent
,
option
);
if
(
!
silent
)
gclog_or_tty
->
print
(
"syms "
);
SymbolTable
::
verify
();
if
(
!
silent
)
gclog_or_tty
->
print
(
"strs "
);
...
...
src/share/vm/memory/universe.hpp
浏览文件 @
7b3dcc29
...
...
@@ -445,12 +445,12 @@ class Universe: AllStatic {
// Debugging
static
bool
verify_in_progress
()
{
return
_verify_in_progress
;
}
static
void
verify
(
bool
silent
,
VerifyOption
option
);
static
void
verify
(
bool
silent
)
{
verify
(
silent
,
VerifyOption_Default
/* option */
);
static
void
verify
(
VerifyOption
option
,
const
char
*
prefix
,
bool
silent
=
VerifySilently
);
static
void
verify
(
const
char
*
prefix
,
bool
silent
=
VerifySilently
)
{
verify
(
VerifyOption_Default
,
prefix
,
silent
);
}
static
void
verify
()
{
verify
(
false
/* silent */
);
static
void
verify
(
bool
silent
=
VerifySilently
)
{
verify
(
""
,
silent
);
}
static
int
verify_count
()
{
return
_verify_count
;
}
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
7b3dcc29
...
...
@@ -2123,6 +2123,9 @@ class CommandLineFlags {
product(intx, PrefetchFieldsAhead, -1, \
"How many fields ahead to prefetch in oop scan (<= 0 means off)") \
\
diagnostic(bool, VerifySilently, false, \
"Don't print print the verification progress") \
\
diagnostic(bool, VerifyDuringStartup, false, \
"Verify memory system before executing any Java code " \
"during VM initialization") \
...
...
src/share/vm/runtime/thread.cpp
浏览文件 @
7b3dcc29
...
...
@@ -3447,7 +3447,8 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
assert
(
Universe
::
is_fully_initialized
(),
"not initialized"
);
if
(
VerifyDuringStartup
)
{
VM_Verify
verify_op
(
false
/* silent */
);
// make sure we're starting with a clean slate
// Make sure we're starting with a clean slate.
VM_Verify
verify_op
;
VMThread
::
execute
(
&
verify_op
);
}
...
...
src/share/vm/runtime/vmThread.cpp
浏览文件 @
7b3dcc29
...
...
@@ -293,7 +293,7 @@ void VMThread::run() {
os
::
check_heap
();
// Silent verification so as not to pollute normal output,
// unless we really asked for it.
Universe
::
verify
(
!
(
PrintGCDetails
||
Verbose
));
Universe
::
verify
(
!
(
PrintGCDetails
||
Verbose
)
||
VerifySilently
);
}
CompileBroker
::
set_should_block
();
...
...
src/share/vm/runtime/vm_operations.hpp
浏览文件 @
7b3dcc29
...
...
@@ -302,7 +302,7 @@ class VM_Verify: public VM_Operation {
private:
bool
_silent
;
public:
VM_Verify
(
bool
silent
)
:
_silent
(
silent
)
{}
VM_Verify
(
bool
silent
=
VerifySilently
)
:
_silent
(
silent
)
{}
VMOp_Type
type
()
const
{
return
VMOp_Verify
;
}
void
doit
();
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录