On Mon, 25 Oct 2021 12:51:32 GMT, Coleen Phillimore <[email protected]> wrote:
> The Mutex destructor isn't called for the MDO lock. We found this leak with
> crashes for the patch to print all mutex locks on error, which is now
> withdrawn. It was easily reproduced with that patch. It is not easily
> reproduced otherwise.
> I tested this change with that patch though and it passes tier1-6,
src/hotspot/share/oops/instanceKlass.cpp line 2692:
> 2690:
> 2691: // Called also by InstanceKlass::deallocate_contents
> 2692: void InstanceKlass::release_C_heap_structures_internal() {
Why do we have two different cleanup functions here? It seems overly subtle
that `deallocate_contents` only calls `release_C_heap_structures_internal`,
rather than `release_C_heap_structures`. And now the only difference is whether
`constants()->release_C_heap_structures()` is called, it seems to me that
distinction should perhaps be more explicit in the caller.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6105