-
Sub-task
-
Resolution: Fixed
-
P4
-
18
-
b07
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8299868 | 17.0.7 | Thomas Stuefe | P4 | Resolved | Fixed | b01 |
As a second step after integrating C heap overrun checks into NMT (JDK-8275320), we can now remove debug-only guarding memory for os::malloc() and friends. For the whole ratio, please refer to the umbrella JBS (JDK-8275301).
This will:
- reduce the complexity of os::malloc, os::realloc (especially this, realloc is tricky to get right) and os::free
- reduce memory overhead in debug builds; depending on malloc granularity, this can be significant: a test program I have here which does
- reduce CPU overhead. Not sure if its measurable, but we do less now.
- make debug VMs behave much more similarly to release VMs in terms of memory layout of allocations, and make both variants travel more similar code paths. That improves testing coverage and makes it easier to reproduce errors with debug VMs (same memory layout).
Currently, we have always-on heap overrun checks in debug VMs. In order to get this after the patch, NMT should be switched on always in debug. NMT level summary is *very* cheap. Memory overhead will probably be less than what we paid before with the quite generous debug-only guards. NMT accounting is minimal and, again, should not be worse than what we did before - adjusting some global counters, in case of NMT per NMT category.
Finally, this would also be a good coverage test for NMT.
This will:
- reduce the complexity of os::malloc, os::realloc (especially this, realloc is tricky to get right) and os::free
- reduce memory overhead in debug builds; depending on malloc granularity, this can be significant: a test program I have here which does
- reduce CPU overhead. Not sure if its measurable, but we do less now.
- make debug VMs behave much more similarly to release VMs in terms of memory layout of allocations, and make both variants travel more similar code paths. That improves testing coverage and makes it easier to reproduce errors with debug VMs (same memory layout).
Currently, we have always-on heap overrun checks in debug VMs. In order to get this after the patch, NMT should be switched on always in debug. NMT level summary is *very* cheap. Memory overhead will probably be less than what we paid before with the quite generous debug-only guards. NMT accounting is minimal and, again, should not be worse than what we did before - adjusting some global counters, in case of NMT per NMT category.
Finally, this would also be a good coverage test for NMT.
- backported by
-
JDK-8299868 Remove debug-only heap overrun checks in os::malloc and friends
-
- Resolved
-
- duplicates
-
JDK-8277821 Remove debug-only heap overrun checks in os::malloc and friends
-
- Closed
-
- relates to
-
JDK-8275320 NMT should perform buffer overrun checks
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/1dc6a38c
-
Commit openjdk/jdk/39b1d75f
-
Review openjdk/jdk17u-dev/1041
-
Review openjdk/jdk/6554
(2 links to)