RFR: Move heuristics from ShCollectorPolicy to ShHeap
Roman Kennke
rkennke at redhat.com
Wed May 16 15:19:20 UTC 2018
I simply spliced all the calls to policy that also called to heuristics
into two calls: policy+heuristics or changed to heuristics call for
cases where policy did not do anything.
Remaining record* stuff in policy should probably be moved into a
separate ShenandoahStats class or such.
Differential:
http://cr.openjdk.java.net/~rkennke/heuristics-refactoring/webrev.01.diff/
Full:
http://cr.openjdk.java.net/~rkennke/heuristics-refactoring/webrev.01/
I can hold it back and fold into the bigger multi-context picture, or
push it separately. Whatever you prefer.
Roman
> 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