src/hotspot/share/services/attachListener.cpp
changeset 59006 d3f1cb09b704
parent 57876 30db6422848b
--- a/src/hotspot/share/services/attachListener.cpp	Mon Nov 11 11:25:15 2019 +0100
+++ b/src/hotspot/share/services/attachListener.cpp	Mon Nov 11 12:06:22 2019 +0100
@@ -237,19 +237,7 @@
     // This helps reduces the amount of unreachable objects in the dump
     // and makes it easier to browse.
     HeapDumper dumper(live_objects_only /* request GC */);
-    int res = dumper.dump(op->arg(0));
-    if (res == 0) {
-      out->print_cr("Heap dump file created");
-    } else {
-      // heap dump failed
-      ResourceMark rm;
-      char* error = dumper.error_as_C_string();
-      if (error == NULL) {
-        out->print_cr("Dump failed - reason unknown");
-      } else {
-        out->print_cr("%s", error);
-      }
-    }
+    dumper.dump(op->arg(0), out);
   }
   return JNI_OK;
 }