As a second step after integrating C heap overrun checks into NMT (JDK-8275301), 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 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
- 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 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 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 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
- 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 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 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.
- duplicates
-
JDK-8277822 Remove debug-only heap overrun checks in os::malloc and friends
-
- Resolved
-