RFR: 8149128 : Add tests for G1MMUTracker

Derek White derek.white at oracle.com
Fri Feb 26 21:03:13 UTC 2016

Hi Eric,

This is a good example to learn how internal VM tests work, so thanks!

On 2/12/16 5:37 AM, Erik Helin wrote:
> Hi all,
> this small patch adds a couple of unit tests for G1MMUTracker.
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8149128/00/
> Testing:
> - JPRT
> - Running `make test-hotspot-internal` locally
> Thanks,
> Erik
Some quick comments:
  - Should assert_jlong_within(), assert_jlong_eq(), and 
assert_double_eq() move to debug.hpp? They seem useful.
  - Is starting from milliseconds and converting to seconds buying 

  * const double time_window = ms(500).to_sec();
  * const double time_window = 0.5;

       - From my point of view the 2nd is more clear. I guess the 
asserts would have to use doubles, and perhaps allow a little slop, but 
that moves the boilerplate code out of the test, which should make the 
test's intentions much more obvious.

  - Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20160226/65f69110/attachment.htm>

More information about the hotspot-gc-dev mailing list