4601N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The HotSpot implementation of com.sun.tools.attach.VirtualMachine. 0N/A * Load agent library 0N/A * If isAbsolute is true then the agent library is the absolute path 0N/A * to the library and thus will not be expanded in the target VM. 0N/A * if isAbsolute is false then the agent library is just a library 0N/A * name and it will be expended in the target VM. 0N/A * Load agent library - library name will be expanded in target VM 0N/A * Load agent - absolute path of library provided to target VM 0N/A * Load JPLIS agent which will load the agent JAR file and invoke 0N/A * the agentmain method. 0N/A * Translate interesting errors into the right exception and 0N/A * message (FIXME: create a better interface to the instrument 0N/A * implementation so this isn't necessary) 0N/A * The possible errors returned by JPLIS's agentmain 0N/A * Send "properties" command to target VM 0N/A // --- HotSpot specific methods --- 0N/A // Remote ctrl-break. The output of the ctrl-break actions can 0N/A // be read from the input stream. 0N/A // Remote heap dump. The output (error message) can be read from the 0N/A // returned input stream. 0N/A // Heap histogram (heap inspection in HotSpot) 0N/A // set JVM command line flag 0N/A // print command line flag 0N/A // -- Supporting methods 0N/A * Execute the given command in the target VM - specific platform 0N/A * implementation must implement this. 0N/A * Convenience method for simple commands 0N/A * Utility method to read an 'int' from the input stream. Ideally 0N/A * we should be using java.util.Scanner here but this implementation 0N/A * guarantees not to read ahead. 0N/A // read to \n or EOF 0N/A // -- attach timeout support 0N/A * Return attach timeout based on the value of the sun.tools.attach.attachTimeout 0N/A * property, or the default timeout if the property is not set to a positive 0N/A synchronized(
this) {