RFR: 8029329: tmtools tests fail with NPE (in the tool) when run with G1 and FlightRecorder
Stefan Johansson
stefan.johansson at oracle.com
Tue Dec 3 12:02:43 PST 2013
On 2013-12-03 19:46, Jon Masamitsu wrote:
>
> On 12/2/13 6:54 AM, Stefan Johansson wrote:
>> Hi again,
>>
>> After discussions with Bengt I realized that the limit I actually
>> want to use is the currently committed number of regions. Here is an
>> updated webrev:
>> http://cr.openjdk.java.net/~sjohanss/8029329/webrev.01/
>
> Why committed instead of allocated? I had thought either would
> be sufficient but that the committed regions that were not
> allocated would be empty (and uninteresting).
>
Both seems to work equally well, since the regions that are allocated
but not committed will be seen as empty. As I understand it committed
length is the number of regions we currently have committed memory for
and allocated is the length for which we have allocated HeapRegions.
Currently we never de-allocate these and therefor we can have an
allocated length of 128 but currently only have 64 committed. When
requesting an iterator for such a heap I would expect only to iterate
over the regions that are currently in use, not over every region that
has ever been used. That is why I change the code, do you think this
makes sense Jon?
Thanks,
Stefan
> Jon
>
>>
>> Stefan
>>
>> On 2013-11-29 14:26, Stefan Johansson wrote:
>>> Hi,
>>>
>>> Please review this fix for:
>>> https://bugs.openjdk.java.net/browse/JDK-8029329
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~sjohanss/8029329/webrev.00/
>>>
>>> Summary:
>>> The iterator used by the SA for walking through G1s heap regions
>>> used the total number of regions as the limit for hasNext. This
>>> caused a NullPointerException when reaching the first unallocated
>>> region. Updated the SA to initialize the iterator with the currently
>>> allocated number of regions as limit instead.
>>>
>>> Testing:
>>> * Tested builds through JPRT
>>> * Ran vm.tmtools.testlist throught Aurora and observed no failures
>>> on the test I expected to pass.
>>>
>>> Thanks,
>>> Stefan
>>
>
More information about the hotspot-dev
mailing list