RFR (XS): JDK-8017483: G1 tests fail with native OOME on Solaris x86 after HeapBaseMinAddress has been increased
Bengt Rutisson
bengt.rutisson at oracle.com
Wed Jun 26 11:57:47 UTC 2013
Hi all,
Could I have a couple of reviews for this really small change?
http://cr.openjdk.java.net/~brutisso/8017483/webrev.00/
Background:
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
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.
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.
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.
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:
diff --git a/src/share/vm/runtime/arguments.cpp
b/src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp
+++ b/src/share/vm/runtime/arguments.cpp
@@ -1571,7 +1571,7 @@
// By default HeapBaseMinAddress is 2G on all platforms except
Solaris x86.
// G1 currently needs a lot of C-heap, so on Solaris we have to
give G1
// some extra space for the C-heap compared to other collectors.
- FLAG_SET_ERGO(uintx, HeapBaseMinAddress, 1*G);
+ FLAG_SET_DEFAULT(HeapBaseMinAddress, 1*G);
}
}
Thanks,
Bengt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130626/62639e2f/attachment.htm>
More information about the hotspot-gc-dev
mailing list