< prev index next >

src/hotspot/share/services/attachListener.hpp

Print this page
rev 58082 : 8214535: Parallel heap inspection for jmap histo (G1)
Summary: Add parallel heap inspection to speedup jmap -histo, this patch support G1
Reviewed-by:
Contributed-by: lzang

@@ -188,8 +188,37 @@
   }
 
   // complete operation by sending result code and any result data to the client
   virtual void complete(jint result, bufferedStream* result_stream) = 0;
 };
+
+// Base Class for arguments parsing.
+class CommandArgs : public CHeapObj<mtInternal> {
+};
+
+// Arguments of HeapInspect.
+struct HeapInspectArgs : public CommandArgs {
+  bool _live_object_only;
+  size_t _parallel_thread_num;
+  fileStream* _fs;
+  char* _path;
+
+  HeapInspectArgs() : _live_object_only(false),
+                      _parallel_thread_num(0),
+                      _fs(NULL),
+                      _path(NULL) { }
+  ~HeapInspectArgs() {
+    if (_path != NULL) {
+      FREE_C_HEAP_ARRAY(char, _path);
+      _path = NULL;
+    }
+
+    if (_fs != NULL) {
+      delete _fs;
+      _fs = NULL;
+    }
+  }
+};
+
 #endif // INCLUDE_SERVICES
 
 #endif // SHARE_SERVICES_ATTACHLISTENER_HPP
< prev index next >