RFR: 6991327 : using -Xprof trigger native memory leak

Zhengyu Gu zhengyu.gu at oracle.com
Thu Aug 29 10:52:50 PDT 2013


The is a simple fix for memory leak.

FlatProfiler::record_thread_tick allocates array for JavaThread list, 
but never free it.


External bug: http://bugs.sun.com/view_bug.do?bug_id=6991327
Internal bug: https://bugs.openjdk.java.net/browse/JDK-6991327
Webrev: http://cr.openjdk.java.net/~zgu/6991327/webrev.00/ 
<http://cr.openjdk.java.net/%7Ezgu/6991327/webrev.00/>

Test:
   Ran test case (2) on bug report with NMT detail tracking on Linux 32, 
diff report clearly shows memory leak at 
FlatProfiler::record_thread_tick().  pmap also shows total memory grows 
continuously.

   With the fix, the call site no longer shows on diff report, and there 
are not obviously memory leaks on the report. pmap shows total memory 
stops growing after a while.

Sanity check:
   Passed JPRT with -Xprof flag

Thanks,

-Zhengyu



More information about the hotspot-runtime-dev mailing list