< prev index next >

test/hotspot/jtreg/serviceability/sa/ClhsdbCDSJstackPrintAll.java

Print this page

        

@@ -22,11 +22,11 @@
  */
 
 /*
  * @test
  * @bug 8174994
- * @summary Test the clhsdb commands 'jstack', 'printall' with CDS enabled
+ * @summary Test the clhsdb commands 'jstack', 'printall', 'where' with CDS enabled
  * @requires vm.cds
  * @library /test/lib
  * @run main/othervm/timeout=2400 -Xmx1g ClhsdbCDSJstackPrintAll
  */
 

@@ -75,11 +75,11 @@
                 System.out.println("The CDS archive is not mapped - test skipped.");
                 LingeredApp.stopApp(theApp);
                 return;
             }
 
-            cmds = List.of("jstack -v", "printall");
+            cmds = List.of("jstack -v", "printall", "where -a");
 
             Map<String, List<String>> expStrMap = new HashMap<>();
             Map<String, List<String>> unExpStrMap = new HashMap<>();
             expStrMap.put("jstack -v", List.of(
                 "No deadlocks found",

@@ -90,19 +90,28 @@
             unExpStrMap.put("jstack -v", List.of(
                 "sun.jvm.hotspot.types.WrongTypeException",
                 "No suitable match for type of address"));
             expStrMap.put("printall", List.of(
                 "aload_0",
+                "_nofast_aload_0",
                 "Constant Pool of",
                 "public static void main(java.lang.String[])",
                 "Bytecode",
                 "invokevirtual",
                 "checkcast",
                 "Exception Table",
                 "invokedynamic"));
             unExpStrMap.put("printall", List.of(
-                "No suitable match for type of address"));
+                "No suitable match for type of address",
+                "illegal code",
+                "Failure occurred at bci"));
+            expStrMap.put("where -a", List.of(
+                "Java Stack Trace for main",
+                "public static void main"));
+            unExpStrMap.put("where -a", List.of(
+                "illegal code",
+                "Failure occurred at bci"));
             test.run(theApp.getPid(), cmds, expStrMap, unExpStrMap);
         } catch (Exception ex) {
             throw new RuntimeException("Test ERROR " + ex, ex);
         } finally {
             LingeredApp.stopApp(theApp);
< prev index next >