changeset 2986:2ba4051a8442

Bump shenandoah to aarch64-shenandoah-jdk8u282-b08. 2021-02-03 Andrew John Hughes <gnu_andrew@member.fsf.org> Bump shenandoah to aarch64-shenandoah-jdk8u282-b08. * patches/hotspot/shenandoah/8062808-pr3548.patch, * patches/hotspot/shenandoah/8197981-pr3548.patch, * patches/hotspot/shenandoah/pr1869.patch, * patches/hotspot/shenandoah/pr3519-return_value-02.patch, * patches/hotspot/shenandoah/pr3601.patch: Remove patches included upstream. * Makefile.am: (ICEDTEA_PATCHES): Make PR1869, 8062808/PR3548, 8197981/PR3548 and PR3601 patches AArch32 only as they are now upstream in the new Shenandoah bundle. Remove Shenandoah-only PR3519 altogether. * NEWS: Updated. * hotspot.map.in: Bump shenandoah to aarch64-shenandoah-jdk8u282-b08. * patches/hotspot/aarch32/8062808-pr3548.patch: Replace symlink to Shenandoah version with a regenerated version that does not assume PR1748 is applied first. * patches/hotspot/aarch32/8143245-pr3548.patch, * patches/hotspot/aarch32/8197981-pr3548.patch: Replace symlinks to Shenandoah versions with copies, as the Shenandoah versions have been removed. * patches/hotspot/aarch32/pr1748.patch: Replace symlink to Shenandoah version with a regenerated version that applies after JDK-8062808, but without JDK-8036122 being applied as in the Shenandoah version. * patches/hotspot/aarch32/pr1869.patch, * patches/hotspot/aarch32/pr3601.patch, * patches/hotspot/aarch32/werror.patch: Replace symlinks to Shenandoah versions with copies, as the Shenandoah versions are either removed or modified to apply against 8u282-b08. * patches/hotspot/shenandoah/8143245-pr3548.patch: Regenerated against new context in cppInterpreter_zero.cpp due to JDK-8254166. * patches/hotspot/shenandoah/pr1748.patch: Regenerated against new context in linux/makefiles/gcc.make due to JDK-8062808 being upstreamed. * patches/hotspot/shenandoah/werror.patch: Regenerated against new context in solaris/makefiles/gcc.make due to JDK-8036122.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Thu, 04 Feb 2021 06:19:03 +0000
parents 075015927ca6
children 49036278edd4
files ChangeLog Makefile.am NEWS hotspot.map.in patches/hotspot/aarch32/8062808-pr3548.patch patches/hotspot/aarch32/8143245-pr3548.patch patches/hotspot/aarch32/8197981-pr3548.patch patches/hotspot/aarch32/pr1748.patch patches/hotspot/aarch32/pr1869.patch patches/hotspot/aarch32/pr3601.patch patches/hotspot/aarch32/werror.patch patches/hotspot/shenandoah/8062808-pr3548.patch patches/hotspot/shenandoah/8143245-pr3548.patch patches/hotspot/shenandoah/8197981-pr3548.patch patches/hotspot/shenandoah/pr1748.patch patches/hotspot/shenandoah/pr1869.patch patches/hotspot/shenandoah/pr3519-return_value-02.patch patches/hotspot/shenandoah/pr3601.patch patches/hotspot/shenandoah/werror.patch
diffstat 19 files changed, 694 insertions(+), 369 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jan 19 17:36:16 2021 +0000
+++ b/ChangeLog	Thu Feb 04 06:19:03 2021 +0000
@@ -1,3 +1,49 @@
+2021-02-03  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	Bump shenandoah to aarch64-shenandoah-jdk8u282-b08.
+	* patches/hotspot/shenandoah/8062808-pr3548.patch,
+	* patches/hotspot/shenandoah/8197981-pr3548.patch,
+	* patches/hotspot/shenandoah/pr1869.patch,
+	* patches/hotspot/shenandoah/pr3519-return_value-02.patch,
+	* patches/hotspot/shenandoah/pr3601.patch:
+	Remove patches included upstream.
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Make PR1869, 8062808/PR3548,
+	8197981/PR3548 and PR3601 patches AArch32 only
+	as they are now upstream in the new Shenandoah
+	bundle. Remove Shenandoah-only PR3519 altogether.
+	* NEWS: Updated.
+	* hotspot.map.in: Bump shenandoah to
+	aarch64-shenandoah-jdk8u282-b08.
+	* patches/hotspot/aarch32/8062808-pr3548.patch:
+	Replace symlink to Shenandoah version with a
+	regenerated version that does not assume PR1748
+	is applied first.
+	* patches/hotspot/aarch32/8143245-pr3548.patch,
+	* patches/hotspot/aarch32/8197981-pr3548.patch:
+	Replace symlinks to Shenandoah versions with copies,
+	as the Shenandoah versions have been removed.
+	* patches/hotspot/aarch32/pr1748.patch:
+	Replace symlink to Shenandoah version with a
+	regenerated version that applies after JDK-8062808,
+	but without JDK-8036122 being applied as in
+	the Shenandoah version.
+	* patches/hotspot/aarch32/pr1869.patch,
+	* patches/hotspot/aarch32/pr3601.patch,
+	* patches/hotspot/aarch32/werror.patch:
+	Replace symlinks to Shenandoah versions with copies,
+	as the Shenandoah versions are either removed or
+	modified to apply against 8u282-b08.
+	* patches/hotspot/shenandoah/8143245-pr3548.patch:
+	Regenerated against new context in cppInterpreter_zero.cpp
+	due to JDK-8254166.
+	* patches/hotspot/shenandoah/pr1748.patch:
+	Regenerated against new context in linux/makefiles/gcc.make
+	due to JDK-8062808 being upstreamed.
+	* patches/hotspot/shenandoah/werror.patch:
+	Regenerated against new context in solaris/makefiles/gcc.make
+	due to JDK-8036122.
+
 2021-01-19  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	Start 3.18.0 release cycle.
--- a/Makefile.am	Tue Jan 19 17:36:16 2021 +0000
+++ b/Makefile.am	Thu Feb 04 06:19:03 2021 +0000
@@ -350,7 +350,11 @@
 if WITH_AARCH32_HSBUILD
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/pr3548-aarch32.patch \
-	patches/hotspot/$(HSBUILD)/8078628-pr3208.patch
+	patches/hotspot/$(HSBUILD)/8078628-pr3208.patch \
+	patches/hotspot/$(HSBUILD)/pr1869.patch \
+	patches/hotspot/$(HSBUILD)/8062808-pr3548.patch \
+	patches/hotspot/$(HSBUILD)/8197981-pr3548.patch \
+	patches/hotspot/$(HSBUILD)/pr3601.patch
 endif
 
 ICEDTEA_PATCHES += \
@@ -361,18 +365,14 @@
 	patches/hotspot/$(HSBUILD)/no_devirt.patch \
 	patches/hotspot/$(HSBUILD)/pr1368.patch \
 	patches/hotspot/$(HSBUILD)/pr1748.patch \
-	patches/hotspot/$(HSBUILD)/pr1869.patch \
 	patches/hotspot/$(HSBUILD)/pr1942.patch \
 	patches/hotspot/$(HSBUILD)/pr1975.patch \
 	patches/hotspot/$(HSBUILD)/pr2777.patch \
 	patches/hotspot/$(HSBUILD)/werror.patch \
 	patches/hotspot/$(HSBUILD)/8043780-pr3368.patch \
-	patches/hotspot/$(HSBUILD)/8062808-pr3548.patch \
 	patches/hotspot/$(HSBUILD)/8143245-pr3548.patch \
 	patches/hotspot/$(HSBUILD)/pr3593.patch \
-	patches/hotspot/$(HSBUILD)/8197981-pr3548.patch \
 	patches/hotspot/$(HSBUILD)/pr3597.patch \
-	patches/hotspot/$(HSBUILD)/pr3601.patch \
 	patches/hotspot/$(HSBUILD)/8207057-pr3613.patch \
 	patches/hotspot/$(HSBUILD)/pr3607.patch \
 	patches/hotspot/$(HSBUILD)/8078504-pr3094.patch \
@@ -391,7 +391,6 @@
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/8158260-pr2991-rh1341258-aarch64.patch \
 	patches/hotspot/$(HSBUILD)/8222286-pr3727-s390-shenandoah.patch \
-	patches/hotspot/$(HSBUILD)/pr3519-return_value-02.patch \
 	patches/hotspot/$(HSBUILD)/8222286-pr3815-s390-shenandoah.patch
 endif
 endif
--- a/NEWS	Tue Jan 19 17:36:16 2021 +0000
+++ b/NEWS	Thu Feb 04 06:19:03 2021 +0000
@@ -13,6 +13,50 @@
 
 New in release 3.18.0 (2021-01-19):
 
+* Shenandoah
+  - JDK-8030350: Enable additional compiler warnings for GCC
+  - JDK-8036122: Fix warning 'format not a string literal'
+  - JDK-8043899: compiler/5091921/Test7005594.java fails if specified -Xmx is less than 1600m
+  - JDK-8148854: Class names "SomeClass" and "LSomeClass;" treated by JVM as an equivalent
+  - JDK-8156803: Turn StressLCM/StressGCM flags to diagnostic
+  - JDK-8160761: [TESTBUG] Several compiler tests fail with product bits
+  - JDK-8165808: Add release barriers when allocating objects with concurrent collection
+  - JDK-8166583: Add oopDesc::klass_or_null_acquire()
+  - JDK-8166663: Simplify oops_on_card_seq_iterate_careful
+  - JDK-8166862: CMS needs klass_or_null_acquire
+  - JDK-8179083: Uninitialized notifier in Java Monitor Wait tracing event
+  - JDK-8185003: JMX: Add a version of ThreadMXBean.dumpAllThreads with a maxDepth argument
+  - JDK-8212070: Introduce diagnostic flag to abort VM on failed JIT compilation
+  - JDK-8215727: Restore JFR thread sampler loop to old / previous behavior
+  - JDK-8217362: Emergency dump does not work when disk=false is set
+  - JDK-8217766: Container Support doesn't work for some Join Controllers combinations
+  - JDK-8219562: Line of code in osContainer_linux.cpp L102 appears unreachable
+  - JDK-8221342: [TESTBUG] Generate Dockerfile for docker testing
+  - JDK-8221710: [TESTBUG] more configurable parameters for docker testing
+  - JDK-8227006: [linux] Runtime.availableProcessors execution time increased by factor of 100
+  - JDK-8229868: Update Apache Santuario TPRM version
+  - JDK-8231209: [REDO] ThreadMXBean::getThreadAllocatedBytes() can be quicker for self thread
+  - JDK-8233548: Update CUP to v0.11b
+  - JDK-8234270: [REDO] JDK-8204128 NMT might report incorrect numbers for Compiler area
+  - JDK-8244225: stringop-overflow warning on strncpy call from compile_the_world_in
+  - JDK-8245400: Upgrade to LittleCMS 2.11
+  - JDK-8248214: Add paddings for TaskQueueSuper to reduce false-sharing cache contention
+  - JDK-8250636: iso8601_time returns incorrect offset part on MacOS
+  - JDK-8250928: JFR: Improve hash algorithm for stack traces
+  - JDK-8251365: Build failure on AIX after 8250636
+  - JDK-8252754: Hash code calculation of JfrStackTrace is inconsistent
+  - JDK-8252904: VM crashes when JFR is used and JFR event class is transformed
+  - JDK-8253036: Support building the Zero assembler port on AArch64
+  - JDK-8253284: Zero OrderAccess barrier mappings are incorrect
+  - JDK-8253837: JFR 8u fix symbol and cstring hashtable equals implementaion
+  - JDK-8254144: Non-x86 Zero builds fail with return-type warning in os_linux_zero.cpp
+  - JDK-8254166: Zero: return-type warning in zeroInterpreter_zero.cpp
+  - JDK-8255269: Unsigned overflow in g1Policy.cpp
+  - JDK-8255717: Fix JFR crash in WriteObjectSampleStacktrace due to object not initialized
+  - JDK-8256618: Zero: Linux x86_32 build still fails
+  - JDK-8256671: Incorrect assignment operator used in guarantee() in genCollectedHeap
+  - Shenandoah: Fix racy update of code roots
+
 New in release 3.17.1 (2020-11-26):
 
 * Import of OpenJDK 8 u275 build 01
--- a/hotspot.map.in	Tue Jan 19 17:36:16 2021 +0000
+++ b/hotspot.map.in	Thu Feb 04 06:19:03 2021 +0000
@@ -1,4 +1,4 @@
 # version type(drop/hg) url changeset sha256sum
 default drop https://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ e7fd2b284bd0 9205bc1f1dd558c726bcd3770ef4a4960c505e96a48f07d9fd1a7bf40627af22
-shenandoah drop https://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ bef9421300e3 e2dfc5105336d1b5dcd08641358d66a40d87be637d2f2e7491a71b8fb5161668
+shenandoah drop https://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 6c6414cb341e 5a8fc20326573b96eaa36a80f40d1fcd35cd2bd93e81d7621ff5eb95253a4ecf
 aarch32 drop https://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ c6d8704fd9a4 0b2eb1a9e2b7c5d7011bbc42ba4193d57c8101148c490dc6d9dd67d0c0b8b5d5
--- a/patches/hotspot/aarch32/8062808-pr3548.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/aarch32/8062808-pr3548.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -1,1 +1,191 @@
-../shenandoah/8062808-pr3548.patch
\ No newline at end of file
+# HG changeset patch
+# User stefank
+# Date 1525453613 -3600
+#      Fri May 04 18:06:53 2018 +0100
+# Node ID 07a1135a327362f157955d470fad5df07cc35164
+# Parent  de79964656fc652f2085dac4fe99bcc128b5a3b1
+8062808, PR3548: Turn on the -Wreturn-type warning
+Reviewed-by: mgerdin, tschatzl, coleenp, jrose, kbarrett
+
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2021-02-04 03:25:16.365416534 +0000
+@@ -212,7 +212,7 @@
+   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
+ endif
+ 
+-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
++WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type
+ 
+ ifeq ($(USE_CLANG),)
+   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
+diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad openjdk/hotspot/src/cpu/x86/vm/x86_32.ad
+--- openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/x86_32.ad	2021-02-04 03:21:29.140836828 +0000
+@@ -1250,6 +1250,7 @@
+ 
+ 
+   Unimplemented();
++  return 0; // Mute compiler
+ }
+ 
+ #ifndef PRODUCT
+diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2021-02-04 03:19:57.758799359 +0000
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2021-02-04 03:21:29.140836828 +0000
+@@ -541,6 +541,7 @@
+   err.report_and_die();
+ 
+   ShouldNotReachHere();
++  return true; // Mute compiler
+ }
+ 
+ void os::Linux::init_thread_fpu_state(void) {
+diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp
+--- openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp	2021-02-04 03:21:29.141836839 +0000
+@@ -506,7 +506,7 @@
+   ss.write((const char*)name->bytes(), name->utf8_length());
+   ss.write((const char*)signature->bytes(), signature->utf8_length());
+   ss.print(" is abstract");
+-  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
++  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
+ }
+ 
+ Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
+@@ -521,7 +521,7 @@
+     ss.print(".");
+     ss.write((const char*)name->bytes(), name->utf8_length());
+   }
+-  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
++  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
+ }
+ 
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp
+--- openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp	2021-02-04 03:21:29.141836839 +0000
+@@ -249,7 +249,7 @@
+   MutexLocker ml(SymbolTable_lock, THREAD);
+ 
+   // Otherwise, add to symbol to table
+-  return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
++  return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD);
+ }
+ 
+ Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
+@@ -288,7 +288,7 @@
+   // Grab SymbolTable_lock first.
+   MutexLocker ml(SymbolTable_lock, THREAD);
+ 
+-  return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
++  return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD);
+ }
+ 
+ Symbol* SymbolTable::lookup_only(const char* name, int len,
+diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
+--- openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp	2021-02-04 03:21:29.142836851 +0000
+@@ -236,15 +236,15 @@
+                  class_name->as_C_string(),
+                  class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
+   if (FieldType::is_array(class_name)) {
+-    return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
++    return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
+   } else if (FieldType::is_obj(class_name)) {
+     ResourceMark rm(THREAD);
+     // Ignore wrapping L and ;.
+     TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
+                                    class_name->utf8_length() - 2, CHECK_NULL);
+-    return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL);
++    return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
+   } else {
+-    return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
++    return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
+   }
+ }
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp openjdk/hotspot/src/share/vm/memory/heapInspection.hpp
+--- openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/heapInspection.hpp	2021-02-04 03:21:29.142836851 +0000
+@@ -367,7 +367,7 @@
+       _csv_format(csv_format), _print_help(print_help),
+       _print_class_stats(print_class_stats), _columns(columns) {}
+   void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
+-  size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
++  size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0);
+   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
+  private:
+   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp
+--- openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp	2021-02-04 03:21:29.143836862 +0000
+@@ -93,7 +93,7 @@
+   static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
+   static int preload_and_dump(const char * class_list_path,
+                               GrowableArray<Klass*>* class_promote_order,
+-                              TRAPS) NOT_CDS_RETURN;
++                              TRAPS) NOT_CDS_RETURN_(0);
+ 
+   static ReservedSpace* shared_rs() {
+     CDS_ONLY(return _shared_rs);
+diff -Nru openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp openjdk/hotspot/src/share/vm/oops/constantPool.hpp
+--- openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/oops/constantPool.hpp	2021-02-04 03:21:29.143836862 +0000
+@@ -353,7 +353,7 @@
+ 
+   Klass* klass_at(int which, TRAPS) {
+     constantPoolHandle h_this(THREAD, this);
+-    return klass_at_impl(h_this, which, CHECK_NULL);
++    return klass_at_impl(h_this, which, THREAD);
+   }
+ 
+   Symbol* klass_name_at(int which) const;  // Returns the name, w/o resolving.
+diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp openjdk/hotspot/src/share/vm/prims/jvm.cpp
+--- openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/prims/jvm.cpp	2021-02-04 03:21:29.144836873 +0000
+@@ -4368,7 +4368,7 @@
+     JVM_DTraceProvider* providers))
+   JVMWrapper("JVM_DTraceActivate");
+   return DTraceJSDT::activate(
+-    version, module_name, providers_count, providers, CHECK_0);
++    version, module_name, providers_count, providers, THREAD);
+ JVM_END
+ 
+ JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method))
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp openjdk/hotspot/src/share/vm/runtime/reflection.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/reflection.cpp	2021-02-04 03:21:29.144836873 +0000
+@@ -1093,7 +1093,7 @@
+   } else {
+     if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT)
+       narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
+-    return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
++    return box((jvalue*) result.get_value_addr(), rtype, THREAD);
+   }
+ }
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp	2021-02-04 03:21:29.145836885 +0000
+@@ -1045,7 +1045,7 @@
+   // last java frame on stack (which includes native call frames)
+   vframeStream vfst(thread, true);  // Do not skip and javaCalls
+ 
+-  return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
++  return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
+ }
+ 
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp openjdk/hotspot/src/share/vm/services/memTracker.hpp
+--- openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/services/memTracker.hpp	2021-02-04 03:21:29.145836885 +0000
+@@ -64,7 +64,7 @@
+     const NativeCallStack& stack, MEMFLAGS flag = mtNone) { }
+   static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { }
+   static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
+-  static inline Tracker get_virtual_memory_release_tracker() { }
++  static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
+   static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { }
+   static inline void record_thread_stack(void* addr, size_t size) { }
+   static inline void release_thread_stack(void* addr, size_t size) { }
--- a/patches/hotspot/aarch32/8143245-pr3548.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/aarch32/8143245-pr3548.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -1,1 +1,146 @@
-../shenandoah/8143245-pr3548.patch
\ No newline at end of file
+# HG changeset patch
+# User sgehwolf
+# Date 1525714161 -3600
+#      Mon May 07 18:29:21 2018 +0100
+# Node ID afb31413c73cbc06420fdb447aa90a7a38258904
+# Parent  bcbc64dfb629c5f188bbf59b8f986ad95963ed60
+8143245, PR3548: Zero build requires disabled warnings
+Reviewed-by: dholmes, coleenp
+
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
+--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make	2019-01-03 15:14:40.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/zeroshark.make	2020-07-21 03:22:17.875932021 +0100
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ # Copyright 2007, 2008 Red Hat, Inc.
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ #
+@@ -29,11 +29,6 @@
+ ifeq ($(JVM_VARIANT_ZEROSHARK), true)
+   WARNING_FLAGS += -Wno-undef
+ endif
+-# Suppress some warning flags that are normally turned on for hotspot,
+-# because some of the zero code has not been updated accordingly.
+-WARNING_FLAGS += -Wno-return-type \
+-  -Wno-format-nonliteral -Wno-format-security \
+-  -Wno-maybe-uninitialized
+  
+ 
+ # If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to
+diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	2019-01-03 15:14:40.000000000 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	2020-07-21 03:22:17.875932021 +0100
+@@ -100,7 +100,7 @@
+     case T_DOUBLE:
+     case T_VOID:
+       return result;
+-    default  : ShouldNotReachHere();
++    default  : ShouldNotReachHere(); return NULL_WORD;
+   }
+ }
+ 
+diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
+--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	2019-01-03 15:14:40.000000000 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	2020-07-21 03:22:17.876932032 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+  * Copyright 2007, 2008, 2010 Red Hat, Inc.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+@@ -62,7 +62,7 @@
+ }
+ 
+ void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) {
+-  ffi_type *ftype;
++  ffi_type *ftype = NULL;
+   switch (type) {
+   case T_VOID:
+     ftype = &ffi_type_void;
+diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	2019-01-03 15:14:40.000000000 +0000
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	2020-07-21 03:22:17.876932032 +0100
+@@ -1,6 +1,6 @@
+ /*
+  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+- * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
++ * Copyright 2016 Red Hat, Inc.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -61,6 +61,7 @@
+ 
+ frame os::get_sender_for_C_frame(frame* fr) {
+   ShouldNotCallThis();
++  return frame(NULL, NULL); // silence compile warning.
+ }
+ 
+ frame os::current_frame() {
+@@ -98,16 +99,19 @@
+ 
+ address os::Linux::ucontext_get_pc(ucontext_t* uc) {
+   ShouldNotCallThis();
++  return NULL; // silence compile warnings
+ }
+ 
+ ExtendedPC os::fetch_frame_from_context(void* ucVoid,
+                                         intptr_t** ret_sp,
+                                         intptr_t** ret_fp) {
+   ShouldNotCallThis();
++  return NULL; // silence compile warnings
+ }
+ 
+ frame os::fetch_frame_from_context(void* ucVoid) {
+   ShouldNotCallThis();
++  return frame(NULL, NULL); // silence compile warnings
+ }
+ 
+ extern "C" JNIEXPORT int
+@@ -247,11 +251,16 @@
+   }
+ #endif // !PRODUCT
+ 
+-  const char *fmt = "caught unhandled signal %d";
+   char buf[64];
+ 
+-  sprintf(buf, fmt, sig);
++  sprintf(buf, "caught unhandled signal %d", sig);
++
++// Silence -Wformat-security warning for fatal()
++PRAGMA_DIAG_PUSH
++PRAGMA_FORMAT_NONLITERAL_IGNORED
+   fatal(buf);
++PRAGMA_DIAG_POP
++  return true; // silence compiler warnings
+ }
+ 
+ void os::Linux::init_thread_fpu_state(void) {
+@@ -260,6 +269,7 @@
+ 
+ int os::Linux::get_fpu_control_word() {
+   ShouldNotCallThis();
++  return -1; // silence compile warnings
+ }
+ 
+ void os::Linux::set_fpu_control_word(int fpu) {
+diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	2019-01-03 15:14:40.000000000 +0000
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	2020-07-21 03:22:43.949200090 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+@@ -110,6 +110,7 @@
+                                            void* ucontext,
+                                            bool isInJava) {
+     ShouldNotCallThis();
++    return false; // silence compile warning
+   }
+ 
+   bool pd_get_top_frame_for_profiling(frame* fr_addr,
--- a/patches/hotspot/aarch32/8197981-pr3548.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/aarch32/8197981-pr3548.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -1,1 +1,32 @@
-../shenandoah/8197981-pr3548.patch
\ No newline at end of file
+# HG changeset patch
+# User andrew
+# Date 1518667645 0
+#      Thu Feb 15 04:07:25 2018 +0000
+# Node ID 1d35411eb7bdf16191e220ffe3b1dc4d5d0c6041
+# Parent  999983606f5c61b093c6f6316a7b26c4cd4ca79e
+8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
+Summary: Fix issue discovered by -Wreturn-type on systems without LP64.
+Reviewed-by: aph
+
+diff --git openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
+--- openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
++++ openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
+@@ -457,6 +457,7 @@
+     long long unsigned int oldval,
+     long long unsigned int newval) {
+     ShouldNotCallThis();
++    return 0;
+   }
+ };
+ #endif // !_LP64
+diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+@@ -498,6 +498,7 @@
+     long long unsigned int oldval,
+     long long unsigned int newval) {
+     ShouldNotCallThis();
++    return 0;
+   }
+ };
+ #endif // !_LP64
--- a/patches/hotspot/aarch32/pr1748.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/aarch32/pr1748.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -1,1 +1,65 @@
-../shenandoah/pr1748.patch
\ No newline at end of file
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2021-02-04 03:29:37.041389872 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2021-02-04 03:32:04.985078068 +0000
+@@ -209,7 +209,7 @@
+   WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
+   WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
+   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
+-  WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
++  WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body -Qunused-arguments -Wno-uninitialized
+ endif
+ 
+ WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type
+diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp openjdk/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
+--- openjdk.orig/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	2021-02-04 03:31:18.911552322 +0000
+@@ -107,10 +107,6 @@
+   return Address(rsp,  Interpreter::expr_offset_in_bytes(2));
+ }
+ 
+-static inline Address at_tos_p3() {
+-  return Address(rsp,  Interpreter::expr_offset_in_bytes(3));
+-}
+-
+ // Condition conversion
+ static Assembler::Condition j_not(TemplateTable::Condition cc) {
+   switch (cc) {
+diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jvmtiTagMap.cpp openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
+--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	2021-02-04 03:31:18.911552322 +0000
+@@ -2806,6 +2806,7 @@
+ }
+ 
+ // verify that a static oop field is in range
++#ifdef ASSERT
+ static inline bool verify_static_oop(InstanceKlass* ik,
+                                      oop mirror, int offset) {
+   address obj_p = (address)mirror + offset;
+@@ -2819,6 +2820,7 @@
+     return false;
+   }
+ }
++#endif
+ 
+ // a class references its super class, interfaces, class loader, ...
+ // and finally its static fields
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/mutex.cpp openjdk/hotspot/src/share/vm/runtime/mutex.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/mutex.cpp	2020-11-08 08:27:57.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/mutex.cpp	2021-02-04 03:31:18.912552333 +0000
+@@ -283,16 +283,6 @@
+   return x & 0x7FFFFFFF ;
+ }
+ 
+-static inline jint MarsagliaXOR (jint * const a) {
+-  jint x = *a ;
+-  if (x == 0) x = UNS(a)|1 ;
+-  x ^= x << 6;
+-  x ^= ((unsigned)x) >> 21;
+-  x ^= x << 7 ;
+-  *a = x ;
+-  return x & 0x7FFFFFFF ;
+-}
+-
+ static int Stall (int its) {
+   static volatile jint rv = 1 ;
+   volatile int OnFrame = 0 ;
--- a/patches/hotspot/aarch32/pr1869.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/aarch32/pr1869.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -1,1 +1,33 @@
-../shenandoah/pr1869.patch
\ No newline at end of file
+# HG changeset patch
+# User andrew
+# Date 1405461315 -3600
+#      Tue Jul 15 22:55:15 2014 +0100
+# Node ID 967ae4d849eb20b4b63c399bc3f376dfc0f9d2cc
+# Parent  84854c983fd81cf1a1598f8c069a2db010abc05c
+PR1869: Avoid x86 workaround when running Zero rather than a JIT
+Contributed-by: Matthias Klose <doko@ubuntu.com>
+
+diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-19 17:15:35.194017652 +0100
+@@ -5139,7 +5139,7 @@
+ 
+   Linux::capture_initial_stack(JavaThread::stack_size_at_create());
+ 
+-#if defined(IA32)
++#if defined(IA32) && !defined(ZERO)
+   workaround_expand_exec_shield_cs_limit();
+ #endif
+ 
+diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-19 17:15:58.329656663 +0100
+@@ -890,7 +890,7 @@
+  * updates (JDK-8023956).
+  */
+ void os::workaround_expand_exec_shield_cs_limit() {
+-#if defined(IA32)
++#if defined(IA32) && !defined(ZERO)
+   size_t page_size = os::vm_page_size();
+ 
+   /*
--- a/patches/hotspot/aarch32/pr3601.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/aarch32/pr3601.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -1,1 +1,38 @@
-../shenandoah/pr3601.patch
\ No newline at end of file
+# HG changeset patch
+# User andrew
+# Date 1529475043 -3600
+#      Wed Jun 20 07:10:43 2018 +0100
+# Node ID f6341f4635dacb56678264d29a88cd052b74036b
+# Parent  30520d5018b509b0ae68f5fcc9a5c540e3e5b2de
+PR3601: Fix additional -Wreturn-type issues introduced by 8061651
+
+diff --git openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp openjdk/hotspot/src/share/vm/prims/jvm.cpp
+--- openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp
++++ openjdk/hotspot/src/share/vm/prims/jvm.cpp
+@@ -835,7 +835,7 @@
+ JVM_ENTRY(jboolean, JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname))
+   JVMWrapper("JVM_KnownToNotExist");
+ #if INCLUDE_CDS
+-  return ClassLoaderExt::known_to_not_exist(env, loader, classname, CHECK_(false));
++  return ClassLoaderExt::known_to_not_exist(env, loader, classname, THREAD);
+ #else
+   return false;
+ #endif
+@@ -845,7 +845,7 @@
+ JVM_ENTRY(jobjectArray, JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader))
+   JVMWrapper("JVM_GetResourceLookupCacheURLs");
+ #if INCLUDE_CDS
+-  return ClassLoaderExt::get_lookup_cache_urls(env, loader, CHECK_NULL);
++  return ClassLoaderExt::get_lookup_cache_urls(env, loader, THREAD);
+ #else
+   return NULL;
+ #endif
+@@ -855,7 +855,7 @@
+ JVM_ENTRY(jintArray, JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name))
+   JVMWrapper("JVM_GetResourceLookupCache");
+ #if INCLUDE_CDS
+-  return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, CHECK_NULL);
++  return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, THREAD);
+ #else
+   return NULL;
+ #endif
--- a/patches/hotspot/aarch32/werror.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/aarch32/werror.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -1,1 +1,51 @@
-../shenandoah/werror.patch
\ No newline at end of file
+# HG changeset patch
+# User andrew
+# Date 1408489026 -3600
+#      Tue Aug 19 23:57:06 2014 +0100
+# Node ID 22d29c372fc4271930e4169a66818f67e27cf6e8
+# Parent  c75d6ce2e98b901b31ac84dbbb59667e03beb9d5
+Merge jdk8u20-b23
+
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2019-01-25 15:02:27.660107711 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2019-01-25 15:05:30.485236897 +0000
+@@ -198,7 +198,9 @@
+ endif
+ 
+ # Compiler warnings are treated as errors
++ifneq ($(COMPILER_WARNINGS_FATAL),false)
+ WARNINGS_ARE_ERRORS = -Werror
++endif
+ 
+ ifeq ($(USE_CLANG), true)
+   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
+diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/adlc.make openjdk/hotspot/make/solaris/makefiles/adlc.make
+--- openjdk.orig/hotspot/make/solaris/makefiles/adlc.make	2019-01-16 07:13:59.000000000 +0000
++++ openjdk/hotspot/make/solaris/makefiles/adlc.make	2019-01-25 15:06:44.376075821 +0000
+@@ -73,8 +73,10 @@
+ 
+ # CFLAGS_WARN holds compiler options to suppress/enable warnings.
+ # Compiler warnings are treated as errors
+-ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+-  CFLAGS_WARN = +w -errwarn
++ifneq ($(COMPILER_WARNINGS_FATAL),false)
++  ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
++    CFLAGS_WARN = +w -errwarn
++  endif
+ endif
+ # When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly 
+ # instantiated template functions trigger this warning when +w is active.
+diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make
+--- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make	2019-01-16 07:13:59.000000000 +0000
++++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2019-01-25 15:05:30.485236897 +0000
+@@ -116,7 +116,9 @@
+ 
+ 
+ # Compiler warnings are treated as errors 
+-WARNINGS_ARE_ERRORS = -Werror 
++ifneq ($(COMPILER_WARNINGS_FATAL),false)
++WARNINGS_ARE_ERRORS = -Werror
++endif
+ # Enable these warnings. See 'info gcc' about details on these options
+ WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
+ CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
--- a/patches/hotspot/shenandoah/8062808-pr3548.patch	Tue Jan 19 17:36:16 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-# HG changeset patch
-# User stefank
-# Date 1525453613 -3600
-#      Fri May 04 18:06:53 2018 +0100
-# Node ID 07a1135a327362f157955d470fad5df07cc35164
-# Parent  de79964656fc652f2085dac4fe99bcc128b5a3b1
-8062808, PR3548: Turn on the -Wreturn-type warning
-Reviewed-by: mgerdin, tschatzl, coleenp, jrose, kbarrett
-
-diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2020-10-26 03:45:26.495908686 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2020-10-26 03:51:46.461937909 +0000
-@@ -214,7 +214,7 @@
-   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body -Qunused-arguments -Wno-uninitialized
- endif
- 
--WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
-+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type
- 
- ifeq ($(USE_CLANG),)
-   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
-diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad openjdk/hotspot/src/cpu/x86/vm/x86_32.ad
---- openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/cpu/x86/vm/x86_32.ad	2020-10-26 03:51:46.463937930 +0000
-@@ -1255,6 +1255,7 @@
- 
- 
-   Unimplemented();
-+  return 0; // Mute compiler
- }
- 
- #ifndef PRODUCT
-diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
---- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2020-10-26 03:45:26.348907127 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2020-10-26 03:51:46.464937941 +0000
-@@ -541,6 +541,7 @@
-   err.report_and_die();
- 
-   ShouldNotReachHere();
-+  return true; // Mute compiler
- }
- 
- void os::Linux::init_thread_fpu_state(void) {
-diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp
---- openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp	2020-10-26 03:51:46.465937952 +0000
-@@ -506,7 +506,7 @@
-   ss.write((const char*)name->bytes(), name->utf8_length());
-   ss.write((const char*)signature->bytes(), signature->utf8_length());
-   ss.print(" is abstract");
--  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
-+  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
- }
- 
- Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
-@@ -521,7 +521,7 @@
-     ss.print(".");
-     ss.write((const char*)name->bytes(), name->utf8_length());
-   }
--  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
-+  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
- }
- 
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp
---- openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp	2020-10-26 03:51:46.465937952 +0000
-@@ -249,7 +249,7 @@
-   MutexLocker ml(SymbolTable_lock, THREAD);
- 
-   // Otherwise, add to symbol to table
--  return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
-+  return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD);
- }
- 
- Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
-@@ -288,7 +288,7 @@
-   // Grab SymbolTable_lock first.
-   MutexLocker ml(SymbolTable_lock, THREAD);
- 
--  return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
-+  return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD);
- }
- 
- Symbol* SymbolTable::lookup_only(const char* name, int len,
-diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
---- openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp	2020-10-26 03:51:46.467937973 +0000
-@@ -236,15 +236,15 @@
-                  class_name->as_C_string(),
-                  class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
-   if (FieldType::is_array(class_name)) {
--    return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
-+    return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
-   } else if (FieldType::is_obj(class_name)) {
-     ResourceMark rm(THREAD);
-     // Ignore wrapping L and ;.
-     TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
-                                    class_name->utf8_length() - 2, CHECK_NULL);
--    return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL);
-+    return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
-   } else {
--    return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
-+    return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
-   }
- }
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp openjdk/hotspot/src/share/vm/memory/heapInspection.hpp
---- openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/heapInspection.hpp	2020-10-26 03:51:46.467937973 +0000
-@@ -367,7 +367,7 @@
-       _csv_format(csv_format), _print_help(print_help),
-       _print_class_stats(print_class_stats), _columns(columns) {}
-   void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
--  size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
-+  size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0);
-   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
-  private:
-   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp
---- openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp	2020-10-26 03:51:46.468937983 +0000
-@@ -93,7 +93,7 @@
-   static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
-   static int preload_and_dump(const char * class_list_path,
-                               GrowableArray<Klass*>* class_promote_order,
--                              TRAPS) NOT_CDS_RETURN;
-+                              TRAPS) NOT_CDS_RETURN_(0);
- 
-   static ReservedSpace* shared_rs() {
-     CDS_ONLY(return _shared_rs);
-diff -Nru openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp openjdk/hotspot/src/share/vm/oops/constantPool.hpp
---- openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/oops/constantPool.hpp	2020-10-26 03:52:24.750343919 +0000
-@@ -353,7 +353,7 @@
- 
-   Klass* klass_at(int which, TRAPS) {
-     constantPoolHandle h_this(THREAD, this);
--    return klass_at_impl(h_this, which, CHECK_NULL);
-+    return klass_at_impl(h_this, which, THREAD);
-   }
- 
-   Symbol* klass_name_at(int which) const;  // Returns the name, w/o resolving.
-diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp openjdk/hotspot/src/share/vm/prims/jvm.cpp
---- openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/prims/jvm.cpp	2020-10-26 03:51:46.470938005 +0000
-@@ -4375,7 +4375,7 @@
-     JVM_DTraceProvider* providers))
-   JVMWrapper("JVM_DTraceActivate");
-   return DTraceJSDT::activate(
--    version, module_name, providers_count, providers, CHECK_0);
-+    version, module_name, providers_count, providers, THREAD);
- JVM_END
- 
- JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method))
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp openjdk/hotspot/src/share/vm/runtime/reflection.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/reflection.cpp	2020-10-26 03:51:46.471938015 +0000
-@@ -1093,7 +1093,7 @@
-   } else {
-     if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT)
-       narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
--    return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
-+    return box((jvalue*) result.get_value_addr(), rtype, THREAD);
-   }
- }
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp	2020-10-26 03:51:46.472938026 +0000
-@@ -1045,7 +1045,7 @@
-   // last java frame on stack (which includes native call frames)
-   vframeStream vfst(thread, true);  // Do not skip and javaCalls
- 
--  return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
-+  return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
- }
- 
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp openjdk/hotspot/src/share/vm/services/memTracker.hpp
---- openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp	2020-10-17 05:31:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/services/memTracker.hpp	2020-10-26 03:51:46.473938037 +0000
-@@ -64,7 +64,7 @@
-     const NativeCallStack& stack, MEMFLAGS flag = mtNone) { }
-   static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { }
-   static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
--  static inline Tracker get_virtual_memory_release_tracker() { }
-+  static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
-   static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { }
-   static inline void record_thread_stack(void* addr, size_t size) { }
-   static inline void release_thread_stack(void* addr, size_t size) { }
--- a/patches/hotspot/shenandoah/8143245-pr3548.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/shenandoah/8143245-pr3548.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -8,8 +8,8 @@
 Reviewed-by: dholmes, coleenp
 
 diff -Nru openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
---- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make	2019-01-03 15:14:40.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make	2020-07-21 03:22:17.875932021 +0100
+--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/zeroshark.make	2021-02-03 18:32:04.493467003 +0000
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
@@ -30,20 +30,20 @@
  
  # If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to
 diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	2019-01-03 15:14:40.000000000 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	2020-07-21 03:22:17.875932021 +0100
-@@ -100,7 +100,7 @@
-     case T_DOUBLE:
-     case T_VOID:
+--- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	2021-02-03 18:32:45.508953742 +0000
+@@ -102,7 +102,7 @@
        return result;
--    default  : ShouldNotReachHere();
-+    default  : ShouldNotReachHere(); return NULL_WORD;
+     default:
+       ShouldNotReachHere();
+-      return result; // silence compiler warnings
++      return NULL_WORD; // silence compiler warnings
    }
  }
  
 diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
---- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	2019-01-03 15:14:40.000000000 +0000
-+++ openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	2020-07-21 03:22:17.876932032 +0100
+--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	2021-02-03 18:32:04.493467003 +0000
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -61,8 +61,8 @@
    case T_VOID:
      ftype = &ffi_type_void;
 diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	2019-01-03 15:14:40.000000000 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	2020-07-21 03:22:17.876932032 +0100
+--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	2021-02-03 18:32:04.493467003 +0000
 @@ -1,6 +1,6 @@
  /*
   * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
@@ -127,8 +127,8 @@
  
  void os::Linux::set_fpu_control_word(int fpu) {
 diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	2019-01-03 15:14:40.000000000 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	2020-07-21 03:22:43.949200090 +0100
+--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	2021-02-03 18:32:04.494467015 +0000
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
--- a/patches/hotspot/shenandoah/8197981-pr3548.patch	Tue Jan 19 17:36:16 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1518667645 0
-#      Thu Feb 15 04:07:25 2018 +0000
-# Node ID 1d35411eb7bdf16191e220ffe3b1dc4d5d0c6041
-# Parent  999983606f5c61b093c6f6316a7b26c4cd4ca79e
-8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
-Summary: Fix issue discovered by -Wreturn-type on systems without LP64.
-Reviewed-by: aph
-
-diff --git openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
---- openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
-+++ openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
-@@ -457,6 +457,7 @@
-     long long unsigned int oldval,
-     long long unsigned int newval) {
-     ShouldNotCallThis();
-+    return 0;
-   }
- };
- #endif // !_LP64
-diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
-+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
-@@ -498,6 +498,7 @@
-     long long unsigned int oldval,
-     long long unsigned int newval) {
-     ShouldNotCallThis();
-+    return 0;
-   }
- };
- #endif // !_LP64
--- a/patches/hotspot/shenandoah/pr1748.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/shenandoah/pr1748.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -6,10 +6,10 @@
 # Parent  5e956adabf368a0f3292ce5b9ee79db79bfe92f2
 PR1748: Allow clang to be used to build
 
-diff -r 5e956adabf36 -r a8b6c290873c make/linux/makefiles/gcc.make
---- openjdk/hotspot/make/linux/makefiles/gcc.make	Tue Apr 22 19:50:45 2014 +0100
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	Wed Apr 23 21:15:09 2014 +0100
-@@ -212,7 +212,7 @@
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2021-02-03 05:30:00.050338690 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2021-02-03 05:34:54.382857820 +0000
+@@ -209,7 +209,7 @@
    WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
    WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
    WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
@@ -17,11 +17,11 @@
 +  WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body -Qunused-arguments -Wno-uninitialized
  endif
  
- WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
-diff -r 5e956adabf36 -r a8b6c290873c src/cpu/x86/vm/templateTable_x86_64.cpp
---- openjdk/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Tue Apr 22 19:50:45 2014 +0100
-+++ openjdk/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Wed Apr 23 21:15:09 2014 +0100
-@@ -107,10 +107,6 @@
+ WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type
+diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp openjdk/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
+--- openjdk.orig/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	2021-02-03 05:34:29.284541349 +0000
+@@ -110,10 +110,6 @@
    return Address(rsp,  Interpreter::expr_offset_in_bytes(2));
  }
  
@@ -32,10 +32,10 @@
  // Condition conversion
  static Assembler::Condition j_not(TemplateTable::Condition cc) {
    switch (cc) {
-diff -r 5e956adabf36 -r a8b6c290873c src/share/vm/prims/jvmtiTagMap.cpp
---- openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Tue Apr 22 19:50:45 2014 +0100
-+++ openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Apr 23 21:15:09 2014 +0100
-@@ -2791,6 +2791,7 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jvmtiTagMap.cpp openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
+--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	2021-02-03 05:34:29.284541349 +0000
+@@ -2806,6 +2806,7 @@
  }
  
  // verify that a static oop field is in range
@@ -43,7 +43,7 @@
  static inline bool verify_static_oop(InstanceKlass* ik,
                                       oop mirror, int offset) {
    address obj_p = (address)mirror + offset;
-@@ -2804,6 +2805,7 @@
+@@ -2819,6 +2820,7 @@
      return false;
    }
  }
@@ -51,10 +51,10 @@
  
  // a class references its super class, interfaces, class loader, ...
  // and finally its static fields
-diff -r 5e956adabf36 -r a8b6c290873c src/share/vm/runtime/mutex.cpp
---- openjdk/hotspot/src/share/vm/runtime/mutex.cpp	Tue Apr 22 19:50:45 2014 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/mutex.cpp	Wed Apr 23 21:15:09 2014 +0100
-@@ -280,16 +280,6 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/mutex.cpp openjdk/hotspot/src/share/vm/runtime/mutex.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/mutex.cpp	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/mutex.cpp	2021-02-03 05:34:29.284541349 +0000
+@@ -283,16 +283,6 @@
    return x & 0x7FFFFFFF ;
  }
  
--- a/patches/hotspot/shenandoah/pr1869.patch	Tue Jan 19 17:36:16 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1405461315 -3600
-#      Tue Jul 15 22:55:15 2014 +0100
-# Node ID 967ae4d849eb20b4b63c399bc3f376dfc0f9d2cc
-# Parent  84854c983fd81cf1a1598f8c069a2db010abc05c
-PR1869: Avoid x86 workaround when running Zero rather than a JIT
-Contributed-by: Matthias Klose <doko@ubuntu.com>
-
-diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-11 03:36:49.000000000 +0100
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-19 17:15:35.194017652 +0100
-@@ -5139,7 +5139,7 @@
- 
-   Linux::capture_initial_stack(JavaThread::stack_size_at_create());
- 
--#if defined(IA32)
-+#if defined(IA32) && !defined(ZERO)
-   workaround_expand_exec_shield_cs_limit();
- #endif
- 
-diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
---- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-11 03:36:49.000000000 +0100
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-19 17:15:58.329656663 +0100
-@@ -890,7 +890,7 @@
-  * updates (JDK-8023956).
-  */
- void os::workaround_expand_exec_shield_cs_limit() {
--#if defined(IA32)
-+#if defined(IA32) && !defined(ZERO)
-   size_t page_size = os::vm_page_size();
- 
-   /*
--- a/patches/hotspot/shenandoah/pr3519-return_value-02.patch	Tue Jan 19 17:36:16 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1518669922 0
-#      Thu Feb 15 04:45:22 2018 +0000
-# Node ID adaf109718c10888cce5b6e73af7f3e15a7ab0db
-# Parent  3ade0115344b77e6d00462044e0cf68722685bfe
-PR3519: Fix further functions with a missing return value.
-
-diff --git a/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
---- openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
-+++ openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
-@@ -205,6 +205,7 @@
-       return Address(base, tmp, Address::lsl(addr->scale()));
-     }
-   }
-+  return Address();
- }
- 
- Address LIR_Assembler::as_Address_hi(LIR_Address* addr) {
--- a/patches/hotspot/shenandoah/pr3601.patch	Tue Jan 19 17:36:16 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1529475043 -3600
-#      Wed Jun 20 07:10:43 2018 +0100
-# Node ID f6341f4635dacb56678264d29a88cd052b74036b
-# Parent  30520d5018b509b0ae68f5fcc9a5c540e3e5b2de
-PR3601: Fix additional -Wreturn-type issues introduced by 8061651
-
-diff --git openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp openjdk/hotspot/src/share/vm/prims/jvm.cpp
---- openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp
-+++ openjdk/hotspot/src/share/vm/prims/jvm.cpp
-@@ -835,7 +835,7 @@
- JVM_ENTRY(jboolean, JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname))
-   JVMWrapper("JVM_KnownToNotExist");
- #if INCLUDE_CDS
--  return ClassLoaderExt::known_to_not_exist(env, loader, classname, CHECK_(false));
-+  return ClassLoaderExt::known_to_not_exist(env, loader, classname, THREAD);
- #else
-   return false;
- #endif
-@@ -845,7 +845,7 @@
- JVM_ENTRY(jobjectArray, JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader))
-   JVMWrapper("JVM_GetResourceLookupCacheURLs");
- #if INCLUDE_CDS
--  return ClassLoaderExt::get_lookup_cache_urls(env, loader, CHECK_NULL);
-+  return ClassLoaderExt::get_lookup_cache_urls(env, loader, THREAD);
- #else
-   return NULL;
- #endif
-@@ -855,7 +855,7 @@
- JVM_ENTRY(jintArray, JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name))
-   JVMWrapper("JVM_GetResourceLookupCache");
- #if INCLUDE_CDS
--  return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, CHECK_NULL);
-+  return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, THREAD);
- #else
-   return NULL;
- #endif
--- a/patches/hotspot/shenandoah/werror.patch	Tue Jan 19 17:36:16 2021 +0000
+++ b/patches/hotspot/shenandoah/werror.patch	Thu Feb 04 06:19:03 2021 +0000
@@ -7,9 +7,9 @@
 Merge jdk8u20-b23
 
 diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2019-01-25 15:02:27.660107711 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2019-01-25 15:05:30.485236897 +0000
-@@ -198,7 +198,9 @@
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2021-02-03 05:46:04.643791423 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2021-02-03 17:48:23.482188036 +0000
+@@ -202,7 +202,9 @@
  endif
  
  # Compiler warnings are treated as errors
@@ -20,8 +20,8 @@
  ifeq ($(USE_CLANG), true)
    # However we need to clean the code up before we can unrestrictedly enable this option with Clang
 diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/adlc.make openjdk/hotspot/make/solaris/makefiles/adlc.make
---- openjdk.orig/hotspot/make/solaris/makefiles/adlc.make	2019-01-16 07:13:59.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/adlc.make	2019-01-25 15:06:44.376075821 +0000
+--- openjdk.orig/hotspot/make/solaris/makefiles/adlc.make	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/make/solaris/makefiles/adlc.make	2021-02-03 17:48:23.482188036 +0000
 @@ -73,8 +73,10 @@
  
  # CFLAGS_WARN holds compiler options to suppress/enable warnings.
@@ -36,9 +36,9 @@
  # When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly 
  # instantiated template functions trigger this warning when +w is active.
 diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make
---- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make	2019-01-16 07:13:59.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2019-01-25 15:05:30.485236897 +0000
-@@ -116,7 +116,9 @@
+--- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make	2021-01-15 17:21:13.000000000 +0000
++++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2021-02-03 17:48:53.654476968 +0000
+@@ -117,7 +117,9 @@
  
  
  # Compiler warnings are treated as errors 
@@ -47,5 +47,5 @@
 +WARNINGS_ARE_ERRORS = -Werror
 +endif
  # Enable these warnings. See 'info gcc' about details on these options
- WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
+ WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2
  CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)