On Mon, 18 Sep 2023 12:11:24 GMT, Axel Boldt-Christmas <abold...@openjdk.org> 
wrote:

>> ObjectMonitorIterator fails to return the most resent monitor added. It 
>> start with returning the `nextOM()` ObjectMonitor from the `_head` 
>> ObjectMonitor but fails to ever return the `_head` ObjectMonitor.
>> The current implementation can also not handle that the `_head` is nullptr 
>> (no monitors in the system) and returns a null ObjectMonitorIterator. Which 
>> is interpreted as `monitor list not supported, too old hotspot VM`.
>> 
>> Changed the iterator to keep return the current monitor (starts with 
>> `_head`) and decoupled `_head == nullptr` from the question if 
>> ObjectMonitorIterator is supported. 
>> 
>> Testing:
>>   * Passes all `serviceability/sa` tests
>>   * Currently running tier 1-3
>>   * Currently running GHA
>
> Axel Boldt-Christmas has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Copyright changes too

All the failing CDS tests pass now. Will rerun a full test suite to be sure. 
(There were two CDS test files that needed to be updated)

`objectMonitorIterator()` now returns an empty iterator even if `initialize` 
fails.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15782#issuecomment-1724971537

Reply via email to