RFR: 8265268: Unify ReservedSpace reservation code in initialize and try_reserve_heap [v2]
Ivan Walulya
iwalulya at openjdk.java.net
Thu Apr 22 14:34:23 UTC 2021
On Thu, 22 Apr 2021 14:19:20 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> src/hotspot/share/memory/virtualspace.cpp line 189:
>>
>>> 187: if (large_pages_requested()) {
>>> 188: log_debug(gc, heap, coops)("Reserve regular memory without large pages");
>>> 189: }
>>
>> I think we should move this entire block to the caller.
>
> I thought about this as well, but wanted to keep `reserve(...)` as "clean" as possible and this log-message is connected to reserving large pages which is handled in `reserve_memory_special(...)`.
>
> The strange thing is that this log is using the tag-set `gc, heap, coops` (pre-existing) which suggests that we could move it all the way out to `try_reserve_heap(...)`. The problem with doing that is that this log is used by the test: TestLargePageUseForAuxMemory for other mappings than the heap. It would most likely make sense to move this message to a different tag-set or possibly split it so that this log only is printed for the heap and we have a different one for other mappings. The sad part about that is that the log message and the "failure" becomes more separated.
ok, that seems reasonable. We can leave it as is.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3570
More information about the hotspot-dev
mailing list