RFR(L): 8186027: C2: loop strip mining

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Nov 28 17:16:20 UTC 2017


UseCountedLoopSafepoints should be false by default too. Otherwise code in arguments.cpp will set LoopStripMiningIter to 
1. I will remove next change in c2_globals.hpp:

-  product(bool, UseCountedLoopSafepoints, false,                            \
+  product(bool, UseCountedLoopSafepoints, true,                             \

Thanks,
Vladimir

On 11/28/17 3:00 AM, Roland Westrelin wrote:
> 
> Hi Vladimir,
> 
>> Roland, please, prepare changeset.
> 
> Here is the changeset:
> 
> http://cr.openjdk.java.net/~roland/8186027/loop-strip-mining.patch
> 
> It includes the patch below to enable it with G1.
> 
> Roland.
> 
> diff --git a/src/hotspot/share/gc/g1/g1Arguments.cpp b/src/hotspot/share/gc/g1/g1Arguments.cpp
> --- a/src/hotspot/share/gc/g1/g1Arguments.cpp
> +++ b/src/hotspot/share/gc/g1/g1Arguments.cpp
> @@ -92,6 +92,16 @@
>     }
>   
>     log_trace(gc)("MarkStackSize: %uk  MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
> +
> +#ifdef COMPILER2
> +  // Enable loop strip mining to offer better pause time guarantees
> +  if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
> +    FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
> +  }
> +  if (UseCountedLoopSafepoints && FLAG_IS_DEFAULT(LoopStripMiningIter)) {
> +    FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
> +  }
> +#endif
>   }
>   
>   CollectedHeap* G1Arguments::create_heap() {
> diff --git a/src/hotspot/share/opto/c2_globals.hpp b/src/hotspot/share/opto/c2_globals.hpp
> --- a/src/hotspot/share/opto/c2_globals.hpp
> +++ b/src/hotspot/share/opto/c2_globals.hpp
> @@ -741,7 +741,7 @@
>     develop(bool, RenumberLiveNodes, true,                                    \
>             "Renumber live nodes")                                            \
>                                                                               \
> -  product(uintx, LoopStripMiningIter, 1000,                                 \
> +  product(uintx, LoopStripMiningIter, 0,                                    \
>             "Number of iterations in strip mined loop")                       \
>             range(0, max_juint)                                               \
>                                                                               \
> 



More information about the hotspot-gc-dev mailing list