RFR: 8252921: NMT overwrite memory type for region assert when building dynamic archive [v5]
Calvin Cheung
ccheung at openjdk.java.net
Mon Sep 21 04:39:37 UTC 2020
On Sun, 20 Sep 2020 23:09:20 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> Thread stack is currently unregistered with NMT in Thread's destructor. Apparently, only Java thread invokes destructor
>> before thread exits. For NonJavaThread, e.g. ConcurrentGCThread, thread may exit while its "Thread" object continues
>> alive, therefore, its thread stack is still "alive" from NMT perspective. Once thread exits, the virtual memory for the
>> thread stack can be reserved again, that confused NMT. The solution is to move thread stack unregistration code to
>> post_run() method.
>
> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix metaspace remapping on Windows
I've tried this patch. It passed tier1 tests and 50 runs of the
dynamicArchive/methodHandles/MethodHandlesAsCollectorTest.java test on Windows with vm
options: -XX:MaxRAMPercentage=3 -XX:NativeMemoryTracking=detail
-------------
PR: https://git.openjdk.java.net/jdk/pull/185
More information about the hotspot-runtime-dev
mailing list