RFR: 8252921: NMT overwrite memory type for region assert when building dynamic archive [v5]
Ioi Lam
iklam at openjdk.java.net
Mon Sep 21 05:37:39 UTC 2020
On Mon, 21 Sep 2020 03:42:25 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix metaspace remapping on Windows
>
> src/hotspot/share/runtime/thread.cpp line 1341:
>
>> 1339: unregister_thread_stack_with_NMT();
>> 1340: set_stack_base(NULL);
>> 1341: set_stack_size(0);
>
> Sorry but I just don't see any need for clearing stack_base or stack_size, and then you don't need to mess with the
> assertion in stack_base().
I agree with David that the calls to `set_stack_base(NULL); set_stack_size(0);` do not seem to be related to this bug.
Also, previously only `set_stack_base(NULL);` was called -- on all Threads. Now:
- NonJavaThread: `set_stack_base(NULL); set_stack_size(0);`
- JavaThread: neither operation is done
I am wondering:
- why the behavior is changed
- is zeroing the stack_base/size necessary for NMT code only, or is it necessary for non-NMT operations as well?
Will any test cases fail if you remove line 1340/1341?
-------------
PR: https://git.openjdk.java.net/jdk/pull/185
More information about the hotspot-runtime-dev
mailing list