RFR: 8253262: Allocate in DumpRegion is not thread safe

David Holmes dholmes at openjdk.java.net
Mon Sep 21 04:21:15 UTC 2020


On Thu, 17 Sep 2020 16:13:39 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> At CDS dump, the symbols are allocated from _dump_region (DumpRegion) which is global, and not thread safe when
>> executed in JavaThread. Add a lock DumpRegoin_lock to guard symbol allocation from it.
>> Tests: tier1-4
>
> Looks good.

It seems to me that the need for locking should be an internal implementation detail of
MetaspaceShared::symbol_space_alloc, rather than Symbol operator new.

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

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


More information about the hotspot-dev mailing list