RFR (S) 8205608: Fix 'frames()' in ThreadReferenceImpl.c to prevent quadratic runtime behavior

Schmelter, Ralf ralf.schmelter at sap.com
Tue Jul 3 10:43:46 UTC 2018


Hi All,

Please review the fix for the bug https://bugs.openjdk.java.net/browse/JDK-8205608 . The webref is at http://cr.openjdk.java.net/~simonis/webrevs/2018/8205608/ .

This fixes the quadratic runtime (in the number of frames) of the frames() method, making it linear instead. It uses additional memory proportional to the number of frames on the stack.

I've included a jtreg test, which would time out in the old implementation (since it takes minutes to get the stack frames). I'm not sure how useful this is.

Best regards,
Ralf Schmelter


More information about the serviceability-dev mailing list