summaryrefslogtreecommitdiffstats
path: root/dalvik/src/main/java/dalvik/system/VMDebug.java
diff options
context:
space:
mode:
Diffstat (limited to 'dalvik/src/main/java/dalvik/system/VMDebug.java')
-rw-r--r--dalvik/src/main/java/dalvik/system/VMDebug.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/dalvik/src/main/java/dalvik/system/VMDebug.java b/dalvik/src/main/java/dalvik/system/VMDebug.java
index 9034ac1..023cd6a 100644
--- a/dalvik/src/main/java/dalvik/system/VMDebug.java
+++ b/dalvik/src/main/java/dalvik/system/VMDebug.java
@@ -16,6 +16,8 @@
package dalvik.system;
+import java.io.IOException;
+
/**
* Provides access to some VM-specific debug features. Though this class and
* many of its members are public, this class is meant to be wrapped in a more
@@ -240,6 +242,18 @@ public final class VMDebug {
*/
public static native int getLoadedClassCount();
+ /**
+ * Dump "hprof" data to the specified file. This will cause a GC.
+ *
+ * The VM may create a temporary file in the same directory.
+ *
+ * @param fileName Full pathname of output file (e.g. "/sdcard/dump.hprof").
+ * @throws UnsupportedOperationException if the VM was built without
+ * HPROF support.
+ * @throws IOException if an error occurs while opening or writing files.
+ */
+ public static native void dumpHprofData(String fileName) throws IOException;
+
/* don't ask */
static native void printThis(Object thisThing, int count, int thing);