RFR: Missing OOMScope in ShenandoahFixRootsTask

Roman Kennke rkennke at redhat.com
Tue Mar 13 12:08:29 UTC 2018


Am 13.03.2018 um 12:51 schrieb Aleksey Shipilev:
> sh/jdk8u identified a missing OOM scope in ShenandoahFixRootsTask, see:
> 
> class ShenandoahEvacuateUpdateRootsTask ... {
>   void work(uint worker_id) {
>     ShenandoahEvacOOMScope oom_evac_scope;  // <--- we have it here
> 
>     ...
>     _rp->process_evacuate_roots(&cl, NULL, worker_id);
> };
> 
> class ShenandoahFixRootsTask ... {
>   void work(uint worker_id) {
>     // <-- but not here!
>     ...
>     _rp->process_evacuate_roots(&cl, &blobsCl, worker_id);
>   }
> };
> 
> Fix:
> 
> diff -r 2742d73decc4 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Mon Mar 12 19:38:36 2018 +0100
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Tue Mar 13 12:48:32 2018 +0100
> @@ -1073,6 +1073,7 @@
>    }
> 
>    void work(uint worker_id) {
> +    ShenandoahEvacOOMScope oom_evac_scope;
>      ShenandoahUpdateRefsClosure cl;
>      MarkingCodeBlobClosure blobsCl(&cl, CodeBlobToOopClosure::FixRelocations);
> 
> 
> Testing: hotspot_gc_shenandoah, sh/jdk8u
> 
> Thanks,
> -Aleksey
> 

It's only required in sh/jdk8u because of the special handling of STL,
which evac's the locker object in process_evacuate_roots(). However, it
doesn't hurt, so feel free to also add it to sh/jdk to keep things in
sync, maybe with a little comment, so that we don't wonder what's up there.

Roman



More information about the shenandoah-dev mailing list