RFR 8150778: Reduce Throwable.getStackTrace() calls to the JVM
daniel.fuchs at oracle.com
Wed Mar 2 18:57:32 UTC 2016
Two remarks on http://cr.openjdk.java.net/~coleenp/8150778_jdk/
Does the new constructor in StackTraceElement really need to be
public? Can't we keep that package protected?
902 * package-protection for use by SharedSecrets.
If I'm not mistaken we removed the shared secrets access - IIRC that
was used by java.util.logging.LogRecord - which now uses the
StackWalker API instead.
So maybe you could make the method private and remove the comment
as further cleanup.
Please don't count me as (R)eviewer for the hotspot changes :-)
On 02/03/16 19:44, Coleen Phillimore wrote:
> Summary: replace JVM_GetStackTraceDepth and JVM_GetStackTraceElement,
> with JVM_GetStackTraceElements that gets all the elements in the
> These improvements were found during the investigation for replacing
> Throwable with the StackWalkAPI. This change also adds iterator for
> BacktraceBuilder to make changing format of backtrace easier.
> Tested with -testset core, RBT nightly hotspot nightly tests on all
> platforms, and jck tests on linux x64. Compatibility request is approved.
> open webrev at http://cr.openjdk.java.net/~coleenp/8150778_jdk/
> open webrev at http://cr.openjdk.java.net/~coleenp/8150778_hotspot
> bug link https://bugs.openjdk.java.net/browse/JDK-8150778
More information about the core-libs-dev