8229118: [TESTBUG] serviceability/sa/ClhsdbFindPC fails on AArch64

Reviewed-by: cjplummer, adinn
This commit is contained in:
Nick Gasson 2019-08-15 14:00:36 +08:00
parent eed736fecd
commit 6af89d6412
2 changed files with 44 additions and 4 deletions

View File

@ -45,8 +45,13 @@ public class ClhsdbFindPC {
LingeredApp theApp = null;
try {
ClhsdbLauncher test = new ClhsdbLauncher();
theApp = withXcomp ? LingeredApp.startApp(List.of("-Xcomp"))
: LingeredApp.startApp(List.of("-Xint"));
theApp = new LingeredAppWithTrivialMain();
if (withXcomp) {
LingeredApp.startApp(List.of("-Xcomp"), theApp);
} else {
LingeredApp.startApp(List.of("-Xint"), theApp);
}
System.out.print("Started LingeredApp ");
if (withXcomp) {
System.out.print("(-Xcomp) ");
@ -67,7 +72,7 @@ public class ClhsdbFindPC {
// attach permission issues.
if (output != null) {
String cmdStr = null;
String[] parts = output.split("LingeredApp.main");
String[] parts = output.split("LingeredAppWithTrivialMain.main");
String[] tokens = parts[1].split(" ");
for (String token : tokens) {
if (token.contains("pc")) {
@ -82,7 +87,7 @@ public class ClhsdbFindPC {
Map<String, List<String>> expStrMap = new HashMap<>();
if (withXcomp) {
expStrMap.put(cmdStr, List.of(
"In code in NMethod for jdk/test/lib/apps/LingeredApp.main",
"In code in NMethod for LingeredAppWithTrivialMain.main",
"content:",
"oops:",
"frame size:"));

View File

@ -0,0 +1,35 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import jdk.test.lib.apps.LingeredApp;
/**
* This is a wrapper around LingeredApp.main to ensure we reliably get a
* compiled main nmethod in the stack trace on all platforms when using
* -Xcomp.
*/
public class LingeredAppWithTrivialMain extends LingeredApp {
public static void main(String args[]) {
LingeredApp.main(args);
}
}