|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.runtime.StackTrace
public class StackTrace
A list of compiled method and instructionOffset pairs that describe the state of the call stack at a particular instant.
| Nested Class Summary | |
|---|---|
static class |
StackTrace.Element
Class to wrap up a stack frame element |
| Field Summary | |
|---|---|
private int[] |
compiledMethods
The compiled method ids of the stack trace. |
private int[] |
instructionOffsets
The offset of the instruction within the compiled method |
private static int |
lastTraceIndex
Index of the last stack trace; only used to support VM.VerboseStackTracePeriod |
| Constructor Summary | |
|---|---|
StackTrace()
Create a trace for the call stack of RVMThread.getThreadForStackTrace (normally the current thread unless we're in GC) |
|
| Method Summary | |
|---|---|
private int |
countFrames(int first,
int last)
Count number of stack frames including those inlined by the opt compiler |
private int |
countFramesNoGC(RVMThread stackTraceThread)
Walk the stack counting the number of stack frames encountered. |
private int |
countFramesUninterruptible(RVMThread stackTraceThread)
Walk the stack counting the number of stack frames encountered. |
private int |
firstRealMethod(Throwable cause)
Find the first non-VM method/exception initializer method in the stack trace. |
private CompiledMethod |
getCompiledMethod(int element)
Get the compiled method at element |
StackTrace.Element[] |
getStackTrace(Throwable cause)
Return the stack trace for use by the Throwable API |
private int |
lastRealMethod(int first)
Find the first non-VM method at the end of the stack trace |
private void |
recordFramesNoGC(RVMThread stackTraceThread)
Walk the stack recording the stack frames encountered. |
private void |
recordFramesUninterruptible(RVMThread stackTraceThread)
Walk the stack recording the stack frames encountered The stack being walked is our stack, so code is Uninterrupible to stop the stack moving. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final int[] compiledMethods
private final int[] instructionOffsets
private static int lastTraceIndex
| Constructor Detail |
|---|
public StackTrace()
| Method Detail |
|---|
private int countFramesNoGC(RVMThread stackTraceThread)
private void recordFramesNoGC(RVMThread stackTraceThread)
private int countFramesUninterruptible(RVMThread stackTraceThread)
private void recordFramesUninterruptible(RVMThread stackTraceThread)
private CompiledMethod getCompiledMethod(int element)
public StackTrace.Element[] getStackTrace(Throwable cause)
private int countFrames(int first,
int last)
first - the first compiled method to look fromlast - the last compiled method to look toprivate int firstRealMethod(Throwable cause)
cause - the cause of generating the stack trace marking the end of the
frames to elide
private int lastRealMethod(int first)
first - the first real method of the stack trace
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||