[9] RFR (S) 8146436: Add -XX:+UseAggressiveHeapShrink option
Tom Benson
tom.benson at oracle.com
Wed Feb 10 19:27:57 UTC 2016
Hi Chris,
My apologies if I missed the discussion somewhere, but is there a
specific rationale for adding this that can be mentioned in the bug
report? I can imagine scenarios where it would be useful, but maybe the
real need can be called out.
I think it might be clearer if the new code in cardGeneration was moved
down to where the values are used. IE, I would leave the inits of
current_shrink_factor and _shrink_factor as they were at lines 190/191.
Then down at 270, just don't divide by the shrink factor if
UseAggressiveHeapShrink is set, and the updates to shrink factor can be
in the same conditional. This has the advantage that you can fix the
comment just above it to match this special case. Do you think that
would work?
It looks like the ending "\" at line 3330 in globals.hpp isn't aligned,
and the copyright in cardGeneration.cpp needs to be updated.
One other nit, which you can ignore unless someone comes forward to
agree with me 8^) , is that I'd prefer the name ShrinkHeapAggressively
instead. Maybe this was already debated elsewhere....
Tom
On 2/4/2016 1:36 PM, Chris Plummer wrote:
> Hello,
>
> Please review the following for adding the -XX UseAggressiveHeapShrink
> option. When turned on, it tells the GC to reduce the heap size to the
> new target size immediately after a full GC rather than doing it
> progressively over 4 GCs.
>
> Webrev: http://cr.openjdk.java.net/~cjplummer/8146436/webrev.02/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8146436
>
> Testing:
> -JPRT with '-testset hotspot'
> -JPRT with '-testset hotspot -vmflags "-XX:+UseAggressiveHeapShrink"'
> -added new TestMaxMinHeapFreeRatioFlags.java test
>
> thanks,
>
> Chris
More information about the hotspot-dev
mailing list