RFR (s): 8153755: Improve test: stress/gc/TestStressRSetCoarsening.java
Kirill Zhaldybin
kirill.zhaldybin at oracle.com
Tue Apr 12 14:29:14 UTC 2016
Dmitry,
Looks ok.
Thank you
Regards, Kirill
On 12.04.2016 16:32, Dmitry Fazunenko wrote:
> Kirill,
>
> Thank you for your notices!
> New version
> http://cr.openjdk.java.net/~dfazunen/8153755/webrev.02/
>
> Please find some comments inline:
>
> On 12.04.2016 15:14, Kirill Zhaldybin wrote:
>> Dmitry,
>>
>> Just a couple of remarks:
>> 1. You could get a number of free regions with WhiteBox method:
>> regionCount = (int) WB.g1NumFreeRegions();
>>
>> It should be more reliable (and simpler) than
>> // How many free regions
>> Runtime rt = Runtime.getRuntime();
>> long used = rt.totalMemory() - rt.freeMemory();
>> long totalFree = rt.maxMemory() - used;
>> regionCount = (int) ((totalFree / regionSize) *
>> heapFractionToAllocate);
>
> Yes, I modified as you suggested.
> I kept used/totalFree to print information about system.
>
>>
>> 2. You could calculate actual Object[N] size without loop - see
>> gc/testlibrary/Helpers.java detectByteArrayAllocationOverhead as example.
>
> The Helper class seems to do what's needed, but it deals for byte[],
> when I work with Object[]. So, to use the Helper I will have to write an
> extra method.
> I prefer to keep my implementation as is, which is relatively simple.
>
> Thanks,
> Dima
>
>>
>> Thank you.
>>
>> Regards, Kirill
>>
>>
>> On 11.04.2016 16:09, Dmitry Fazunenko wrote:
>>> Hello,
>>>
>>> May I have a couple of reviews for a small change to the stress test:
>>>
>>> 1) change logging options (-XX:+PrintGC --> -Xlog:gc*)
>>> 2) Use WhiteBox API to obtain size of new Object[N] object
>>>
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8153755
>>> http://cr.openjdk.java.net/~dfazunen/8153755/webrev.00/
>>>
>>> Testing: locally + RBT
>>>
>>> Thanks,
>>> Dima
>>>
>>>
>>>
>>
>
More information about the hotspot-gc-dev
mailing list