RFR: Move heuristics from ShCollectorPolicy to ShHeap
Roman Kennke
rkennke at redhat.com
Wed May 16 14:44:47 UTC 2018
Hold on with review. I'm going to extend it to completely decouple
policy and heuristics.
Roman
> Another refactoring in preparation of interleaving GC. It moves the
> _heuristics out of ShCollectorPolicy and into ShHeap and (somewhat)
> decouples heuristics from ShCollectorPolicy.
>
> The reasoning behind this is that for interleaving minor/major GC I plan
> to put a bunch of stuff into a 'context': control-thread, heuristics,
> workers, cset, fset, and probably some more. Each context will work
> somewhat independently on some part of the heap (e.g. young vs. old
> gen). There will be one heuristic per context, but there will only be
> one CollectorPolicy per GC. ShenandoahCollectorPolicy should eventually
> become a pure implementation for CollectorPolicy and nothing else. Also
> note that ShHeap is only a temporary home for the heuristics, they will
> eventually go to the context class. The point of this patch is to
> decouple heuristics from ShCollectorPolicy.
>
> All the should* and can* methods are now called directly without hopping
> through ShCollectorPolicy. However, all the record* methods remain in
> the policy for now. I am not sure yet what to do with them: we may want
> to call them per-context (e.g. a context recording only its own GC
> activity) or globally (e.g. for stats) or both. I need to think this
> through when I do the multi-context stuff.
>
> http://cr.openjdk.java.net/~rkennke/heuristics-refactoring/webrev.00/
>
> Passes hotspot_gc_shenandoah
>
> Ok?
>
> Roman
>
More information about the shenandoah-dev
mailing list