test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_8003424.4 Sdiff test/runtime/SharedArchiveFile

test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java

Print this page




  67 
  68         // run using the shared archive
  69         pb = ProcessTools.createJavaProcessBuilder(
  70             "-XX:+UnlockDiagnosticVMOptions",
  71             "-XX:SharedArchiveFile=./sample.jsa",
  72             "-Xshare:on",
  73             objectAlignmentArg,
  74             "-version");
  75 
  76         output = new OutputAnalyzer(pb.start());
  77 
  78         try {
  79             output.shouldContain("sharing");
  80             output.shouldHaveExitValue(0);
  81         } catch (RuntimeException e) {
  82             // CDS uses absolute addresses for performance.
  83             // It will try to reserve memory at a specific address;
  84             // there is a chance such reservation will fail
  85             // If it does, it is NOT considered a failure of the feature,
  86             // rather a possible expected outcome, though not likely
  87             output.shouldContain(
  88                 "Unable to reserve shared space at required address");
  89             output.shouldHaveExitValue(1);
  90         }
  91     }
  92 }


  67 
  68         // run using the shared archive
  69         pb = ProcessTools.createJavaProcessBuilder(
  70             "-XX:+UnlockDiagnosticVMOptions",
  71             "-XX:SharedArchiveFile=./sample.jsa",
  72             "-Xshare:on",
  73             objectAlignmentArg,
  74             "-version");
  75 
  76         output = new OutputAnalyzer(pb.start());
  77 
  78         try {
  79             output.shouldContain("sharing");
  80             output.shouldHaveExitValue(0);
  81         } catch (RuntimeException e) {
  82             // CDS uses absolute addresses for performance.
  83             // It will try to reserve memory at a specific address;
  84             // there is a chance such reservation will fail
  85             // If it does, it is NOT considered a failure of the feature,
  86             // rather a possible expected outcome, though not likely
  87             output.shouldContain("Could not allocate metaspace at a compatible address");

  88             output.shouldHaveExitValue(1);
  89         }
  90     }
  91 }
test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File