[11u] Backport JEP 346 : Promptly Return Unused Committed Memory from G1
Liang Mao
maoliang.ml at alibaba-inc.com
Wed Mar 11 15:22:08 UTC 2020
Hi All,
The JEP 346 in JDK12 is a very attractive feature which could save
significant memory and is very useful to the customers of Alibaba
cloud. Jdk11u is the latest LTS version and will exist as a mainstream
version for a long time. I'd like to backport the corresponding patches.
There're total 12 changesets:
3 changesets of features and fixes that JEP346 depends on
3 changesets of code refinements that JEP346 depends on
6 changesets of JEP346 feature implementation and bug fixes
8 changesets can be just applied and only 4 have very few conflicts
needed to be resolved(less than 20 lines). I have listed the changesets
below in a timeline order.
I have an initial test with these changesets based on jdk-11.0.7+4 on
test/hotspot/jtreg/gc/ and specjbb2015. Everything looks fine except
gc/survivorAlignment/TestPromotionToSurvivor.java failed both with
my build and reference build of jdk-11.0.7+4.
1) https://bugs.openjdk.java.net/browse/JDK-8208669
GC changes to allow enabling -Wreorder
No conflict apply.
2) https://bugs.openjdk.java.net/browse/JDK-8071913
Filter out entries to free/uncommitted regions during iteration
Conflicts:
src/hotspot/share/gc/g1/g1RemSet.cpp
Webrev:http://cr.openjdk.java.net/~ddong/liangmao/8071913/webrev/
3) https://bugs.openjdk.java.net/browse/JDK-6490394
G1: Allow heap shrinking / memory unmapping after reclaiming regions during Remark
No conflict apply
4) https://bugs.openjdk.java.net/browse/JDK-8213898
CDS dumping of springboot asserts in G1ArchiveAllocator::alloc_new_region
No conflict apply
5) https://bugs.openjdk.java.net/browse/JDK-8193312
Rename VM_CGC_Operation to VM_G1Concurrent
Conflicts: (vm_operations.hpp already renamed vmOperations.hpp)
src/hotspot/share/runtime/vm_operations.hpp
Webrev:http://cr.openjdk.java.net/~ddong/liangmao/8193312/webrev/
6) https://bugs.openjdk.java.net/browse/JDK-8214791
Consistently name gc files containing VM operations
Conflicts:(vm_operations.hpp already renamed vmOperations.hpp)
src/hotspot/share/gc/cms/cmsVMOperations.hpp
src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Webrev:http://cr.openjdk.java.net/~ddong/liangmao/8214791/webrev/
7) https://bugs.openjdk.java.net/browse/JDK-8212657
Implementation of JDK-8204089 Promptly Return Unused Committed Memory from G1
No conflict apply
8) https://bugs.openjdk.java.net/browse/JDK-8215120
32-bit build failures after JDK-8212657 (Promptly Return Unused Committed Memory from G1)
No conflict apply
9) https://bugs.openjdk.java.net/browse/JDK-8215149
TestOptionsWithRangesDynamic.java fails after JDK-8215120
No conflict apply
10) https://bugs.openjdk.java.net/browse/JDK-8215548
G1PeriodicGCSystemLoadThreshold needs to be a double
No conflict apply
11) https://bugs.openjdk.java.net/browse/JDK-8216490
Spammy periodic GC log message contains random time stamp with periodic gc disabled
No conflict apply
12) https://bugs.openjdk.java.net/browse/JDK-8218880
G1 crashes when issuing a periodic GC while the GCLocker is held
Conflicts:
src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp (copyright)
build failure:
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
} else if (GCLocker::should_discard(cause, gc_count_before)) {
// Return false to be consistent with VMOp failure due to
// another collection slipping in after our gc_count but before
// our request is processed. _gc_locker collections upgraded by
// GCLockerInvokesConcurrent are handled above and never discarded.
- return;
+ return false;Webrev:http://cr.openjdk.java.net/~ddong/liangmao/8218880/webrev/
PS:
7) JDK-8212657 might have a build error of uninitialized variable:
src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp
bool G1YoungRemSetSamplingThread::should_start_periodic_gc() {
...
uintx time_since_last_gc;
11) JDK-8216490 will fix this.
Thanks,
Liang
More information about the jdk-updates-dev
mailing list