RFR: JDK-8293114: JVM should trim the native heap [v4]
Robbin Ehn
rehn at openjdk.org
Thu Jul 6 19:12:02 UTC 2023
On Thu, 6 Jul 2023 16:14:20 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>>
>> last cleanups and shade feedback
>
> src/hotspot/share/runtime/trimNative.cpp line 149:
>
>> 147: return true;
>> 148: } else {
>> 149: log_info(trim)("Trim native heap (no details)");
>
> Consistency: `Trim native heap: complete, no details`.
I would still like to know the trim_time.
> test/hotspot/jtreg/runtime/os/TestTrimNative.java line 247:
>
>> 245: System.out.println("Will spike now...");
>> 246: for (int i = 0; i < numAllocations; i++) {
>> 247: ptrs[i] = Unsafe.getUnsafe().allocateMemory(szAllocations);
>
> Pull `Unsafe.getUnsafe()` into a local or a field?
Maybe use WB instead of unsafe?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14781#discussion_r1254816943
PR Review Comment: https://git.openjdk.org/jdk/pull/14781#discussion_r1254806836
More information about the serviceability-dev
mailing list