|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdalvik.system.VMDebug
public final class VMDebug
VM-specific debug features. Though this class and many of its members
are public, this class is meant to be wrapped in a more friendly way
for use by application developers. On the Android platform, the
recommended way to access this functionality is through the class
android.os.Debug.
| Field Summary | |
|---|---|
static String |
DEFAULT_METHOD_TRACE_FILE_NAME
default method trace data file name |
static int |
KIND_ALL_COUNTS
|
static int |
KIND_GLOBAL_ALLOCATED_BYTES
|
static int |
KIND_GLOBAL_ALLOCATED_OBJECTS
|
static int |
KIND_GLOBAL_EXT_ALLOCATED_BYTES
|
static int |
KIND_GLOBAL_EXT_ALLOCATED_OBJECTS
|
static int |
KIND_GLOBAL_EXT_FREED_BYTES
|
static int |
KIND_GLOBAL_EXT_FREED_OBJECTS
|
static int |
KIND_GLOBAL_FREED_BYTES
|
static int |
KIND_GLOBAL_FREED_OBJECTS
|
static int |
KIND_GLOBAL_GC_INVOCATIONS
|
static int |
KIND_THREAD_ALLOCATED_BYTES
|
static int |
KIND_THREAD_ALLOCATED_OBJECTS
|
static int |
KIND_THREAD_EXT_ALLOCATED_BYTES
|
static int |
KIND_THREAD_EXT_ALLOCATED_OBJECTS
|
static int |
KIND_THREAD_EXT_FREED_BYTES
|
static int |
KIND_THREAD_EXT_FREED_OBJECTS
|
static int |
KIND_THREAD_FREED_BYTES
|
static int |
KIND_THREAD_FREED_OBJECTS
|
static int |
KIND_THREAD_GC_INVOCATIONS
|
static int |
TRACE_COUNT_ALLOCS
flag for startMethodTracing(), which adds the results from startAllocCounting to the trace key file. |
| Method Summary | |
|---|---|
static int |
getAllocCount(int kind)
|
static void |
getInstructionCount(int[] counts)
|
static int |
getLoadedClassCount()
Get the number of loaded classes. |
static boolean |
isDebuggerConnected()
Determine if a debugger is currently attached. |
static long |
lastDebuggerActivity()
Time, in msec, since the last debugger activity. |
static void |
printLoadedClasses(int flags)
Dump a list of loaded class to the log file. |
(package private) static void |
printThis(Object thisThing,
int count,
int thing)
|
static void |
resetAllocCount(int kinds)
|
static void |
resetInstructionCount()
|
static int |
setAllocationLimit(int limit)
Establish an object allocation limit in the current thread. |
static int |
setGlobalAllocationLimit(int limit)
Establish an object allocation limit for the entire VM. |
static void |
startAllocCounting()
Count the number and aggregate size of memory allocations between two points. |
static void |
startEmulatorTracing()
Start sending Dalvik method trace info to the emulator. |
static void |
startInstructionCounting()
Count the number of instructions executed between two points. |
static void |
startMethodTracing()
Start method tracing with default name, size, and with 0
flags. |
static void |
startMethodTracing(String traceFileName,
int bufferSize,
int flags)
Start method tracing, specifying a file name as well as a default buffer size. |
static void |
stopAllocCounting()
|
static void |
stopEmulatorTracing()
Stop sending Dalvik method trace info to the emulator. |
static void |
stopInstructionCounting()
|
static void |
stopMethodTracing()
Stop method tracing. |
static long |
threadCpuTimeNanos()
Get an indication of thread CPU usage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_METHOD_TRACE_FILE_NAME
public static final int TRACE_COUNT_ALLOCS
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
| Method Detail |
|---|
public static long lastDebuggerActivity()
public static boolean isDebuggerConnected()
public static void startMethodTracing()
0
flags.
public static void startMethodTracing(String traceFileName,
int bufferSize,
int flags)
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.
traceFileName - name to give the trace filebufferSize - the maximum size of both files combined. If passed
as 0, it defaults to 8MB.flags - flags to control method tracing. The only one that
is currently defined is TRACE_COUNT_ALLOCS.public static void stopMethodTracing()
public static void startEmulatorTracing()
public static void stopEmulatorTracing()
public static long threadCpuTimeNanos()
public static void startAllocCounting()
public static void stopAllocCounting()
public static int getAllocCount(int kind)
public static void resetAllocCount(int kinds)
public static int setAllocationLimit(int limit)
public static int setGlobalAllocationLimit(int limit)
public static void startInstructionCounting()
public static void stopInstructionCounting()
public static void getInstructionCount(int[] counts)
public static void resetInstructionCount()
public static void printLoadedClasses(int flags)
public static int getLoadedClassCount()
static void printThis(Object thisThing,
int count,
int thing)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||