United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8006242 G1: WorkerDataArray<T>::verify() too strict for double calculations
JDK-8006242 : G1: WorkerDataArray::verify() too strict for double calculations

Details
Type:
Bug
Submit Date:
2013-01-14
Status:
Resolved
Updated Date:
2013-05-06
Project Name:
JDK
Resolved Date:
2013-01-21
Component:
hotspot
OS:
Sub-Component:
gc
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
Fixed Versions:
hs25 (b17)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
In non-product builds the WorkerDataArrays in G1 are initialized to -1 in WorkerDataArray<T>::reset() when a GC starts. At the end of a GC WorkerDataArray<T>::verify() verifies that all entries in a WorkerDataArray has been set. Currently it does this by asserting that the entries are >= 0. This is fine in theory since the entries should contain counts or times that are all positive.

The problem is that some WorkerDataArrays are of type double. And some of those are set up through calculations using doubles. If those calculations result in a value close to 0 we could end up with a value slightly less than 0 since double calculations don't have full precision.

All we really want to verify is that all the entries were set. So, it should be enough to verify that entries do not contain the value set by the reset() method.
                                    

Comments
URL:   http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/7df93f7c14a5
User:  brutisso
Date:  2013-01-21 07:07:29 +0000

                                     
2013-01-21
URL:   http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/7df93f7c14a5
User:  amurillo
Date:  2013-01-25 20:42:57 +0000

                                     
2013-01-25



Hardware and Software, Engineered to Work Together