RFR (M) 8164921: Memory leaked when instrumentation.retransformClasses() is called repeatedly

Dmitry Samersoff dmitry.samersoff at oracle.com
Sat Oct 1 07:26:26 UTC 2016


Coleen,

> Or something but the loops seem simple enough to me.

OK. Thank you for explanation.

-Dmitry

On 2016-10-01 01:44, Coleen Phillimore wrote:
> 
> 
> On 9/30/16 3:46 PM, Dmitry Samersoff wrote:
>> Coleen,
>>
>> My $.02
>>
>> 1.
>> metaspace.cpp:279 we have assert(word_size >= _small_block_min_size,
>> ...)  so at 868 and 895
>> if (word_size < SmallBlocks::small_block_min_size()) {
>> probably should be asserts as well
>>
>>
>> 2.
>> It might be better to rewrite loops at metaspace.cpp 261,268
>>    for (uint i = _small_block_min_size; i < _small_block_max_size; i++) {
>> as
>>    for (uint i = 0;
>>          i < (_small_block_max_size - _small_block_min_size);  ++i) {
>> ...
> 
>     for (uint i = _small_block_min_size; i < _small_block_max_size; i++) {
>       _small_lists[i - _small_block_min_size].set_size(i);
>     }
> 
> 
> In this loop I want 'i' to set the size.  The index of small_lists
> starts at 0 but the size is the size of the blocks.  This might make
> more sense like:
> 
>     for (uint i = _small_block_min_size; i < _small_block_max_size; i++) {
>       int k = i - _small_block_min_size;  // zero based addressing
>       _small_lists[k].set_size(i);
>     }
> 
> Or something but the loops seem simple enough to me.
> 
> Coleen
>>
>> -Dmitry
>>
>> On 2016-09-30 22:02, Coleen Phillimore wrote:
>>> Summary: Return Metablocks smaller than dictionary's dark matter.
>>>
>>> This change contributed by Jon Masamitsu and myself.  To reclaim "dark
>>> matter" this change adds an array of small blocks by size, created
>>> lazily, to return Metablocks smaller than the BinaryTreeDictionary
>>> entry's minimum size.   This change also fixed a bug in small object
>>> double free and adds debugging code to check for this case.
>>>
>>> With this change, the submitted test case runs indefinitely.   Also
>>> passed rbt tier 1-5 testing.
>>>
>>> open webrev at http://cr.openjdk.java.net/~coleenp/8164921.01/webrev
>>> bug link https://bugs.openjdk.java.net/browse/JDK-8164921
>>>
>>> Thanks,
>>> Coleen and Jon
>>
> 


-- 
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.


More information about the hotspot-dev mailing list