changeset 8540:ae5fa26d02d2

8085813: The targeted processes in sun/tools tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms Reviewed-by: sspitsyn
author ykantser
date Mon, 08 Jun 2015 12:54:05 +0200
parents 265efe426d5a
children 76f495512e4a
files test/serviceability/sa/TestClassLoaderStats.java test/serviceability/sa/TestStackTrace.java test/serviceability/sa/jmap-hashcode/Test8028623.java
diffstat 3 files changed, 24 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/test/serviceability/sa/TestClassLoaderStats.java	Wed Jun 10 07:37:11 2015 +0200
+++ b/test/serviceability/sa/TestClassLoaderStats.java	Mon Jun 08 12:54:05 2015 +0200
@@ -21,9 +21,13 @@
  * questions.
  */
 
+import java.util.ArrayList;
+import java.util.List;
+
 import jdk.test.lib.Platform;
 import jdk.test.lib.ProcessTools;
 import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.Utils;
 import jdk.test.lib.apps.LingeredApp;
 
 /*
@@ -44,7 +48,10 @@
 
         LingeredApp app = null;
         try {
-            app = LingeredApp.startApp();
+            List<String> vmArgs = new ArrayList<String>();
+            vmArgs.add("-XX:+UsePerfData");
+            vmArgs.addAll(Utils.getVmOptions());
+            app = LingeredApp.startApp(vmArgs);
 
             System.out.println("Attaching sun.jvm.hotspot.tools.ClassLoaderStats to " + app.getPid());
             ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
--- a/test/serviceability/sa/TestStackTrace.java	Wed Jun 10 07:37:11 2015 +0200
+++ b/test/serviceability/sa/TestStackTrace.java	Mon Jun 08 12:54:05 2015 +0200
@@ -21,9 +21,13 @@
  * questions.
  */
 
+import java.util.ArrayList;
+import java.util.List;
+
 import jdk.test.lib.OutputAnalyzer;
 import jdk.test.lib.Platform;
 import jdk.test.lib.ProcessTools;
+import jdk.test.lib.Utils;
 import jdk.test.lib.apps.LingeredApp;
 
 /*
@@ -44,7 +48,10 @@
 
         LingeredApp app = null;
         try {
-            app = LingeredApp.startApp();
+            List<String> vmArgs = new ArrayList<String>();
+            vmArgs.add("-XX:+UsePerfData");
+            vmArgs.addAll(Utils.getVmOptions());
+            app = LingeredApp.startApp(vmArgs);
 
             System.out.println("Attaching sun.jvm.hotspot.tools.StackTrace to " + app.getPid());
             ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
--- a/test/serviceability/sa/jmap-hashcode/Test8028623.java	Wed Jun 10 07:37:11 2015 +0200
+++ b/test/serviceability/sa/jmap-hashcode/Test8028623.java	Mon Jun 08 12:54:05 2015 +0200
@@ -21,6 +21,13 @@
  * questions.
  */
 
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.OutputBuffer;
+import jdk.test.lib.Platform;
+import jdk.test.lib.ProcessTools;
+
+import java.io.File;
+
 /*
  * @test
  * @bug 8028623
@@ -32,16 +39,8 @@
  *          jdk.jvmstat/sun.jvmstat.monitor
  * @build jdk.test.lib.*
  * @compile -encoding utf8 Test8028623.java
- * @run main Test8028623
+ * @run main/othervm -XX:+UsePerfData Test8028623
  */
-
-import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputBuffer;
-import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
-
-import java.io.File;
-
 public class Test8028623 {
 
   public static int \u00CB = 1;