RFR: 8213890: Implementation of JEP 344: Abortable Mixed Collections for G1 (original) (raw)

Thomas Schatzl thomas.schatzl at oracle.com
Wed Nov 21 10:26:34 UTC 2018


Hi,

On Wed, 2018-11-14 at 16:57 +0100, Stefan Johansson wrote:

Hi,

Please review this patch for "JEP 344: Abortable Mixed Collections for G1", the JEP is not yet targeted but the goal is to get it into JDK 12. JEP: https://bugs.openjdk.java.net/browse/JDK-8190269 Issue: https://bugs.openjdk.java.net/browse/JDK-8213890 Webrev: http://cr.openjdk.java.net/~sjohanss/8213890/00

Some comments:

This is very interesting information to (in the future) size number of threads etc.

The reason is that I assume that if you declare variables at the top, that they are used throughout the code which is not the case here.

In this case I would just remove the comment here, and add a comment explaining optional_evacuation_fraction() at its declaration.

Note that the original message was confusing, see https://bugs.openjdk.java.net/browse/JDK-8165849; maybe this could be fixed here while we are here. Note that I do not see this as mandatory, but I would like to have information about that we took additional regions that will likely exceed the pause time goal.

I would also group the "optional_region_*_length" with the _optional_regions declaration, and put a small comment above it like done just above.

In general the new methods are not documented at all.

Potentially this interface could be improved by having a method in G1CollectionSet that returns you this iterator over the "recently prepared" optional collection set. And the code retrieves that iterator for every set of optional regions.

And G1OptionalCSetIterator only returns you the regions one by one.

E.g. something like

G1OptionalCSetIterator it = _cset-

getnextoptionalregions(timeleft);

for (element e in it) do { ... }

(I am intentionally obtuse about the interface for retrieving the elements, either the usual has_next() or STL iterator style would be fine with me)

I think that would tighten the interface a bit, but I haven't really evaluated how much effort that would be, or if it is even possible.

The hope is that that would remove the need for index_in_opt_cset member in HeapRegion.

Otherwise seems fine :)

Thanks, Thomas



More information about the hotspot-gc-dev mailing list