Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
d821a687
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看板
提交
d821a687
编写于
4月 25, 2012
作者:
B
brutisso
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7163848: G1: Log GC Cause for a GC
Reviewed-by: johnc, jwilhelm, jmasa
上级
2c61150c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
15 deletion
+14
-15
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+11
-13
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+3
-2
未找到文件。
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
d821a687
...
...
@@ -1248,12 +1248,13 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
IsGCActiveMark
x
;
// Timing
bool
system_gc
=
(
gc_cause
()
==
GCCause
::
_java_lang_system_gc
);
assert
(
!
system_gc
||
explicit_gc
,
"invariant"
);
assert
(
gc_cause
()
!=
GCCause
::
_java_lang_system_gc
||
explicit_gc
,
"invariant"
);
gclog_or_tty
->
date_stamp
(
G1Log
::
fine
()
&&
PrintGCDateStamps
);
TraceCPUTime
tcpu
(
G1Log
::
finer
(),
true
,
gclog_or_tty
);
TraceTime
t
(
system_gc
?
"Full GC (System.gc())"
:
"Full GC"
,
G1Log
::
fine
(),
true
,
gclog_or_tty
);
char
verbose_str
[
128
];
sprintf
(
verbose_str
,
"Full GC (%s)"
,
GCCause
::
to_string
(
gc_cause
()));
TraceTime
t
(
verbose_str
,
G1Log
::
fine
(),
true
,
gclog_or_tty
);
TraceCollectorStats
tcs
(
g1mm
()
->
full_collection_counters
());
TraceMemoryManagerStats
tms
(
true
/* fullGC */
,
gc_cause
());
...
...
@@ -3588,25 +3589,22 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
// Inner scope for scope based logging, timers, and stats collection
{
char
verbose_str
[
128
];
sprintf
(
verbose_str
,
"GC pause "
);
if
(
g1_policy
()
->
gcs_are_young
())
{
strcat
(
verbose_str
,
"(young)"
);
}
else
{
strcat
(
verbose_str
,
"(mixed)"
);
}
if
(
g1_policy
()
->
during_initial_mark_pause
())
{
strcat
(
verbose_str
,
" (initial-mark)"
);
// We are about to start a marking cycle, so we increment the
// full collection counter.
increment_total_full_collections
();
}
// if the log level is "finer" is on, we'll print long statistics information
// in the collector policy code, so let's not print this as the output
// is messy if we do.
gclog_or_tty
->
date_stamp
(
G1Log
::
fine
()
&&
PrintGCDateStamps
);
TraceCPUTime
tcpu
(
G1Log
::
finer
(),
true
,
gclog_or_tty
);
char
verbose_str
[
128
];
sprintf
(
verbose_str
,
"GC pause (%s) (%s)%s"
,
GCCause
::
to_string
(
gc_cause
()),
g1_policy
()
->
gcs_are_young
()
?
"young"
:
"mixed"
,
g1_policy
()
->
during_initial_mark_pause
()
?
" (initial-mark)"
:
""
);
TraceTime
t
(
verbose_str
,
G1Log
::
fine
()
&&
!
G1Log
::
finer
(),
true
,
gclog_or_tty
);
TraceCollectorStats
tcs
(
g1mm
()
->
incremental_collection_counters
());
...
...
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
浏览文件 @
d821a687
...
...
@@ -886,8 +886,9 @@ void G1CollectorPolicy::record_collection_pause_start(double start_time_sec,
size_t
start_used
)
{
if
(
G1Log
::
finer
())
{
gclog_or_tty
->
stamp
(
PrintGCTimeStamps
);
gclog_or_tty
->
print
(
"[GC pause"
);
gclog_or_tty
->
print
(
" (%s)"
,
gcs_are_young
()
?
"young"
:
"mixed"
);
gclog_or_tty
->
print
(
"[GC pause (%s) (%s)"
,
GCCause
::
to_string
(
_g1
->
gc_cause
()),
gcs_are_young
()
?
"young"
:
"mixed"
);
}
// We only need to do this here as the policy will only be applied
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录