10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test SASymbolTableTest 26 * @summary Walk symbol table using SA, with and without CDS. 27 * Started failing on 2016.06.24 due to 8160376 on MacOS X so quarantine 28 * it on that platform: 29 * @requires os.family != "mac" 30 * @library /testlibrary 31 * @modules java.base/jdk.internal.misc 32 * jdk.hotspot.agent/sun.jvm.hotspot.oops 33 * jdk.hotspot.agent/sun.jvm.hotspot.memory 34 * jdk.hotspot.agent/sun.jvm.hotspot.runtime 35 * jdk.hotspot.agent/sun.jvm.hotspot.tools 36 * java.management 37 * @build SASymbolTableTestAgent SASymbolTableTestAttachee jdk.test.lib.* 38 * @run main SASymbolTableTest 39 */ 40 41 import jdk.test.lib.*; 42 43 /* 44 * The purpose of this test is to validate that we can use SA to 45 * attach a process and walk its SymbolTable, regardless whether 46 * the attachee process runs in CDS mode or not. 47 * 48 * SASymbolTableTest Just sets up the agent and attachee processes. 49 * The SymbolTable walking is done in the SASymbolTableTestAgent class. 50 */ 51 public class SASymbolTableTest { 52 static String jsaName = "./SASymbolTableTest.jsa"; 53 54 public static void main(String[] args) throws Exception { 55 if (!Platform.shouldSAAttach()) { 56 System.out.println("SA attach not expected to work - test skipped."); 57 return; 58 } 59 createArchive(); 60 run(true); 61 run(false); | 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test SASymbolTableTest 26 * @summary Walk symbol table using SA, with and without CDS. 27 * Started failing on 2016.06.24 due to 8160376 on MacOS X so quarantine 28 * it on that platform: 29 * @requires os.family != "mac" 30 * @library /test/lib 31 * @modules java.base/jdk.internal.misc 32 * jdk.hotspot.agent/sun.jvm.hotspot.oops 33 * jdk.hotspot.agent/sun.jvm.hotspot.memory 34 * jdk.hotspot.agent/sun.jvm.hotspot.runtime 35 * jdk.hotspot.agent/sun.jvm.hotspot.tools 36 * java.management 37 * @build SASymbolTableTestAgent SASymbolTableTestAttachee 38 * @run main SASymbolTableTest 39 */ 40 41 import jdk.test.lib.process.ProcessTools; 42 import jdk.test.lib.process.OutputAnalyzer; 43 import jdk.test.lib.JDKToolFinder; 44 import jdk.test.lib.Platform; 45 46 /* 47 * The purpose of this test is to validate that we can use SA to 48 * attach a process and walk its SymbolTable, regardless whether 49 * the attachee process runs in CDS mode or not. 50 * 51 * SASymbolTableTest Just sets up the agent and attachee processes. 52 * The SymbolTable walking is done in the SASymbolTableTestAgent class. 53 */ 54 public class SASymbolTableTest { 55 static String jsaName = "./SASymbolTableTest.jsa"; 56 57 public static void main(String[] args) throws Exception { 58 if (!Platform.shouldSAAttach()) { 59 System.out.println("SA attach not expected to work - test skipped."); 60 return; 61 } 62 createArchive(); 63 run(true); 64 run(false); |