From 8f1c134848437d7e37fb3b4bd603b91798e19724 Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Fri, 11 Aug 2023 18:09:44 +0000 Subject: [PATCH] 8313798: [aarch64] sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java sometimes times out on aarch64 Reviewed-by: kevinw, sspitsyn --- .../classes/sun/jvm/hotspot/runtime/VFrame.java | 12 +++++++++++- test/jdk/ProblemList.txt | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VFrame.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VFrame.java index f4d7827254c..83b38654d9b 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VFrame.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2023, 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 @@ -27,6 +27,7 @@ package sun.jvm.hotspot.runtime; import java.io.*; import sun.jvm.hotspot.code.*; import sun.jvm.hotspot.utilities.*; +import sun.jvm.hotspot.debugger.Address; public class VFrame { protected Frame fr; @@ -145,7 +146,16 @@ public class VFrame { if (f.isJavaFrame()) { return (JavaVFrame) f; } + Address oldSP = f.getFrame().getSP(); f = f.sender(imprecise); + if (f != null) { + // Make sure the sender frame is above the current frame, not below + Address newSP = f.getFrame().getSP(); + if (oldSP.greaterThanOrEqual(newSP)) { + String errString = "newSP(" + newSP + ") is not above oldSP(" + oldSP + ")"; + throw new RuntimeException(errString); + } + } } return null; } diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 0db84d6274f..3b266fee462 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -734,7 +734,6 @@ sun/tools/jstat/jstatLineCounts3.sh 8268211 linux-aa sun/tools/jstat/jstatLineCounts4.sh 8268211 linux-aarch64 sun/tools/jhsdb/JStackStressTest.java 8276210 linux-aarch64 -sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8313798 generic-aarch64 ############################################################################