mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8145315: VM crashes in print_task_time_stamps()
Reviewed-by: jwilhelm, jmasa
This commit is contained in:
parent
6996edcbb5
commit
bd183dc526
1 changed files with 5 additions and 1 deletions
|
@ -152,11 +152,15 @@ void GCTaskThread::run() {
|
||||||
if (log_is_enabled(Debug, gc, task, time)) {
|
if (log_is_enabled(Debug, gc, task, time)) {
|
||||||
timer.update();
|
timer.update();
|
||||||
|
|
||||||
GCTaskTimeStamp* time_stamp = time_stamp_at(_time_stamp_index++);
|
GCTaskTimeStamp* time_stamp = time_stamp_at(_time_stamp_index);
|
||||||
|
|
||||||
time_stamp->set_name(name);
|
time_stamp->set_name(name);
|
||||||
time_stamp->set_entry_time(entry_time);
|
time_stamp->set_entry_time(entry_time);
|
||||||
time_stamp->set_exit_time(timer.ticks());
|
time_stamp->set_exit_time(timer.ticks());
|
||||||
|
|
||||||
|
// Update the index after we have set up the entry correctly since
|
||||||
|
// GCTaskThread::print_task_time_stamps() may read this value concurrently.
|
||||||
|
_time_stamp_index++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// idle tasks complete outside the normal accounting
|
// idle tasks complete outside the normal accounting
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue