< prev index next >

src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java

Print this page
rev 53157 : 8215622: add dump to file support for jmap histo
Summary: add "file=" option to jmap -histo
Reviewed-by:
Contributed-by: zanglin5@jd.com

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -141,11 +141,11 @@
 
     /**
      * Execute the given command in the target VM.
      */
     InputStream execute(String cmd, Object ... args) throws AgentLoadException, IOException {
-        assert args.length <= 3;                // includes null
+        assert args.length <= 4;                // includes null
 
         // did we detach?
         synchronized (this) {
             if (socket_path == null) {
                 throw new IOException("Detached from target VM");

@@ -169,11 +169,11 @@
         // <ver> <cmd> <args...>
         try {
             writeString(s, PROTOCOL_VERSION);
             writeString(s, cmd);
 
-            for (int i=0; i<3; i++) {
+            for (int i=0; i<4; i++) {
                 if (i < args.length && args[i] != null) {
                     writeString(s, (String)args[i]);
                 } else {
                     writeString(s, "");
                 }
< prev index next >