<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    Hi all,<br>
    <br>
    Could I have a couple of reviews for this really small change?<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~brutisso/8017483/webrev.00/">http://cr.openjdk.java.net/~brutisso/8017483/webrev.00/</a><br>
    <br>
    Background:<br>
    <br>
    For JDK-8012265 I increased the default value for HeapBaseMinAddress
    on Solaris x86 from 256m to 1g when using G1. In that change I used
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    FLAG_SET_ERGO() to set the new value of HeapBaseMinAddress. Now it
    turns out that there is code that checks
    !FLAG_IS_DEFAULT(HeapBaseMinAddress), which means that by setting
    the flag as "ergo" I changed the behavior of the VM.<br>
    <br>
    What happens is that Universe::preferred_heap_base() will use
    exactly the address HeapBaseMinAddress if it is not default.
    Otherwise it will calculate a base adress "backwards" from the
    maximum compressed oops heap size and the desired heap size. The
    effect is that if HeapBaseMinAddress=1g as default and we want a 16g
    heap we will get an actual heap base of at about address 16g. But if
    I set HeapBaseMinAddress=1g on the command line or using "ergo" we
    will pick the address 1g for the heap base.<br>
    <br>
    This means that in the first case we leave almost 16g free for the
    Solaris C-heap, but in the second case the C-heap will be limited to
    1g.<br>
    <br>
    I think this is a strange behavior and I will file a separate bug to
    track that. There are also other issues with the compressed oops set
    up. But to make the currently failing tests pass I suggest to change
    from "ergo" to "default" when updating the HeapBaseMinAddress value.
    This is small, quick and safe change. Here is the complete diff:<br>
    <br>
    diff --git a/src/share/vm/runtime/arguments.cpp
    b/src/share/vm/runtime/arguments.cpp<br>
    --- a/src/share/vm/runtime/arguments.cpp<br>
    +++ b/src/share/vm/runtime/arguments.cpp<br>
    @@ -1571,7 +1571,7 @@<br>
         // By default HeapBaseMinAddress is 2G on all platforms except
    Solaris x86.<br>
         // G1 currently needs a lot of C-heap, so on Solaris we have to
    give G1<br>
         // some extra space for the C-heap compared to other
    collectors.<br>
    -    FLAG_SET_ERGO(uintx, HeapBaseMinAddress, 1*G);<br>
    +    FLAG_SET_DEFAULT(HeapBaseMinAddress, 1*G);<br>
       }<br>
     }<br>
    <br>
    Thanks,<br>
    Bengt<br>
  </body>
</html>