RFR: 8149128 : Add tests for G1MMUTracker
derek.white at oracle.com
Fri Feb 26 21:03:13 UTC 2016
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.
> - JPRT
> - Running `make test-hotspot-internal` locally
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev