RFR (XS) 8202360: [TESTBUG] runtime/LoadClass/TestResize.java needs to print output when it fails
gerard.ziemski at oracle.com
Wed May 23 19:29:49 UTC 2018
> On May 21, 2018, at 5:34 PM, David Holmes <david.holmes at oracle.com> wrote:
> Hi Gerard,
> On 22/05/2018 6:57 AM, Gerard Ziemski wrote:
>>> On May 20, 2018, at 8:38 PM, David Holmes <david.holmes at oracle.com> wrote:
>>> Okay - that helps with the immediate problem I had. I also now realize that the failure in this test is showing is that the SD did not in fact re-size as expected!
>> Can you elaborate? Is there a reproducible case I can try to run?
> The test's purpose is to check that the SD resizes, so if it finds a load factor too high (which indicates it didn't resize) then the SD resizing logic has either not worked as expected, or the test is not doing what it thinks!
The resizing is called during a safe point, which we try to trigger by issuing a System.gc() call (in TriggerResize.java). If no safe point takes place, then no resize had chance to occur, and we have test failure, which is probably what you experienced.
I changed the test to look for safe points in the output and check the load factor only when resizing had the chance to occur.
>> I have re-done the main logic a bit to simplify it, and not have to do either String and “+” nor StringBuffer, by taking advantage of the fact that the info we need to parse is on the 2nd output line.
> I was under the impression that we could see multiple lines of the form:
> Java dictionary (table_size=40423, classes=50002)
> as the table resized. If that is not the case then none of the output seems relevant to me except for this one line. ??
That print out comes from PrintSystemDictionaryAtExit, which happens only once at the exit, but there is more then one system dictionary, and all of them are checked.
More information about the hotspot-runtime-dev