org.jboss.dashboard.profiler
Class StackTrace
java.lang.Object
org.jboss.dashboard.profiler.StackTrace
- Direct Known Subclasses:
- TimeTrace
public class StackTrace
- extends Object
A snapshot of a thread execution at a given time.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
creationTimeMillis
protected long creationTimeMillis
stackTrace
protected StackTraceElement[] stackTrace
context
protected CodeBlockTrace context
StackTrace
public StackTrace(StackTraceElement[] stackTrace,
CodeBlockTrace context)
equals
public boolean equals(StackTrace other)
getContext
public CodeBlockTrace getContext()
setContext
public void setContext(CodeBlockTrace context)
getCreationTimeMillis
public long getCreationTimeMillis()
length
public int length()
get
public StackTraceElement get(int index)
last
public StackTraceElement last()
first
public StackTraceElement first()
from
public StackTraceElement[] from(int begin,
int length)
reverseIndex
protected int reverseIndex(int index)
intersect
protected StackTrace intersect(StackTrace other)
- Intersect two stack traces.
A B C D E F G H I J K L M N
A B C D E F G H 1 2 3 4 5 6 7 8 9 0
Cut both to the length of the shortest one
A B C D E F G H I J K L M N
A B C D E F G H 1 2 3 4 5 6
If length = 1 return the element as the intersect.
Else check the element in the middle: G
If the middle is not equals then return the intersect of the first half.
Else return the intersect of the whole by comparing all the elements.
equals
protected boolean equals(StackTraceElement e1,
StackTraceElement e2)
eq
protected boolean eq(Object a,
Object b)
printStackTrace
public String printStackTrace()
printStackElement
public static String printStackElement(StackTraceElement e,
int maxLength)
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.