RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v2]

Per Liden pliden at openjdk.java.net
Mon Dec 7 13:10:14 UTC 2020


On Mon, 7 Dec 2020 06:04:36 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Per Liden has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add comment
>
> Overall seems okay. Some comments on tests as I think the existing test logic is quite confused in places.
> 
> Thanks,
> David

> Not really. I consider pinAll should pin-all as the name implies. The question of when to pin should be handled by the caller of pinAll. If there were ever to be a second reason to pinAll then you would have to decide what semantics that has: does it maintain a count, or is it like thread suspension.

I would say that would not be in spirit of how the rest of this library is designed, with regards to nesting of calls. For example, `pin()/unpin()`, `suspend()/resume()`, `createNode()/deleteNode()`, etc. All these functions supports nesting, so they might just up/down a counter, instead of doing exactly what their name implies. The new `pinAll()/unpinAll()` follow the same model, which, to me, feels like the natural thing to do here.

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

PR: https://git.openjdk.java.net/jdk/pull/1595


More information about the serviceability-dev mailing list