mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8220151
: SafepointTracing::end_of_last_safepoint_ms should return ms since epoch
Reviewed-by: dholmes, redestad
This commit is contained in:
parent
26702d005b
commit
d569301f4e
3 changed files with 11 additions and 4 deletions
|
@ -1121,6 +1121,7 @@ jlong SafepointTracing::_last_safepoint_begin_time_ns = 0;
|
|||
jlong SafepointTracing::_last_safepoint_sync_time_ns = 0;
|
||||
jlong SafepointTracing::_last_safepoint_cleanup_time_ns = 0;
|
||||
jlong SafepointTracing::_last_safepoint_end_time_ns = 0;
|
||||
jlong SafepointTracing::_last_safepoint_end_time_epoch_ms = 0;
|
||||
jlong SafepointTracing::_last_app_time_ns = 0;
|
||||
int SafepointTracing::_nof_threads = 0;
|
||||
int SafepointTracing::_nof_running = 0;
|
||||
|
@ -1133,6 +1134,8 @@ uint64_t SafepointTracing::_op_count[VM_Operation::VMOp_Terminating] = {0};
|
|||
void SafepointTracing::init() {
|
||||
// Application start
|
||||
_last_safepoint_end_time_ns = os::javaTimeNanos();
|
||||
// amount of time since epoch
|
||||
_last_safepoint_end_time_epoch_ms = os::javaTimeMillis();
|
||||
}
|
||||
|
||||
// Helper method to print the header.
|
||||
|
@ -1232,6 +1235,8 @@ void SafepointTracing::cleanup() {
|
|||
|
||||
void SafepointTracing::end() {
|
||||
_last_safepoint_end_time_ns = os::javaTimeNanos();
|
||||
// amount of time since epoch
|
||||
_last_safepoint_end_time_epoch_ms = os::javaTimeMillis();
|
||||
|
||||
if (_max_sync_time < (_last_safepoint_sync_time_ns - _last_safepoint_begin_time_ns)) {
|
||||
_max_sync_time = _last_safepoint_sync_time_ns - _last_safepoint_begin_time_ns;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue