< prev index next >
src/java.base/share/classes/java/lang/StackFrameInfo.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 24,55 ****
*/
package java.lang;
import jdk.internal.access.JavaLangInvokeAccess;
import jdk.internal.access.SharedSecrets;
import java.lang.StackWalker.StackFrame;
import java.lang.invoke.MethodType;
class StackFrameInfo implements StackFrame {
! private final byte RETAIN_CLASS_REF = 0x01;
private final static JavaLangInvokeAccess JLIA =
SharedSecrets.getJavaLangInvokeAccess();
private final byte flags;
! private final Object memberName;
! private final short bci;
private volatile StackTraceElement ste;
/*
! * Create StackFrameInfo for StackFrameTraverser and LiveStackFrameTraverser
! * to use
*/
StackFrameInfo(StackWalker walker) {
this.flags = walker.retainClassRef ? RETAIN_CLASS_REF : 0;
- this.bci = -1;
this.memberName = JLIA.newMemberName();
}
// package-private called by StackStreamFactory to skip
// the capability check
--- 24,58 ----
*/
package java.lang;
import jdk.internal.access.JavaLangInvokeAccess;
import jdk.internal.access.SharedSecrets;
+ import jdk.internal.vm.annotation.Stable;
import java.lang.StackWalker.StackFrame;
import java.lang.invoke.MethodType;
class StackFrameInfo implements StackFrame {
! private final static byte RETAIN_CLASS_REF = 0x01;
private final static JavaLangInvokeAccess JLIA =
SharedSecrets.getJavaLangInvokeAccess();
private final byte flags;
! private final Object memberName; // MemberName initialized by VM
! private @Stable int bci = -1; // BCI set by VM
private volatile StackTraceElement ste;
/*
! * Construct an empty StackFrameInfo object that will be filled by the VM
! * during stack walking.
! *
! * @see StackStreamFactory.AbstractStackWalker#callStackWalk
! * @see StackStreamFactory.AbstractStackWalker#fetchStackFrames
*/
StackFrameInfo(StackWalker walker) {
this.flags = walker.retainClassRef ? RETAIN_CLASS_REF : 0;
this.memberName = JLIA.newMemberName();
}
// package-private called by StackStreamFactory to skip
// the capability check
< prev index next >