RFR: 8178813: Add test for G1 pre-barrier on dereference of weak JNI handles
Thomas Schatzl
thomas.schatzl at oracle.com
Tue May 9 08:34:53 UTC 2017
Hi Kim,
On Tue, 2017-05-09 at 10:08 +0200, Mikael Gerdin wrote:
> Hi Kim,
> [...]
> On 2017-05-09 07:46, Kim Barrett wrote:
> > [...]
> > full: http://cr.openjdk.java.net/~kbarrett/8178813/hotspot.01/
> > incr: http://cr.openjdk.java.net/~kbarrett/8178813/hotspot.01.inc/
some minor comments:
- I would recommend using whitebox api to issue the correct kind of GC
instead of calling system.gc() in the first place. This would avoid the
need to disallow ExplicitGCInvokesConcurrent. It also seems to be a
minor effort as the test already uses whitebox. If you think the loop
using system.gc is preferable, feel free to keep it.
- TestJNIWeakG1.java:206: the printed text does not correspond to the
method name like the other methods do ("checkShouldNotClear" vs.
"checkShouldNotCrash")
- not sure about the need for the error handling using booleans in the
main()/check() method. I would think that letting the Exception just
propagate and the test terminate asap would be sufficient.
The extra information about the second test failing in case the first
failed does not seem to be very helpful given that the test is very
small anyway.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list