From c0dce25756911ce49e7d8b034d5f12a25fc3c81d Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Wed, 15 Jan 2020 08:11:03 -0500 Subject: [PATCH] 8236917: TestInstanceKlassSize.java fails with "The size computed by SA for java.lang.Object does not match" Use getTestJavaOpts() instead of getVmOptions() because of mach5 configuration settings. Reviewed-by: lmesnik, cjplummer, dholmes --- .../jtreg/serviceability/sa/TestInstanceKlassSize.java | 2 +- .../sa/TestInstanceKlassSizeForInterface.java | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSize.java b/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSize.java index 8abd004912f..20dfe5f6ef8 100644 --- a/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSize.java +++ b/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSize.java @@ -75,7 +75,7 @@ public class TestInstanceKlassSize { try { List vmArgs = new ArrayList(); vmArgs.add("-XX:+UsePerfData"); - vmArgs.addAll(Utils.getVmOptions()); + vmArgs.addAll(Arrays.asList(Utils.getTestJavaOpts())); app = LingeredApp.startApp(vmArgs); System.out.println ("Started LingeredApp with pid " + app.getPid()); } catch (Exception ex) { diff --git a/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSizeForInterface.java b/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSizeForInterface.java index fcfee61f993..b167dd1ca3c 100644 --- a/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSizeForInterface.java +++ b/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSizeForInterface.java @@ -116,7 +116,7 @@ public class TestInstanceKlassSizeForInterface { Integer.toString(lingeredAppPid) }; - // Start a new process to attach to the LingeredApp process + // Start a new process to attach to the LingeredApp process to get SA info ProcessBuilder processBuilder = ProcessTools .createJavaProcessBuilder(toolArgs); OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder); @@ -150,9 +150,7 @@ public class TestInstanceKlassSizeForInterface { if (args == null || args.length == 0) { try { - List vmArgs = new ArrayList(); - vmArgs.addAll(Utils.getVmOptions()); - + List vmArgs = Arrays.asList(Utils.getTestJavaOpts()); theApp = new LingeredAppWithInterface(); LingeredApp.startApp(vmArgs, theApp); createAnotherToAttach(instanceKlassNames,