RFR 8165372 : StackWalker performance regression following JDK-8147039

Brent Christian brent.christian at oracle.com
Mon Sep 19 19:35:17 UTC 2016


Please review my fix for 8165372 : "StackWalker performance regression 
following JDK-8147039"

Bug: https://bugs.openjdk.java.net/browse/JDK-8165372
Webrev: http://cr.openjdk.java.net/~bchristi/8165372/webrev.00/

8147039 reimplemented stack walking using javaVFrames in place of 
vframeStream, in order to give correct results for the experimental 
LiveStackFrame feature.  However, this also resulted in a significant 
StackWalker performance regression (25-60%, depending on specific 
operation and stack depth).

This fix includes stack walking implemented both ways, encapsulated 
within C++ classes.  JavaFrameStream provides the speed we had before 
for most use cases, while LiveFrameStream provides correct results when 
using LiveStackFrames.

Performance is much improved, back within 5% or so of pre-8147039 
levels, based on my measurements.


1. http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/6174ad93770c

More information about the hotspot-dev mailing list