RFR: 8134963 [Newtests] New tests for G1 remembered set up and down

Thomas Schatzl thomas.schatzl at oracle.com
Thu Jan 14 12:49:03 UTC 2016


Hi Dima,

On Wed, 2015-12-30 at 19:43 +0300, Dmitry Fazunenko wrote:
> Hi everyone,
> 
> An updated version of the stress test for Remembered Set:
>     http://cr.openjdk.java.net/~dfazunen/8134963/webrev.03/
> 
> Tested in RBT in many configurations.
> Many thanks to Thomas for his offline comments.

  some comments:

- I would prefer to have described the input parameters somewhere in
the description of the test (the "what the test does" one) instead of
some comments in the main() method.

- is there some way to add some kind of progress indicator?

- line 145, it should read "Object*s* per region"

- line 146, please write "Heap *fraction* to allocate" since there is
enough space and it is clearer.

- in the three paragraphs that are printed at startup, the ":" are
aligned differently within the paragraphs, please use a common style in
the output.

- line 200-202: the thresholds are automatically calculated, based on
region size and options.
See OtherRegionsTable::OtherRegionsTable for the fine->coarse threshold
(_max_fine_entries), and SparsePRT::cards_num() for an entry point for
the sparse->fine threshold.

Maybe they should be retrieved from the corresponding VM global.

- maybe an explanation what regToRefCounts is would be nice. Note that
I think it is (slightly) useful to actually add more than COARSE
entries (a few) to check that code path a bit more (adding entries to
rsets that are already coarsened).

- a bit more documentation in go() what is actually done.

E.g. maybe this

// an object from "to" region
// if pre > cur, then we will forget

would read better as

// Select an object that we will install references to. If the number 
// of references after should be less than they were before, select 
// NULL.

- while I typically do not comment on naming of local variables, I have
no clue what "star" should mean in this context. Maybe "target" or just
"obj" would make my life happier :)

- please start comments with upper case and ending with a full stop (if
they are full sentences).

- not sure what the "reading" means, probably you mean "To force the
use of rememebered set entries we need to provoke a GC. To induce some
fragmentation, and some mixed GCs, we need to make a few objects
unreachable.".

- as we already discussed in email, the stress test times out on slow
machines (I think these machines are always old SPARC with very few
threads). I am not sure what is better, either decrease the length of
the test or the timeout. (Did you try on e.g. Intel Atoms? - not sure
if they qualify since the heap requirement for the test is 3G min)

But an alternative could be some regular polling of the current runtime
 in the application and exit early.

I fear that otherwise we will spend more time on this in the future.

Thanks,
  Thomas
 



More information about the hotspot-gc-dev mailing list