RFR(M): 8054292 : code comments leak in fastdebug builds
david.r.chase at oracle.com
Fri Aug 22 21:24:30 UTC 2014
bug: (confidential) https://bugs.openjdk.java.net/browse/JDK-8054292
description: CodeBuffers and BufferBlobs leak code comment strings in fastdebug.
This can be seen with the KitchenSink internal test or with CompileTheWorld:
w/ CodeBuffer strings freed, BufferBlobs flushed to free strings and oopmaps:
Total: reserved=5,908,975KB, committed=713,911KB
- Code (reserved=251,478KB, committed=22,442KB)
(mmap: reserved=247,680KB, committed=18,644KB)
no leak plugging:
Total: reserved=6,031,728KB, committed=836,404KB
- Code (reserved=340,883KB, committed=111,587KB)
(mmap: reserved=247,680KB, committed=18,384KB)
With these leaks fixed (this includes a possible oopmap leak)
KitchenSink still leaks about about 6MB/hour on a not-too-old
6MB/hour Linux box, but this leak appears to be plugged.
(KitchenSink is running over the weekend with NMT detail
turned on to identify the next leak. The old code leaked
at least 25MB/hour on this box.)
Free memory in appropriate places.
Insert asserts to guard against reuse of freed memory.
JPRT, jtreg, CompileTheWorld, KitchenSink, quicktest
jtreg included testing with -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
to help guard against the case of prematurely freed pointers.
Other testing involved freeing more aggressively at the use sites,
and then asserting whenever the destructor was run w/o memory
having been freed.
One client of CodeBuffers allocates them without running their constructor,
which interfered with enabling the full set of assertions that we might like.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the hotspot-compiler-dev