RFR (S): 8006088: Incompatible heap size flags accepted by VM

Thomas Schatzl thomas.schatzl at oracle.com
Fri Apr 26 12:05:32 UTC 2013


Hi all,

On Thu, 2013-04-18 at 10:57 -0700, John Cuthbertson wrote: 
> Hi Thomas,
> 
> [...]
> 
> Ship it.
> 
> JohnC

  I still need another reviewer to actually ship this :)

It would also help to have this cleanup for CR-7057939 and CR-8012591.

Thanks,
  Thomas

On Thu, 2013-04-18 at 10:57 -0700, John Cuthbertson wrote:
> Hi Thomas,
> 
> Thanks for the resonse. Inline...
> 
> On 4/17/2013 12:23 AM, Thomas Schatzl wrote:
> > Hi,
> >
> >    I had the same concerns about inconsistencies with -Xms and
> > -XX:InitialHeapSize, but -Xms is (apparently) defined to set both
> > minimum and initial heap size.
> > I already raised that issue in an earlier discussion.
> 
> OK. I don't have a problem with it. It just looked 'odd'.
> >
> > If you have an official source that states that -Xms only sets minimum
> > or initial heap size, I will gladly change this. I could not find
> > anything; actually the documentation (java -X) for -Xms states only that it sets the initial heap size.
> >
> > The observations below result from this definition.
> >
> > On Mon, 2013-04-15 at 16:29 -0700, John Cuthbertson wrote:
> >> Hi Thomas,
> >>
> >> Why do we treat:
> >>
> >> java -Xms8M  -XX:InitialHeapSize=4M...
> >>
> >> as an error while accepting:
> > Because -Xms sets minimum heap size to 8M, and if you then set initial
> > heap size to 4M there is a conflict in the general condition that
> > minimum <= initial <= max.
> >
> >> java -XX:InitialHeapSize=4M -Xms8M...
> >>
> >> It looks inconsistent. In both cases the user has asked for an initial
> >> heap size less than his requested minimum.
> > As mentioned, -Xms unfortunately seems to be defined to set both initial
> > and minimum heap size. So there is no conflict.
> 
> You're correct. I've looked at the contents of the Xusage.txt file for a 
> couple of really ancient jdks and it says that it sets the initial size.
> 
> 
> >> In collectorPolicy.cpp, can the code on lines 79-80 and 83-84 be
> >> coalesced into a single line for each? This would make the setting of
> >> Initial and Min consistent with the code that sets Max on line 87.
> >>
> > Done.
> >
> > See http://cr.openjdk.java.net/~tschatzl/8006088/webrev.7/ for the new
> > webrev.
> >
> > In addition to this change I fixed the headers of the jprt test cases to
> > avoid some issues with jtreg. Namely precompile the used classes and
> > install the whitebox api class into the boot class path.
> 
> Thanks. collectorPolicy.cpp looks much cleaner.
> 
> Ship it.
> 
> JohnC





More information about the hotspot-gc-dev mailing list