On Tue, 10 Nov 2020 21:16:33 GMT, Robbin Ehn <r...@openjdk.org> wrote:
>> So if I narrow the scope around the ThreadBlockInVM, then it would be fine? >> >> { >> // Honor block request. >> ThreadBlockInVM tbivm(self); >> } >> >> I can make that change before I integrate... > > Yes that avoids it! Done. I also did the one in ObjectSynchronizer::request_deflate_idle_monitors(). >> What does this "you can do this entire loop while blocked instead" mean? >> >> Releasing during deflation kind of messes with the life-cycle I was trying >> to enforce since deletion is the nature end-of-life for these... But to think >> about that I need to know what you mean by "you can do this entire loop >> while blocked instead"... > > If you only need to free CHeap memory, you can do: > size_t deleted_count = 0; > ThreadBlockInVM tbivm(self); > for (ObjectMonitor* monitor: delete_list) { > delete monitor; > deleted_count++; > } > } Ahhh... but that only works if we release the oopStorage when we deflate. Okay. I grok it now, but don't want to do that in this changeset. I would want a complete stress test cycle for that kind of a change. ------------- PR: https://git.openjdk.java.net/jdk/pull/642