RFR (S) 8236901: 8232759 missed a test case
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Tue Jan 14 03:04:24 UTC 2020
On 1/13/20 7:36 PM, David Holmes wrote:
> Hi Coleen,
>
> On 14/01/2020 7:08 am, coleen.phillimore at oracle.com wrote:
>> Summary: Use jcmd GC.class-histogram because it also works for
>> verifying that the classes are loaded.
>
> I'm looking at GC.class_stats and GC.class_histogram output and the
> actual test and I'm not sure the test was even working the way it was
> expected before. If I run the test using GC.class_stats I see:
>
> ----------System.out:(20/1962)----------
> sizeof(DefineClass.class) == 8905
> class test.DefineClass
> WARNING: Ran out of C-heap; undercounted 342 total instances in data
> below
> 1447 46 0 544 0 6752 12
> 1351 4048 3616 8088 11704 test.DefineClass
> 1448 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1449 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1450 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1451 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1452 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1453 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1454 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1455 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1456 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> 1457 46 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> Should have 2 DefineClass instances and we have: 11
I think the test wants *at least* 2 DefineClasses in these places, where
it passes false to getClassStats.
>
> then
>
> System.gc()
> WARNING: Ran out of C-heap; undercounted 342 total instances in data
> below
> 1598 47 0 544 0 6752 12
> 1351 4048 3616 8088 11704 test.DefineClass
> 1599 47 0 544 0 4072 12
> 1351 4048 3536 5488 9024 test.DefineClass
> Should have 2 DefineClass instances and we have: 2
>
> so the test "passes". But if I then change the test to use
> GC.class_histogram as suggested it fails!
>
>
> ----------System.out:(7/321)----------
> sizeof(DefineClass.class) == 8909
> class test.DefineClass
> WARNING: Ran out of C-heap; undercounted 342 total instances in data
> below
> Should have 2 DefineClass instances and we have: 0
> System.gc()
> WARNING: Ran out of C-heap; undercounted 342 total instances in data
> below
> Should have 2 DefineClass instances and we have: 0
>
I don't know why it fails for you. How did you run it? Did you test my
patch?
Coleen
> This is on a JDK where GC.class_stats still exists.
>
> David
>
>> open webrev at
>> http://cr.openjdk.java.net/~coleenp/2020/8236901.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8236901
>>
>> Ran tier1 which runs the test on all Oracle platforms.
>>
>> Thanks,
>> Coleen
More information about the hotspot-runtime-dev
mailing list