8028254: gc/arguments/TestMinInitialErgonomics.java failed with unexpected initial heap size

Wed, 05 Feb 2014 10:09:54 +0100

author
ehelin
date
Wed, 05 Feb 2014 10:09:54 +0100
changeset 9622
1abddcd038df
parent 9621
c3abd2b71b9a
child 9623
f2cf09a64a91

8028254: gc/arguments/TestMinInitialErgonomics.java failed with unexpected initial heap size
Reviewed-by: brutisso, tschatzl, sjohanss

src/share/vm/prims/whitebox.cpp file | annotate | diff | comparison | revisions
test/gc/arguments/TestMaxHeapSizeTools.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/prims/whitebox.cpp	Fri Feb 08 16:34:52 2019 -0500
     1.2 +++ b/src/share/vm/prims/whitebox.cpp	Wed Feb 05 10:09:54 2014 +0100
     1.3 @@ -171,7 +171,7 @@
     1.4  WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) {
     1.5    CollectorPolicy * p = Universe::heap()->collector_policy();
     1.6    gclog_or_tty->print_cr("Minimum heap " SIZE_FORMAT " Initial heap "
     1.7 -    SIZE_FORMAT" Maximum heap " SIZE_FORMAT " Min alignment " SIZE_FORMAT " Max alignment " SIZE_FORMAT,
     1.8 +    SIZE_FORMAT " Maximum heap " SIZE_FORMAT " Space alignment " SIZE_FORMAT " Heap alignment " SIZE_FORMAT,
     1.9      p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(),
    1.10      p->space_alignment(), p->heap_alignment());
    1.11  }
     2.1 --- a/test/gc/arguments/TestMaxHeapSizeTools.java	Fri Feb 08 16:34:52 2019 -0500
     2.2 +++ b/test/gc/arguments/TestMaxHeapSizeTools.java	Wed Feb 05 10:09:54 2014 +0100
     2.3 @@ -41,8 +41,8 @@
     2.4    public long initialHeapSize;
     2.5    public long maxHeapSize;
     2.6  
     2.7 -  public long minAlignment;
     2.8 -  public long maxAlignment;
     2.9 +  public long spaceAlignment;
    2.10 +  public long heapAlignment;
    2.11  }
    2.12  
    2.13  class TestMaxHeapSizeTools {
    2.14 @@ -192,7 +192,7 @@
    2.15      // Unfortunately there is no other way to retrieve the minimum heap size and
    2.16      // the alignments.
    2.17  
    2.18 -    Matcher m = Pattern.compile("Minimum heap \\d+ Initial heap \\d+ Maximum heap \\d+ Min alignment \\d+ Max alignment \\d+").
    2.19 +    Matcher m = Pattern.compile("Minimum heap \\d+ Initial heap \\d+ Maximum heap \\d+ Space alignment \\d+ Heap alignment \\d+").
    2.20        matcher(output.getStdout());
    2.21      if (!m.find()) {
    2.22        throw new RuntimeException("Could not find heap size string.");
    2.23 @@ -204,8 +204,8 @@
    2.24      val.minHeapSize = valueAfter(match, "Minimum heap ");
    2.25      val.initialHeapSize = valueAfter(match, "Initial heap ");
    2.26      val.maxHeapSize = valueAfter(match, "Maximum heap ");
    2.27 -    val.minAlignment = valueAfter(match, "Min alignment ");
    2.28 -    val.maxAlignment = valueAfter(match, "Max alignment ");
    2.29 +    val.spaceAlignment = valueAfter(match, "Space alignment ");
    2.30 +    val.heapAlignment = valueAfter(match, "Heap alignment ");
    2.31    }
    2.32  
    2.33    /**
    2.34 @@ -218,12 +218,12 @@
    2.35      MinInitialMaxValues v = new MinInitialMaxValues();
    2.36      getMinInitialMaxHeap(args, v);
    2.37  
    2.38 -    if ((expectedMin != -1) && (align_up(expectedMin, v.minAlignment) != v.minHeapSize)) {
    2.39 +    if ((expectedMin != -1) && (align_up(expectedMin, v.heapAlignment) != v.minHeapSize)) {
    2.40        throw new RuntimeException("Actual minimum heap size of " + v.minHeapSize +
    2.41          " differs from expected minimum heap size of " + expectedMin);
    2.42      }
    2.43  
    2.44 -    if ((expectedInitial != -1) && (align_up(expectedInitial, v.minAlignment) != v.initialHeapSize)) {
    2.45 +    if ((expectedInitial != -1) && (align_up(expectedInitial, v.heapAlignment) != v.initialHeapSize)) {
    2.46        throw new RuntimeException("Actual initial heap size of " + v.initialHeapSize +
    2.47          " differs from expected initial heap size of " + expectedInitial);
    2.48      }
    2.49 @@ -247,7 +247,7 @@
    2.50      MinInitialMaxValues v = new MinInitialMaxValues();
    2.51      getMinInitialMaxHeap(new String[] { gcflag, "-XX:MaxHeapSize=" + maxHeapsize + "M" }, v);
    2.52  
    2.53 -    long expectedHeapSize = align_up(maxHeapsize * K * K, v.maxAlignment);
    2.54 +    long expectedHeapSize = align_up(maxHeapsize * K * K, v.heapAlignment);
    2.55      long actualHeapSize = v.maxHeapSize;
    2.56  
    2.57      if (actualHeapSize > expectedHeapSize) {

mercurial