In GCTaskThread::run() there is the comment
"Update the index after we have set up the entry correctly since GCTaskThread::print_task_time_stamps() may read this value concurrently".
However, the following code neither adds compiler nor cpu barriers to actually enforce that.
I.e. the thread printing the task time log messages for parallel gc (in GCTaskThread::print_task_time_stamps()) may print bogus or even corrupt values.
"Update the index after we have set up the entry correctly since GCTaskThread::print_task_time_stamps() may read this value concurrently".
However, the following code neither adds compiler nor cpu barriers to actually enforce that.
I.e. the thread printing the task time log messages for parallel gc (in GCTaskThread::print_task_time_stamps()) may print bogus or even corrupt values.
- duplicates
-
JDK-8024399 PrintGCTaskTimeStamps: amount of tasks reported for GC-thread sometimes differs from expected value
-
- Closed
-