-
Bug
-
Resolution: Fixed
-
P2
-
8u202
-
master
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8222285 | openjdk8u222 | Severin Gehwolf | P2 | Resolved | Fixed | b01 |
JDK-8222573 | openjdk8u212 | Severin Gehwolf | P2 | Resolved | Fixed | b04 |
JDK-8221881 | 8u231 | David Buck | P2 | Resolved | Fixed | b01 |
JDK-8226993 | 8u221 | David Buck | P2 | Resolved | Fixed | master |
JDK-8221954 | 8u212 | David Buck | P2 | Closed | Fixed | b31 |
JDK-8229556 | emb-8u231 | David Buck | P2 | Resolved | Fixed | b01 |
Why is the version of this fix for 8 different than what's in 9 and later?
// Can base be NULL? Otherwise, always on-heap access.
bool can_access_non_heap = TypePtr::NULL_PTR->higher_equal(_gvn.type(heap_base_oop));
+ if (can_access_non_heap && type == T_OBJECT) {
+ return false; // off-heap oop accesses are not supported
+ }
means that if the base pointer hasn't been null checked before the Unsafe.getObject then it won't be intrinsified at all. 9 and later don't have this check. http://hg.openjdk.java.net/jdk9/jdk9/hotspot/file/b756e7a2ec33/src/share/vm/opto/library_call.cpp#l2324 We see a huge slowdown in some code using Unsafe for reflection as a result of this change.
I attached a microbenchmark showing the difference. On 8u192, 9 and 11 the loop runs in about 40ms but with 8u202 it takes about 3000ms.
- backported by
-
JDK-8221881 Performance regression after JDK-8155635 backport into 8u
- Resolved
-
JDK-8222285 Performance regression after JDK-8155635 backport into 8u
- Resolved
-
JDK-8222573 Performance regression after JDK-8155635 backport into 8u
- Resolved
-
JDK-8226993 Performance regression after JDK-8155635 backport into 8u
- Resolved
-
JDK-8229556 Performance regression after JDK-8155635 backport into 8u
- Resolved
-
JDK-8221954 Performance regression after JDK-8155635 backport into 8u
- Closed
- relates to
-
JDK-8155635 C2: Mixed unsafe oop accesses break alias analysis
- Closed
-
JDK-8181822 C2: Mixed unsafe oop accesses break alias analysis
- Closed