< prev index next >

test/serviceability/dcmd/compiler/CodelistTest.java

Print this page
rev 13185 : 8183151: DCmd Compiler.codelist should print all compiled methods
Summary: Add support for AOT methods in codelist dcmd
Reviewed-by: neliasso
Contributed-by: twisti

@@ -110,19 +110,27 @@
         OutputAnalyzer output = executor.execute("Compiler.codelist");
         Iterator<String> lines = output.asLines().iterator();
 
         // Loop over output set result for all found methods
         while (lines.hasNext()) {
-            String line = lines.next();
+String line = lines.next();
 
             // Fast check for common part of method name
             if (line.contains("CodelistTest.testcaseMethod")) {
                 String[] parts = line.split(" ");
                 int compileID = Integer.parseInt(parts[0]);
+                Assert.assertTrue(compileID > 0, "CompileID must be positive");
+                
                 int compileLevel = Integer.parseInt(parts[1]);
-                String str = parts[2];
+                Assert.assertTrue(compileLevel >= -1, "CompileLevel must be at least -1 (AOT)");
+                Assert.assertTrue(compileLevel <= 4,  "CompileLevel must be at most 4 (C2)");
+                
+                int codeState = Integer.parseInt(parts[2]);
+                Assert.assertTrue(codeState >= 0, "CodeState must be at least 0 (In Use)");
+                Assert.assertTrue(codeState <= 4, "CodeState must be at most 4 (Unloaded)");
 
+                String str = parts[3];
                 for (TestCase testcase : testcases) {
                     if (str.contains(testcase.methodName)) {
                         Assert.assertFalse(testcase.check, "Must not be found or already found.");
                         Assert.assertTrue(testcase.level == compileLevel, "Must have correct level");
                         testcase.check = true;
< prev index next >