RFR: 8145908: [Newtest] Multi-threading stress test for G1 Remembered Sets

Dmitry Fazunenko dmitry.fazunenko at oracle.com
Wed Feb 24 18:47:25 UTC 2016


Hi Thomas,

The new version where all your comments addressed:
    http://cr.openjdk.java.net/~dfazunen/8145908/webrev.03/

To clarify the idea of usage a window within STORAGE I added the 
following comment:

     // To cause Remembered Sets change their coarse level the test uses a window
     // within STORAGE. All the BUFFER elements refer to only STORAGE objects
     // from the current window. The window is defined by a range.
     // The first element has got the index: 'windowStart',
     // the last one: 'windowStart + windowSize - 1'
     // The window is shifting periodically.

Thanks,
Dima

On 23.02.2016 14:41, Thomas Schatzl wrote:
> Hi Dima,
>
>    sorry for the wrong delay...
>
> On Tue, 2016-02-02 at 22:11 +0300, Dmitry Fazunenko wrote:
>> Hello everyone,
>>
>> Would you look at a new stress for G1 Remembered Sets, please.
>>
>> http://cr.openjdk.java.net/~dfazunen/8145908/webrev.02/
>> https://bugs.openjdk.java.net/browse/JDK-8145908
>>
>> The test allocates objects in several G1 heap regions and then
>> creates
>> and removes references to them from other regions in multiple
>> threads,
>> causing Remembered Set to be updated.
>> The test doesn't make any assumptions about VM behavior, it just
>> expects
>> that VM will not crash.
> - 38  * @summary Stress G1 Remembered Set by in multiple threads
>
> -> Stress G1 Remembered Set using multiple threads
>
> - do stress tests need a @bugid line?
>
> -  85     // The lenght of a buffer element.
>
>   lenght -> length
>
> - is it possible to not shorten "regions" to "regs"? (BUFFER_OLD_REGS, ...YOUNG_REGS) I think the code would be easier to read if they were not shortened (consistently, because sometimes it is written out). It does not save that much, also, "regs" always reminds of "registers" :)
>
> -  145      * of living thread under limit.
>
> I think the term is "live threads". Or "active".
>
> - 192                     // need a trash in the OldGen to provoke Mixed GC
>
> "need to generate garbage in the old gen to provoke mixed GC"
>
> -   95     // Frame of STORAGE - a subset of STORAGE, objects which will be
>    96     // refered. First element has got the index: 'frameStart', the last
>    97     // one 'frameStart + frameSize - 1'
>
> Maybe this is better:
>
> "Window within STORAGE that selects the objects references are created to. First element..."
>
> - 266      * The thread for periodical shifting of the current STORAGE frame and
>   267      * cleaning BUFFER from references to the objects outside of the new current
>   268      * frame.
>
> Periodically shifts the current STORAGE window, removing references in BUFFER that refer to objects outside the window.
>
> I am not completely sure what the purpose of this actually is in practice: it does not seem to create references from dead objects (so that they need to be removed from the remembered sets), the worker threads recycling of buffers already does that (i.e. when the buffer is replaced).
>
> Thanks,
>    Thomas
>
>
>




More information about the hotspot-gc-dev mailing list