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

Per Liden pliden at openjdk.java.net
Mon Dec 7 11:22:31 UTC 2020


On Mon, 7 Dec 2020 07:41:46 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> That was something I pointed out in the pre-review, and it has been addressed in `commonRef_pinAll/unpinAll`:
>> 
>> `568         if (gdata->pinAllCount == 1) {`
>> `618         if (gdata->pinAllCount == 0) {`
>
>> Okay. I would not have handled it at that level, but would have had
> pinAll/unpinAll operate unconditionally, but the calls to those methods
> being conditional based on the suspendAllCount.
>>
>>David
> 
> Well, that's assuming `pinAll()` will only ever be used by by `suspendAll()`. One could imaging a future use, such as if `VirtualMachine.disableCollection()` were ever to be added.

I was also thinking `pinAll()/unpinAll()` should stand on their own, and not implicitly depend/rely on `suspendAllCount`. As @plummercj says, one could imagine we want to use these functions in other contexts in the future.

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

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


More information about the serviceability-dev mailing list