Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8063404 | 8u45 | Bengt Rutisson | P4 | Resolved | Fixed | b01 |
JDK-8055358 | 8u40 | Thomas Schatzl | P4 | Resolved | Fixed | b03 |
JDK-8070962 | emb-8u47 | Bengt Rutisson | P4 | Resolved | Fixed | team |
Before the perm gen was removed G1CollectedHeap::heap_region_containing() could return NULL for addresses in the perm gen. This means that a lot of code had to check the result since it could potentially be NULL.
Now the only reason to return NULL is if the address passed in NULL. In many places it is possible to know that the address is not NULL and in the other places it is just as simple to check the address for NULL before calling G1CollectedHeap::heap_region_containing() rather than checking for NULL after having called it.
So, to simplify the code a bit we can assert that G1CollectedHeap::heap_region_containing() never returns NULL and then only check before we call it in the places where we would otherwise have passed NULL to it.
Now the only reason to return NULL is if the address passed in NULL. In many places it is possible to know that the address is not NULL and in the other places it is just as simple to check the address for NULL before calling G1CollectedHeap::heap_region_containing() rather than checking for NULL after having called it.
So, to simplify the code a bit we can assert that G1CollectedHeap::heap_region_containing() never returns NULL and then only check before we call it in the places where we would otherwise have passed NULL to it.
- backported by
-
JDK-8055358 G1: Clean up usages of heap_region_containing
-
- Resolved
-
-
JDK-8063404 G1: Clean up usages of heap_region_containing
-
- Resolved
-
-
JDK-8070962 G1: Clean up usages of heap_region_containing
-
- Resolved
-