Package dalvik.system.profiler
Interface ThreadSampler
-
public interface ThreadSamplerTheThreadSamplerinterfaces allows a profiler to choose between portable and VM specific implementations of thread sampling.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StackTraceElement[]getStackTrace(Thread thread)Return a stack trace for the current thread limited by the maximum depth specified bysetDepth.voidsetDepth(int depth)Used to specify the maximum stack depth to collect.
-
-
-
Method Detail
-
setDepth
void setDepth(int depth)
Used to specify the maximum stack depth to collect.
-
getStackTrace
StackTraceElement[] getStackTrace(Thread thread)
Return a stack trace for the current thread limited by the maximum depth specified bysetDepth. May return null if no sample is availble for the thread, which may happen in cases such as thread termination. The resulting array should be copied before the next call togetStackTraceif the caller wants to use the results, since theThreadSamplermay reuse the array. Note that the elements themselves are immutable and do not need to be copied.
-
-