RFR: Properly react on -ClassUnloading

Roman Kennke rkennke at redhat.com
Tue May 30 08:25:49 UTC 2017


Looks good

Am 30. Mai 2017 09:31:43 MESZ schrieb Aleksey Shipilev <shade at redhat.com>:
>Hi,
>
>Let Shenandoah properly react on disabled class unloading:
>
>$ hg diff
>diff -r 300d4921e9db
>src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp
>--- a/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp	Mon May
>29
>20:35:00 2017 +0200
>+++ b/src/share/vm/gc/shenandoah/shenandoahCollectorPolicy.cpp	Tue May
>30
>09:23:57 2017 +0200
>@@ -436,6 +436,7 @@
>   }
>
>   virtual bool unload_classes() {
>+    if (ShenandoahUnloadClassesFrequency == 0) return false;
>     // Randomly unload classes with 50% chance.
>     return (os::random() & 1) == 1;
>   }
>@@ -460,6 +461,7 @@
>   }
>
>   virtual bool unload_classes() {
>+    if (ShenandoahUnloadClassesFrequency == 0) return false;
>     // Randomly unload classes with 50% chance.
>     return (os::random() & 1) == 1;
>   }
>diff -r 300d4921e9db src/share/vm/runtime/arguments.cpp
>--- a/src/share/vm/runtime/arguments.cpp	Mon May 29 20:35:00 2017 +0200
>+++ b/src/share/vm/runtime/arguments.cpp	Tue May 30 09:23:57 2017 +0200
>@@ -2137,6 +2137,7 @@
>     FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
>     FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false);
>FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses,
>false);
>+    FLAG_SET_CMDLINE(uintx, ShenandoahUnloadClassesFrequency, 0);
>   }
> #endif // INCLUDE_ALL_GCS
> }
>
>
>Thanks,
>-Aleksey

-- 
Sent from my FairPhone


More information about the shenandoah-dev mailing list