RFR: JDK-8147633 and JDK-8078052 - fixing StackTraceEventTest a bit
Bengt Rutisson
bengt.rutisson at oracle.com
Wed Jan 20 19:50:43 UTC 2016
Hi everyone,
Could I have a couple of reviews for a change to fix some issues with
the StackTraceEventTest tests?
http://cr.openjdk.java.net/~brutisso/8147633/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8147633
https://bugs.openjdk.java.net/browse/JDK-8078052
There are many problems with these tests and my changes will improve the
tests, but I am not convinced these tests are stable anyay.
Here are the changes I propose:
- Make sure to reset the counter value OldGenMemoryAllocator::allocate()
to make sure we allocate until we are done. This fixes JDK-8078052.
- Make sure it is enough that one correct event is fired. There may well
be events that don't look the way we expect them to be. But there should
be at least one of our expected events. This is the fix that renames
verifyStackTrace() to matchingStackTrace(). This fixes JDK-8147633.
- The TestG1HumongousAllocationPendingStackTrace test was just lucky in
the way it triggered GCs. The test had added some extra iterations
presumably to make this test a bit more stable. Instead I changed that
test to use -XX:InitiatingHeapOccupancyPercent=100, which means that
there won't be a concurrent mark started before the desired young GC
event is sent.
- Doing the change above means that the "threshold" variable to
testAllocEvent() is not needed. And this means that the extra overloaded
method is not needed. Which in turn means that the expected stack traces
should only contain one version of testAllocEvent.
- I also changed all the tests to use -Xlog:gc* instead of
-Xlog:gc*=debug. This is more similar to the PrintGCDetails logging that
used to be there.
Thanks,
Bengt
More information about the hotspot-gc-dev
mailing list