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
--- a/hotspot/test/serviceability/sa/TestClassLoaderStats.java Wed Jun 10 07:37:11 2015 +0200
+++ b/hotspot/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/hotspot/test/serviceability/sa/TestStackTrace.java Wed Jun 10 07:37:11 2015 +0200
+++ b/hotspot/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/hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java Wed Jun 10 07:37:11 2015 +0200
+++ b/hotspot/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;