提交 57176051 编写于 作者: J johnc

6782663: Data produced by PrintGCApplicationConcurrentTime and...

6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
Summary: Update and display the timers associated with these flags for all safepoints.
Reviewed-by: ysr, jcoomes
上级 812d794b
/* /*
* Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1998-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -426,11 +426,6 @@ void VMThread::loop() { ...@@ -426,11 +426,6 @@ void VMThread::loop() {
// follow that also require a safepoint // follow that also require a safepoint
if (_cur_vm_operation->evaluate_at_safepoint()) { if (_cur_vm_operation->evaluate_at_safepoint()) {
if (PrintGCApplicationConcurrentTime) {
gclog_or_tty->print_cr("Application time: %3.7f seconds",
RuntimeService::last_application_time_sec());
}
_vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned _vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned
SafepointSynchronize::begin(); SafepointSynchronize::begin();
...@@ -477,12 +472,6 @@ void VMThread::loop() { ...@@ -477,12 +472,6 @@ void VMThread::loop() {
// Complete safepoint synchronization // Complete safepoint synchronization
SafepointSynchronize::end(); SafepointSynchronize::end();
if (PrintGCApplicationStoppedTime) {
gclog_or_tty->print_cr("Total time for which application threads "
"were stopped: %3.7f seconds",
RuntimeService::last_safepoint_time_sec());
}
} else { // not a safepoint operation } else { // not a safepoint operation
if (TraceLongCompiles) { if (TraceLongCompiles) {
elapsedTimer t; elapsedTimer t;
......
/* /*
* Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2003-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -104,6 +104,13 @@ void RuntimeService::init() { ...@@ -104,6 +104,13 @@ void RuntimeService::init() {
void RuntimeService::record_safepoint_begin() { void RuntimeService::record_safepoint_begin() {
HS_DTRACE_PROBE(hs_private, safepoint__begin); HS_DTRACE_PROBE(hs_private, safepoint__begin);
// Print the time interval in which the app was executing
if (PrintGCApplicationConcurrentTime) {
gclog_or_tty->print_cr("Application time: %3.7f seconds",
last_application_time_sec());
}
// update the time stamp to begin recording safepoint time // update the time stamp to begin recording safepoint time
_safepoint_timer.update(); _safepoint_timer.update();
if (UsePerfData) { if (UsePerfData) {
...@@ -122,6 +129,15 @@ void RuntimeService::record_safepoint_synchronized() { ...@@ -122,6 +129,15 @@ void RuntimeService::record_safepoint_synchronized() {
void RuntimeService::record_safepoint_end() { void RuntimeService::record_safepoint_end() {
HS_DTRACE_PROBE(hs_private, safepoint__end); HS_DTRACE_PROBE(hs_private, safepoint__end);
// Print the time interval for which the app was stopped
// during the current safepoint operation.
if (PrintGCApplicationStoppedTime) {
gclog_or_tty->print_cr("Total time for which application threads "
"were stopped: %3.7f seconds",
last_safepoint_time_sec());
}
// update the time stamp to begin recording app time // update the time stamp to begin recording app time
_app_timer.update(); _app_timer.update();
if (UsePerfData) { if (UsePerfData) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册