On Mon, 25 Sep 2023 03:40:53 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Axel Boldt-Christmas has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Update copyright year
>
> test/hotspot/jtreg/serviceability/sa/TestObjectMonitorIterate.java line 1:
> 
>> 1: /*
> 
> This test still barely actually tests the iterator code.

Agreed. Did not want to spend time learning the SA, but maybe I should. So I 
can write a proper test. 
It does however seem very hard to write a proper test. Also not sure how to 
make it non-flaky, maybe start a lingering App, let it reach steady state, get 
the monitor list from some other API (maybe there is a jcmd, or we have to use 
the whitebox API from the actual process and print it somewhere, and hope the 
state of which monitors exists does not change), then attach the SA and run and 
compare the lists.

It seems hard to me to ensure that the SA agent prints all monitors in the 
`_in_use_list` with a test.

Or you would have to maintain a list of monitors for each locking mode and the 
lingering app.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15782#discussion_r1335687908

Reply via email to