Fields Summary |
---|
public static final String | DEFAULT_METHOD_TRACE_FILE_NAMESpecifies the default method trace data file name. |
public static final int | TRACE_COUNT_ALLOCSflag for startMethodTracing(), which adds the results from
startAllocCounting to the trace key file. |
private static final int | KIND_ALLOCATED_OBJECTS |
private static final int | KIND_ALLOCATED_BYTES |
private static final int | KIND_FREED_OBJECTS |
private static final int | KIND_FREED_BYTES |
private static final int | KIND_GC_INVOCATIONS |
private static final int | KIND_EXT_ALLOCATED_OBJECTS |
private static final int | KIND_EXT_ALLOCATED_BYTES |
private static final int | KIND_EXT_FREED_OBJECTS |
private static final int | KIND_EXT_FREED_BYTES |
public static final int | KIND_GLOBAL_ALLOCATED_OBJECTS |
public static final int | KIND_GLOBAL_ALLOCATED_BYTES |
public static final int | KIND_GLOBAL_FREED_OBJECTS |
public static final int | KIND_GLOBAL_FREED_BYTES |
public static final int | KIND_GLOBAL_GC_INVOCATIONS |
public static final int | KIND_GLOBAL_EXT_ALLOCATED_OBJECTS |
public static final int | KIND_GLOBAL_EXT_ALLOCATED_BYTES |
public static final int | KIND_GLOBAL_EXT_FREED_OBJECTS |
public static final int | KIND_GLOBAL_EXT_FREED_BYTES |
public static final int | KIND_THREAD_ALLOCATED_OBJECTS |
public static final int | KIND_THREAD_ALLOCATED_BYTES |
public static final int | KIND_THREAD_FREED_OBJECTS |
public static final int | KIND_THREAD_FREED_BYTES |
public static final int | KIND_THREAD_GC_INVOCATIONS |
public static final int | KIND_THREAD_EXT_ALLOCATED_OBJECTS |
public static final int | KIND_THREAD_EXT_ALLOCATED_BYTES |
public static final int | KIND_THREAD_EXT_FREED_OBJECTS |
public static final int | KIND_THREAD_EXT_FREED_BYTES |
public static final int | KIND_ALL_COUNTS |
Methods Summary |
---|
public static native void | dumpHprofData(java.lang.String fileName)Dump "hprof" data to the specified file. This will cause a GC.
The VM may create a temporary file in the same directory.
|
public static native int | getAllocCount(int kind)
|
public static native void | getInstructionCount(int[] counts)
|
public static native int | getLoadedClassCount()Gets the number of loaded classes.
|
public static native boolean | isDebuggerConnected()Determines if a debugger is currently attached.
|
public static native boolean | isDebuggingEnabled()Determines if debugging is enabled in this VM. If debugging is not
enabled, a debugger cannot be attached.
|
public static native long | lastDebuggerActivity()Returns the time since the last known debugger activity.
|
public static native void | printLoadedClasses(int flags)Dumps a list of loaded class to the log file.
|
static native void | printThis(java.lang.Object thisThing, int count, int thing)
|
public static native void | resetAllocCount(int kinds)
|
public static native void | resetInstructionCount()
|
public static native int | setAllocationLimit(int limit)Establishes an object allocation limit in the current thread. Useful for
catching regressions in code that is expected to operate without causing
any allocations. The limit is valid from the return of this method until
it is either changed or the thread terminates.
|
public static native int | setGlobalAllocationLimit(int limit)Establishes an object allocation limit for the entire VM. Useful for
catching regressions in code that is expected to operate without causing
any allocations. The limit is valid from the return of this method until
it is either changed or the thread terminates.
|
public static native void | startAllocCounting()Count the number and aggregate size of memory allocations between
two points.
|
private static void | startClassPrep()
|
public static native void | startEmulatorTracing()Starts sending Dalvik method trace info to the emulator.
|
private static void | startGC()
|
public static native void | startInstructionCounting()Count the number of instructions executed between two points.
|
public static void | startMethodTracing()Start method tracing with default name, size, and with 0
flags.
startMethodTracing(DEFAULT_METHOD_TRACE_FILE_NAME, 0, 0);
|
public static native void | startMethodTracing(java.lang.String traceFileName, int bufferSize, int flags)Start method tracing, specifying a file name as well as a default
buffer size. See Running the
Traceview Debugging Program for information about reading
trace files.
You can use either a fully qualified path and
name, or just a name. If only a name is specified, the file will
be created under the /sdcard/ directory. If a name is not given,
the default is /sdcard/dmtrace.trace.
|
public static native void | stopAllocCounting()
|
public static native void | stopEmulatorTracing()Stops sending Dalvik method trace info to the emulator.
|
public static native void | stopInstructionCounting()
|
public static native void | stopMethodTracing()Stops method tracing.
|
public static native long | threadCpuTimeNanos()Get an indication of thread CPU usage. The value returned indicates the
amount of time that the current thread has spent executing code or
waiting for certain types of I/O.
The time is expressed in nanoseconds, and is only meaningful when
compared to the result from an earlier call. Note that nanosecond
resolution does not imply nanosecond accuracy.
|