On Thu, 8 Sep 2022 09:56:05 GMT, Kevin Walls <kev...@openjdk.org> wrote:
> Test update to cope with heap size changing (shrinking) in the early life of > the test app. > > A change in GC timing affects this test which reads eden size and heap size. > Both eden and heap are likely to shrink initially for this test. Failures > were that heap size shrank after reading eden size, such that eden appeared > to be >100% of heap. > Recognising a shrinking heap and retrying resolves this. > > (Re-ordering to read heap size then eden would be enough to make the check in > provokeGc work. But it would allocate sometimes a very small fraction of the > heap, which is not the intent.) What is the purpose of the outer loop of this test? Is it to test while the heap is shrinking? If so, it seems there is no reason for the inner loop to be added, and also possibly just re-ordering the read of the heap size is the correct fix. ------------- PR: https://git.openjdk.org/jdk/pull/10218