8315505: CompileTask timestamp printed can overflow

Backport-of: ad7a8e86e0
This commit is contained in:
Neethu Prasad
2024-07-15 16:57:29 +00:00
committed by Vitaly Provodin
parent de25c132f2
commit 0c6b751dbf

View File

@@ -221,13 +221,13 @@ void CompileTask::print_impl(outputStream* st, Method* method, int compile_id, i
jlong time_queued, jlong time_started) {
if (!short_form) {
// Print current time
st->print("%7d ", (int)tty->time_stamp().milliseconds());
st->print(UINT64_FORMAT " ", (uint64_t) tty->time_stamp().milliseconds());
if (Verbose && time_queued != 0) {
// Print time in queue and time being processed by compiler thread
jlong now = os::elapsed_counter();
st->print("%d ", (int)TimeHelper::counter_to_millis(now-time_queued));
st->print("%.0f ", TimeHelper::counter_to_millis(now-time_queued));
if (time_started != 0) {
st->print("%d ", (int)TimeHelper::counter_to_millis(now-time_started));
st->print("%.0f ", TimeHelper::counter_to_millis(now-time_started));
}
}
}