OSDN Git Service

Merge "Strawman support for streaming hprof dumps. Do not merge" into eclair
[android-x86/sdk.git] / ddms / libs / ddmlib / src / com / android / ddmlib / Client.java
index efa47d7..fa53bef 100644 (file)
@@ -230,10 +230,15 @@ public class Client {
      * Makes the VM dump an HPROF file
      */
     public void dumpHprof() {
+        boolean canStream = false; //mClientData.hasFeature(ClientData.FEATURE_HPROF_STREAMING);
         try {
-            String file = "/sdcard/" + mClientData.getClientDescription().replaceAll("\\:.*", "") +
-                ".hprof";
-            HandleHeap.sendHPDU(this, file);
+            if (canStream) {
+                HandleHeap.sendHPDS(this);
+            } else {
+                String file = "/sdcard/" + mClientData.getClientDescription().replaceAll("\\:.*", "") +
+                    ".hprof";
+                HandleHeap.sendHPDU(this, file);
+            }
         } catch (IOException e) {
             Log.w("ddms", "Send of HPDU message failed");
             // ignore