Merge JDK-8145252-TLS13-branch
authorwetmore
Tue, 29 May 2018 13:16:23 -0700
branchJDK-8145252-TLS13-branch
changeset 56622 579be8f5b214
parent 56615 54dc9877efe9 (current diff)
parent 50297 580744d900c8 (diff)
child 56636 ef5c16991f27
Merge
--- a/make/data/tzdata/VERSION	Sat May 26 20:29:15 2018 -0700
+++ b/make/data/tzdata/VERSION	Tue May 29 13:16:23 2018 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2018d
+tzdata2018e
--- a/make/data/tzdata/africa	Sat May 26 20:29:15 2018 -0700
+++ b/make/data/tzdata/africa	Tue May 29 13:16:23 2018 -0700
@@ -29,7 +29,7 @@
 # tz@iana.org for general use in the future).  For more, please see
 # the file CONTRIBUTING in the tz distribution.
 
-# From Paul Eggert (2017-02-20):
+# From Paul Eggert (2017-04-09):
 #
 # Unless otherwise specified, the source for data through 1990 is:
 # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -75,7 +75,7 @@
 # cannot now come up with solid citations.
 #
 # I invented the following abbreviations; corrections are welcome!
-#	 +02	WAST	West Africa Summer Time
+#	 +02	WAST	West Africa Summer Time (no longer used)
 #	 +03	CAST	Central Africa Summer Time (no longer used)
 #	 +03	SAST	South Africa Summer Time (no longer used)
 #	 +03	EAT	East Africa Time
@@ -990,6 +990,10 @@
 # commence at OOhOO on Monday 21 March 1994 and shall end at 02h00 on
 # Sunday 4 September 1994.
 
+# From Michael Deckers (2017-04-06):
+# ... both summer and winter time are called "standard"
+# (which differs from the use in Ireland) ...
+
 # From Petronella Sibeene (2007-03-30):
 # http://allafrica.com/stories/200703300178.html
 # While the entire country changes its time, Katima Mulilo and other
@@ -1015,19 +1019,42 @@
 # the same time they would normally start DST, the first Sunday in September:
 # https://www.timeanddate.com/news/time/namibia-new-time-zone.html
 
+# From Paul Eggert (2017-04-09):
+# Before the change, summer and winter time were both standard time legally.
+# However in common parlance, winter time was considered to be DST.  See, e.g.:
+# http://www.nbc.na/news/namibias-winter-time-could-be-scrapped.2706
+# https://zone.my.na/news/times-are-changing-in-namibia
+# https://www.newera.com.na/2017/02/23/namibias-winter-time-might-be-repealed/
+# Use plain "WAT" and "CAT" for the time zone abbreviations, to be compatible
+# with Namibia's neighbors.
+
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Namibia	1994	only	-	Mar	21	0:00	0	-
-Rule	Namibia	1994	2016	-	Sep	Sun>=1	2:00	1:00	S
-Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	0	-
+# Vanguard section, for zic and other parsers that support negative DST.
+#Rule	Namibia	1994	only	-	Mar	21	0:00	-1:00	WAT
+#Rule	Namibia	1994	2017	-	Sep	Sun>=1	2:00	0	CAT
+#Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	-1:00	WAT
+# Rearguard section, for parsers that do not support negative DST.
+Rule	Namibia	1994	only	-	Mar	21	0:00	0	WAT
+Rule	Namibia	1994	2017	-	Sep	Sun>=1	2:00	1:00	CAT
+Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	0	WAT
+# End of rearguard section.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Windhoek	1:08:24 -	LMT	1892 Feb 8
 			1:30	-	+0130	1903 Mar
 			2:00	-	SAST	1942 Sep 20  2:00
 			2:00	1:00	SAST	1943 Mar 21  2:00
 			2:00	-	SAST	1990 Mar 21 # independence
+# Vanguard section, for zic and other parsers that support negative DST.
+#			2:00	Namibia	%s
+# Rearguard section, for parsers that do not support negative DST.
 			2:00	-	CAT	1994 Mar 21  0:00
-			1:00	Namibia	WA%sT	2017 Sep  3  2:00
+# From Paul Eggert (2017-04-07):
+# The official date of the 2017 rule change was 2017-10-24.  See:
+# http://www.lac.org.na/laws/annoSTAT/Namibian%20Time%20Act%209%20of%202017.pdf
+			1:00	Namibia	%s	2017 Oct 24
 			2:00	-	CAT
+# End of rearguard section.
 
 # Niger
 # See Africa/Lagos.
--- a/make/data/tzdata/asia	Sat May 26 20:29:15 2018 -0700
+++ b/make/data/tzdata/asia	Tue May 29 13:16:23 2018 -0700
@@ -2006,6 +2006,19 @@
 # There is no common English-language abbreviation for this time zone.
 # Use KST, as that's what we already use for 1954-1961 in ROK.
 
+# From Kang Seonghoon (2018-04-29):
+# North Korea will revert its time zone from UTC+8:30 (PYT; Pyongyang
+# Time) back to UTC+9 (KST; Korea Standard Time).
+#
+# From Seo Sanghyeon (2018-04-30):
+# Rodong Sinmun 2018-04-30 announced Pyongyang Time transition plan.
+# https://www.nknews.org/kcna/wp-content/uploads/sites/5/2018/04/rodong-2018-04-30.pdf
+# ... the transition date is 2018-05-05 ...  Citation should be Decree
+# No. 2232 of April 30, 2018, of the Presidium of the Supreme People's
+# Assembly, as published in Rodong Sinmun.
+# From Tim Parenti (2018-04-29):
+# It appears to be the front page story at the top in the right-most column.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Seoul	8:27:52	-	LMT	1908 Apr  1
 			8:30	-	KST	1912 Jan  1
@@ -2017,7 +2030,8 @@
 			8:30	-	KST	1912 Jan  1
 			9:00	-	JST	1945 Aug 24
 			9:00	-	KST	2015 Aug 15 00:00
-			8:30	-	KST
+			8:30	-	KST	2018 May  5
+			9:00	-	KST
 
 ###############################################################################
 
@@ -2681,7 +2695,7 @@
 # From Sharef Mustafa (2018-03-16):
 # Palestine summer time will start on Mar 24th 2018 by advancing the
 # clock by 60 minutes as per Palestinian cabinet decision published on
-# the offical website, though the decree did not specify the exact
+# the official website, though the decree did not specify the exact
 # time of the time shift.
 # http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817
 #
--- a/make/data/tzdata/australasia	Sat May 26 20:29:15 2018 -0700
+++ b/make/data/tzdata/australasia	Tue May 29 13:16:23 2018 -0700
@@ -1108,6 +1108,15 @@
 # (1999-09-27) writes that Giles Meteorological Station uses
 # South Australian time even though it's located in Western Australia.
 
+# From Paul Eggert (2018-04-01):
+# The Guardian Express of Perth, Australia reported today that the
+# government decided to advance the clocks permanently on January 1,
+# 2019, from UT +08 to UT +09.  The article noted that an exemption
+# would be made for people aged 61 and over, who "can apply in writing
+# to have the extra hour of sunshine removed from their area."  See:
+# Daylight saving coming to WA in 2019. Guardian Express. 2018-04-01.
+# https://www.communitynews.com.au/guardian-express/news/exclusive-daylight-savings-coming-wa-summer-2018/
+
 # Queensland
 
 # From Paul Eggert (2018-02-26):
--- a/make/data/tzdata/europe	Sat May 26 20:29:15 2018 -0700
+++ b/make/data/tzdata/europe	Tue May 29 13:16:23 2018 -0700
@@ -551,13 +551,13 @@
 # summer and negative daylight saving time in winter.  It is for when
 # negative SAVE values are used.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-#Rule	Eire	1971	only	-	Oct	31	 2:00u	-1:00	GMT
-#Rule	Eire	1972	1980	-	Mar	Sun>=16	 2:00u	0	IST
-#Rule	Eire	1972	1980	-	Oct	Sun>=23	 2:00u	-1:00	GMT
-#Rule	Eire	1981	max	-	Mar	lastSun	 1:00u	0	IST
-#Rule	Eire	1981	1989	-	Oct	Sun>=23	 1:00u	-1:00	GMT
-#Rule	Eire	1990	1995	-	Oct	Sun>=22	 1:00u	-1:00	GMT
-#Rule	Eire	1996	max	-	Oct	lastSun	 1:00u	-1:00	GMT
+#Rule	Eire	1971	only	-	Oct	31	 2:00u	-1:00	-
+#Rule	Eire	1972	1980	-	Mar	Sun>=16	 2:00u	0	-
+#Rule	Eire	1972	1980	-	Oct	Sun>=23	 2:00u	-1:00	-
+#Rule	Eire	1981	max	-	Mar	lastSun	 1:00u	0	-
+#Rule	Eire	1981	1989	-	Oct	Sun>=23	 1:00u	-1:00	-
+#Rule	Eire	1990	1995	-	Oct	Sun>=22	 1:00u	-1:00	-
+#Rule	Eire	1996	max	-	Oct	lastSun	 1:00u	-1:00	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Dublin	-0:25:00 -	LMT	1880 Aug  2
@@ -993,18 +993,30 @@
 # Please see the 'asia' file for Asia/Nicosia.
 
 # Czech Republic / Czechia
+#
+# From Paul Eggert (2018-04-15):
+# The source for Czech data is: Kdy začíná a končí letní čas. 2018-04-15.
+# https://kalendar.beda.cz/kdy-zacina-a-konci-letni-cas
+# We know of no English-language name for historical Czech winter time;
+# abbreviate it as "GMT", as it happened to be GMT.
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Czech	1945	only	-	Apr	 8	2:00s	1:00	S
-Rule	Czech	1945	only	-	Nov	18	2:00s	0	-
+Rule	Czech	1945	only	-	Apr	Mon>=1	2:00s	1:00	S
+Rule	Czech	1945	only	-	Oct	 1	2:00s	0	-
 Rule	Czech	1946	only	-	May	 6	2:00s	1:00	S
 Rule	Czech	1946	1949	-	Oct	Sun>=1	2:00s	0	-
-Rule	Czech	1947	only	-	Apr	20	2:00s	1:00	S
-Rule	Czech	1948	only	-	Apr	18	2:00s	1:00	S
+Rule	Czech	1947	1948	-	Apr	Sun>=15	2:00s	1:00	S
 Rule	Czech	1949	only	-	Apr	 9	2:00s	1:00	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Prague	0:57:44 -	LMT	1850
 			0:57:44	-	PMT	1891 Oct    # Prague Mean Time
-			1:00	C-Eur	CE%sT	1944 Sep 17  2:00s
+			1:00	C-Eur	CE%sT	1945 May  9
+			1:00	Czech	CE%sT	1946 Dec  1  3:00
+# Vanguard section, for zic and other parsers that support negative DST.
+#			1:00	-1:00	GMT	1947 Feb 23  2:00
+# Rearguard section, for parsers that do not support negative DST.
+			0:00	-	GMT	1947 Feb 23  2:00
+# End of rearguard section.
 			1:00	Czech	CE%sT	1979
 			1:00	EU	CE%sT
 # Use Europe/Prague also for Slovakia.
@@ -2039,7 +2051,7 @@
 Rule	Neth	1945	only	-	Apr	 2	2:00s	1:00	S
 Rule	Neth	1945	only	-	Sep	16	2:00s	0	-
 #
-# Amsterdam Mean Time was +00:19:32.13 exactly, but the .13 is omitted
+# Amsterdam Mean Time was +00:19:32.13, but the .13 is omitted
 # below because the current format requires GMTOFF to be an integer.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Europe/Amsterdam	0:19:32 -	LMT	1835
--- a/make/devkit/createWindowsDevkit2017.sh	Sat May 26 20:29:15 2018 -0700
+++ b/make/devkit/createWindowsDevkit2017.sh	Tue May 29 13:16:23 2018 -0700
@@ -108,8 +108,8 @@
 
     # The redist runtime libs are needed to run the compiler but may not be
     # installed on the machine where the devkit will be used.
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
     cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
     cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
 fi
--- a/src/hotspot/cpu/x86/x86_64.ad	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/cpu/x86/x86_64.ad	Tue May 29 13:16:23 2018 -0700
@@ -2980,6 +2980,16 @@
   interface(CONST_INTER);
 %}
 
+operand immU8()
+%{
+  predicate((0 <= n->get_int()) && (n->get_int() <= 255));
+  match(ConI);
+
+  op_cost(5);
+  format %{ %}
+  interface(CONST_INTER);
+%}
+
 operand immI16()
 %{
   predicate((-32768 <= n->get_int()) && (n->get_int() <= 32767));
@@ -11597,6 +11607,46 @@
   ins_pipe(ialu_cr_reg_imm);
 %}
 
+instruct compUB_mem_imm(rFlagsReg cr, memory mem, immU8 imm)
+%{
+  match(Set cr (CmpI (LoadUB mem) imm));
+
+  ins_cost(125);
+  format %{ "cmpb    $mem, $imm" %}
+  ins_encode %{ __ cmpb($mem$$Address, $imm$$constant); %}
+  ins_pipe(ialu_cr_reg_mem);
+%}
+
+instruct compB_mem_imm(rFlagsReg cr, memory mem, immI8 imm)
+%{
+  match(Set cr (CmpI (LoadB mem) imm));
+
+  ins_cost(125);
+  format %{ "cmpb    $mem, $imm" %}
+  ins_encode %{ __ cmpb($mem$$Address, $imm$$constant); %}
+  ins_pipe(ialu_cr_reg_mem);
+%}
+
+instruct testUB_mem_imm(rFlagsReg cr, memory mem, immU8 imm, immI0 zero)
+%{
+  match(Set cr (CmpI (AndI (LoadUB mem) imm) zero));
+
+  ins_cost(125);
+  format %{ "testb   $mem, $imm" %}
+  ins_encode %{ __ testb($mem$$Address, $imm$$constant); %}
+  ins_pipe(ialu_cr_reg_mem);
+%}
+
+instruct testB_mem_imm(rFlagsReg cr, memory mem, immI8 imm, immI0 zero)
+%{
+  match(Set cr (CmpI (AndI (LoadB mem) imm) zero));
+
+  ins_cost(125);
+  format %{ "testb   $mem, $imm" %}
+  ins_encode %{ __ testb($mem$$Address, $imm$$constant); %}
+  ins_pipe(ialu_cr_reg_mem);
+%}
+
 //----------Max and Min--------------------------------------------------------
 // Min Instructions
 
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1817,22 +1817,11 @@
 // ----------------------------------------------------------------------------
 // GC support
 
-void SystemDictionary::always_strong_oops_do(OopClosure* blk) {
-  roots_oops_do(blk, NULL);
-}
-
-
 // Assumes classes in the SystemDictionary are only unloaded at a safepoint
 // Note: anonymous classes are not in the SD.
-bool SystemDictionary::do_unloading(BoolObjectClosure* is_alive,
-                                    GCTimer* gc_timer,
+bool SystemDictionary::do_unloading(GCTimer* gc_timer,
                                     bool do_cleaning) {
 
-  {
-    GCTraceTime(Debug, gc, phases) t("SystemDictionary WeakHandle cleaning", gc_timer);
-    vm_weak_oop_storage()->weak_oops_do(is_alive, &do_nothing_cl);
-  }
-
   bool unloading_occurred;
   {
     GCTraceTime(Debug, gc, phases) t("ClassLoaderData", gc_timer);
@@ -1863,27 +1852,6 @@
   return unloading_occurred;
 }
 
-void SystemDictionary::roots_oops_do(OopClosure* strong, OopClosure* weak) {
-  strong->do_oop(&_java_system_loader);
-  strong->do_oop(&_java_platform_loader);
-  strong->do_oop(&_system_loader_lock_obj);
-  CDS_ONLY(SystemDictionaryShared::roots_oops_do(strong);)
-
-  // Do strong roots marking if the closures are the same.
-  if (strong == weak || !ClassUnloading) {
-    // Only the protection domain oops contain references into the heap. Iterate
-    // over all of them.
-    vm_weak_oop_storage()->oops_do(strong);
-  } else {
-   if (weak != NULL) {
-     vm_weak_oop_storage()->oops_do(weak);
-   }
-  }
-
-  // Visit extra methods
-  invoke_method_table()->oops_do(strong);
-}
-
 void SystemDictionary::oops_do(OopClosure* f) {
   f->do_oop(&_java_system_loader);
   f->do_oop(&_java_platform_loader);
@@ -1892,8 +1860,6 @@
 
   // Visit extra methods
   invoke_method_table()->oops_do(f);
-
-  vm_weak_oop_storage()->oops_do(f);
 }
 
 // CDS: scan and relocate all classes in the system dictionary.
--- a/src/hotspot/share/classfile/systemDictionary.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/classfile/systemDictionary.hpp	Tue May 29 13:16:23 2018 -0700
@@ -357,14 +357,9 @@
 
   // Garbage collection support
 
-  // This method applies "blk->do_oop" to all the pointers to "system"
-  // classes and loaders.
-  static void always_strong_oops_do(OopClosure* blk);
-
   // Unload (that is, break root links to) all unmarked classes and
   // loaders.  Returns "true" iff something was unloaded.
-  static bool do_unloading(BoolObjectClosure* is_alive,
-                           GCTimer* gc_timer,
+  static bool do_unloading(GCTimer* gc_timer,
                            bool do_cleaning = true);
 
   // Used by DumpSharedSpaces only to remove classes that failed verification
@@ -374,7 +369,6 @@
 
   // Applies "f->do_oop" to all root oops in the system dictionary.
   static void oops_do(OopClosure* f);
-  static void roots_oops_do(OopClosure* strong, OopClosure* weak);
 
   // System loader lock
   static oop system_loader_lock()           { return _system_loader_lock_obj; }
--- a/src/hotspot/share/gc/cms/cmsHeap.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/cms/cmsHeap.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -222,10 +222,9 @@
                                 OopsInGenClosure* root_closure,
                                 CLDClosure* cld_closure) {
   MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations);
-  OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 
-  process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
+  process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
   if (!only_strong_roots) {
     process_string_table_roots(scope, root_closure);
   }
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Tue May 29 13:16:23 2018 -0700
@@ -5201,7 +5201,7 @@
       GCTraceTime(Debug, gc, phases) t("Class Unloading", _gc_timer_cm);
 
       // Unload classes and purge the SystemDictionary.
-      bool purged_class = SystemDictionary::do_unloading(&_is_alive_closure, _gc_timer_cm);
+      bool purged_class = SystemDictionary::do_unloading(_gc_timer_cm);
 
       // Unload nmethods.
       CodeCache::do_unloading(&_is_alive_closure, purged_class);
--- a/src/hotspot/share/gc/cms/jvmFlagConstraintsCMS.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/cms/jvmFlagConstraintsCMS.cpp	Tue May 29 13:16:23 2018 -0700
@@ -30,17 +30,16 @@
 #include "gc/shared/genCollectedHeap.hpp"
 #include "gc/shared/jvmFlagConstraintsGC.hpp"
 #include "memory/universe.hpp"
-#include "runtime/flags/jvmFlagRangeList.hpp"
 #include "runtime/globals_extension.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 static JVMFlag::Error ParallelGCThreadsAndCMSWorkQueueDrainThreshold(uint threads, uintx threshold, bool verbose) {
   // CMSWorkQueueDrainThreshold is verified to be less than max_juint
   if (UseConcMarkSweepGC && (threads > (uint)(max_jint / (uint)threshold))) {
-    CommandLineError::print(verbose,
-                            "ParallelGCThreads (" UINT32_FORMAT ") or CMSWorkQueueDrainThreshold ("
-                            UINTX_FORMAT ") is too large\n",
-                            threads, threshold);
+    JVMFlag::printError(verbose,
+                        "ParallelGCThreads (" UINT32_FORMAT ") or CMSWorkQueueDrainThreshold ("
+                        UINTX_FORMAT ") is too large\n",
+                        threads, threshold);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -49,20 +48,20 @@
 JVMFlag::Error ParallelGCThreadsConstraintFuncCMS(uint value, bool verbose) {
   // To avoid overflow at ParScanClosure::do_oop_work.
   if (UseConcMarkSweepGC && (value > (max_jint / 10))) {
-    CommandLineError::print(verbose,
-                            "ParallelGCThreads (" UINT32_FORMAT ") must be "
-                            "less than or equal to " UINT32_FORMAT " for CMS GC\n",
-                            value, (max_jint / 10));
+    JVMFlag::printError(verbose,
+                        "ParallelGCThreads (" UINT32_FORMAT ") must be "
+                        "less than or equal to " UINT32_FORMAT " for CMS GC\n",
+                        value, (max_jint / 10));
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return ParallelGCThreadsAndCMSWorkQueueDrainThreshold(value, CMSWorkQueueDrainThreshold, verbose);
 }
 JVMFlag::Error ParGCStridesPerThreadConstraintFunc(uintx value, bool verbose) {
   if (UseConcMarkSweepGC && (value > ((uintx)max_jint / (uintx)ParallelGCThreads))) {
-    CommandLineError::print(verbose,
-                            "ParGCStridesPerThread (" UINTX_FORMAT ") must be "
-                            "less than or equal to ergonomic maximum (" UINTX_FORMAT ")\n",
-                            value, ((uintx)max_jint / (uintx)ParallelGCThreads));
+    JVMFlag::printError(verbose,
+                        "ParGCStridesPerThread (" UINTX_FORMAT ") must be "
+                        "less than or equal to ergonomic maximum (" UINTX_FORMAT ")\n",
+                        value, ((uintx)max_jint / (uintx)ParallelGCThreads));
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -76,10 +75,10 @@
     size_t card_table_size = ct->cards_required(heap_size) - 1; // Valid card table size
 
     if ((size_t)value > card_table_size) {
-      CommandLineError::print(verbose,
-                              "ParGCCardsPerStrideChunk (" INTX_FORMAT ") is too large for the heap size and "
-                              "must be less than or equal to card table size (" SIZE_FORMAT ")\n",
-                              value, card_table_size);
+      JVMFlag::printError(verbose,
+                          "ParGCCardsPerStrideChunk (" INTX_FORMAT ") is too large for the heap size and "
+                          "must be less than or equal to card table size (" SIZE_FORMAT ")\n",
+                          value, card_table_size);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
 
@@ -89,10 +88,10 @@
     uintx n_strides = ParallelGCThreads * ParGCStridesPerThread;
     uintx ergo_max = max_uintx / n_strides;
     if ((uintx)value > ergo_max) {
-      CommandLineError::print(verbose,
-                              "ParGCCardsPerStrideChunk (" INTX_FORMAT ") must be "
-                              "less than or equal to ergonomic maximum (" UINTX_FORMAT ")\n",
-                              value, ergo_max);
+      JVMFlag::printError(verbose,
+                          "ParGCCardsPerStrideChunk (" INTX_FORMAT ") must be "
+                          "less than or equal to ergonomic maximum (" UINTX_FORMAT ")\n",
+                          value, ergo_max);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -104,10 +103,10 @@
 
   if (UseConcMarkSweepGC) {
     if (value > CMSOldPLABMax) {
-      CommandLineError::print(verbose,
-                              "CMSOldPLABMin (" SIZE_FORMAT ") must be "
-                              "less than or equal to CMSOldPLABMax (" SIZE_FORMAT ")\n",
-                              value, CMSOldPLABMax);
+      JVMFlag::printError(verbose,
+                          "CMSOldPLABMin (" SIZE_FORMAT ") must be "
+                          "less than or equal to CMSOldPLABMax (" SIZE_FORMAT ")\n",
+                          value, CMSOldPLABMax);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
     status = MaxPLABSizeBounds("CMSOldPLABMin", value, verbose);
@@ -129,11 +128,11 @@
     ConcurrentMarkSweepGeneration* cms = CMSHeap::heap()->old_gen();
     const size_t ergo_max = cms->cmsSpace()->max_flag_size_for_task_size();
     if (value > ergo_max) {
-      CommandLineError::print(verbose,
-                              "%s (" SIZE_FORMAT ") must be "
-                              "less than or equal to ergonomic maximum (" SIZE_FORMAT ") "
-                              "which is based on the maximum size of the old generation of the Java heap\n",
-                              name, value, ergo_max);
+      JVMFlag::printError(verbose,
+                          "%s (" SIZE_FORMAT ") must be "
+                          "less than or equal to ergonomic maximum (" SIZE_FORMAT ") "
+                          "which is based on the maximum size of the old generation of the Java heap\n",
+                          name, value, ergo_max);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -150,10 +149,10 @@
     // Note that rescan_task_size() will be aligned if CMSRescanMultiple is a multiple of 'HeapWordSize'
     // because rescan_task_size() is CardTable::card_size / HeapWordSize * BitsPerWord.
     if (value % HeapWordSize != 0) {
-      CommandLineError::print(verbose,
-                              "CMSRescanMultiple (" SIZE_FORMAT ") must be "
-                              "a multiple of " SIZE_FORMAT "\n",
-                              value, HeapWordSize);
+      JVMFlag::printError(verbose,
+                          "CMSRescanMultiple (" SIZE_FORMAT ") must be "
+                          "a multiple of " SIZE_FORMAT "\n",
+                          value, HeapWordSize);
       status = JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -167,10 +166,10 @@
 
 JVMFlag::Error CMSPrecleanDenominatorConstraintFunc(uintx value, bool verbose) {
   if (UseConcMarkSweepGC && (value <= CMSPrecleanNumerator)) {
-    CommandLineError::print(verbose,
-                            "CMSPrecleanDenominator (" UINTX_FORMAT ") must be "
-                            "strickly greater than CMSPrecleanNumerator (" UINTX_FORMAT ")\n",
-                            value, CMSPrecleanNumerator);
+    JVMFlag::printError(verbose,
+                        "CMSPrecleanDenominator (" UINTX_FORMAT ") must be "
+                        "strickly greater than CMSPrecleanNumerator (" UINTX_FORMAT ")\n",
+                        value, CMSPrecleanNumerator);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -178,10 +177,10 @@
 
 JVMFlag::Error CMSPrecleanNumeratorConstraintFunc(uintx value, bool verbose) {
   if (UseConcMarkSweepGC && (value >= CMSPrecleanDenominator)) {
-    CommandLineError::print(verbose,
-                            "CMSPrecleanNumerator (" UINTX_FORMAT ") must be "
-                            "less than CMSPrecleanDenominator (" UINTX_FORMAT ")\n",
-                            value, CMSPrecleanDenominator);
+    JVMFlag::printError(verbose,
+                        "CMSPrecleanNumerator (" UINTX_FORMAT ") must be "
+                        "less than CMSPrecleanDenominator (" UINTX_FORMAT ")\n",
+                        value, CMSPrecleanDenominator);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -191,10 +190,10 @@
   if (UseConcMarkSweepGC) {
     size_t max_capacity = CMSHeap::heap()->young_gen()->max_capacity();
     if (value > max_uintx - max_capacity) {
-    CommandLineError::print(verbose,
-                            "CMSSamplingGrain (" UINTX_FORMAT ") must be "
-                            "less than or equal to ergonomic maximum (" SIZE_FORMAT ")\n",
-                            value, max_uintx - max_capacity);
+    JVMFlag::printError(verbose,
+                        "CMSSamplingGrain (" UINTX_FORMAT ") must be "
+                        "less than or equal to ergonomic maximum (" SIZE_FORMAT ")\n",
+                        value, max_uintx - max_capacity);
     return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -216,11 +215,11 @@
     size_t bitmap_size = cms->collector()->markBitMap()->sizeInWords();
 
     if (value > bitmap_size) {
-      CommandLineError::print(verbose,
-                              "CMSBitMapYieldQuantum (" SIZE_FORMAT ") must "
-                              "be less than or equal to bitmap size (" SIZE_FORMAT ") "
-                              "whose size corresponds to the size of old generation of the Java heap\n",
-                              value, bitmap_size);
+      JVMFlag::printError(verbose,
+                          "CMSBitMapYieldQuantum (" SIZE_FORMAT ") must "
+                          "be less than or equal to bitmap size (" SIZE_FORMAT ") "
+                          "whose size corresponds to the size of old generation of the Java heap\n",
+                          value, bitmap_size);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -229,9 +228,9 @@
 
 JVMFlag::Error OldPLABSizeConstraintFuncCMS(size_t value, bool verbose) {
   if (value == 0) {
-    CommandLineError::print(verbose,
-                            "OldPLABSize (" SIZE_FORMAT ") must be greater than 0",
-                            value);
+    JVMFlag::printError(verbose,
+                        "OldPLABSize (" SIZE_FORMAT ") must be greater than 0",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   // For CMS, OldPLABSize is the number of free blocks of a given size that are used when
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1611,6 +1611,9 @@
   const uint max_region_idx = (1U << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;
   guarantee((max_regions() - 1) <= max_region_idx, "too many regions");
 
+  // The G1FromCardCache reserves card with value 0 as "invalid", so the heap must not
+  // start within the first card.
+  guarantee(g1_rs.base() >= (char*)G1CardTable::card_size, "Java heap must not start within the first card.");
   // Also create a G1 rem set.
   _g1_rem_set = new G1RemSet(this, _card_table, _hot_card_cache);
   _g1_rem_set->initialize(max_capacity(), max_regions());
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1665,7 +1665,7 @@
   // Unload Klasses, String, Symbols, Code Cache, etc.
   if (ClassUnloadingWithConcurrentMark) {
     GCTraceTime(Debug, gc, phases) debug("Class Unloading", _gc_timer_cm);
-    bool purged_classes = SystemDictionary::do_unloading(&g1_is_alive, _gc_timer_cm, false /* Defer cleaning */);
+    bool purged_classes = SystemDictionary::do_unloading(_gc_timer_cm, false /* Defer cleaning */);
     _g1h->complete_cleaning(&g1_is_alive, purged_classes);
   } else {
     GCTraceTime(Debug, gc, phases) debug("Cleanup", _gc_timer_cm);
--- a/src/hotspot/share/gc/g1/g1FromCardCache.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/g1FromCardCache.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,9 @@
                                                              num_par_rem_sets,
                                                              &_static_mem_size);
 
-  invalidate(0, _max_regions);
+  if (AlwaysPreTouch) {
+    invalidate(0, _max_regions);
+  }
 }
 
 void G1FromCardCache::invalidate(uint start_idx, size_t new_num_regions) {
--- a/src/hotspot/share/gc/g1/g1FromCardCache.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/g1FromCardCache.hpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 // G1FromCardCache remembers the most recently processed card on the heap on
 // a per-region and per-thread basis.
 class G1FromCardCache : public AllStatic {
- private:
+private:
   // Array of card indices. Indexed by heap region (rows) and thread (columns) to minimize
   // thread contention.
   // This order minimizes the time to clear all entries for a given region during region
@@ -49,9 +49,12 @@
   }
 #endif
 
- public:
-  static const uintptr_t InvalidCard = UINTPTR_MAX;
+  // This card index indicates "no card for that entry" yet. This allows us to use the OS
+  // lazy backing of memory with zero-filled pages to avoid initial actual memory use.
+  // This means that the heap must not contain card zero.
+  static const uintptr_t InvalidCard = 0;
 
+public:
   static void clear(uint region_idx);
 
   // Returns true if the given card is in the cache at the given location, or
--- a/src/hotspot/share/gc/g1/g1FullCollector.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/g1FullCollector.cpp	Tue May 29 13:16:23 2018 -0700
@@ -222,7 +222,7 @@
   if (ClassUnloading) {
     GCTraceTime(Debug, gc, phases) debug("Phase 1: Class Unloading and Cleanup", scope()->timer());
     // Unload classes and purge the SystemDictionary.
-    bool purged_class = SystemDictionary::do_unloading(&_is_alive, scope()->timer());
+    bool purged_class = SystemDictionary::do_unloading(scope()->timer());
     _heap->complete_cleaning(&_is_alive, purged_class);
   } else {
     GCTraceTime(Debug, gc, phases) debug("Phase 1: String and Symbol Tables Cleanup", scope()->timer());
--- a/src/hotspot/share/gc/g1/g1RegionMarkStatsCache.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/g1RegionMarkStatsCache.cpp	Tue May 29 13:16:23 2018 -0700
@@ -36,9 +36,6 @@
   guarantee(is_power_of_2(num_cache_entries),
             "Number of cache entries must be power of two, but is %u", num_cache_entries);
   _cache = NEW_C_HEAP_ARRAY(G1RegionMarkStatsCacheEntry, _num_cache_entries, mtGC);
-  for (uint i = 0; i < _num_cache_entries; i++) {
-    _cache[i].clear();
-  }
   _num_cache_entries_mask = _num_cache_entries - 1;
 }
 
--- a/src/hotspot/share/gc/g1/g1RootProcessor.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/g1RootProcessor.cpp	Tue May 29 13:16:23 2018 -0700
@@ -241,7 +241,6 @@
                                        G1GCPhaseTimes* phase_times,
                                        uint worker_i) {
   OopClosure* strong_roots = closures->strong_oops();
-  OopClosure* weak_roots = closures->weak_oops();
 
   {
     G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::UniverseRoots, worker_i);
@@ -290,7 +289,7 @@
   {
     G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SystemDictionaryRoots, worker_i);
     if (!_process_strong_tasks.is_task_claimed(G1RP_PS_SystemDictionary_oops_do)) {
-      SystemDictionary::roots_oops_do(strong_roots, weak_roots);
+      SystemDictionary::oops_do(strong_roots);
     }
   }
 }
--- a/src/hotspot/share/gc/g1/jvmFlagConstraintsG1.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/g1/jvmFlagConstraintsG1.cpp	Tue May 29 13:16:23 2018 -0700
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "gc/g1/heapRegionBounds.inline.hpp"
-#include "runtime/flags/jvmFlagRangeList.hpp"
+#include "gc/g1/jvmFlagConstraintsG1.hpp"
 #include "runtime/globals_extension.hpp"
 #include "utilities/globalDefinitions.hpp"
 
@@ -34,10 +34,10 @@
   // Default value of G1RSetRegionEntries=0 means will be set ergonomically.
   // Minimum value is 1.
   if (FLAG_IS_CMDLINE(G1RSetRegionEntries) && (value < 1)) {
-    CommandLineError::print(verbose,
-                            "G1RSetRegionEntries (" INTX_FORMAT ") must be "
-                            "greater than or equal to 1\n",
-                            value);
+    JVMFlag::printError(verbose,
+                        "G1RSetRegionEntries (" INTX_FORMAT ") must be "
+                        "greater than or equal to 1\n",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -50,10 +50,10 @@
   // Default value of G1RSetSparseRegionEntries=0 means will be set ergonomically.
   // Minimum value is 1.
   if (FLAG_IS_CMDLINE(G1RSetSparseRegionEntries) && (value < 1)) {
-    CommandLineError::print(verbose,
-                            "G1RSetSparseRegionEntries (" INTX_FORMAT ") must be "
-                            "greater than or equal to 1\n",
-                            value);
+    JVMFlag::printError(verbose,
+                        "G1RSetSparseRegionEntries (" INTX_FORMAT ") must be "
+                        "greater than or equal to 1\n",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -65,10 +65,10 @@
 
   // Default value of G1HeapRegionSize=0 means will be set ergonomically.
   if (FLAG_IS_CMDLINE(G1HeapRegionSize) && (value < HeapRegionBounds::min_size())) {
-    CommandLineError::print(verbose,
-                            "G1HeapRegionSize (" SIZE_FORMAT ") must be "
-                            "greater than or equal to ergonomic heap region minimum size\n",
-                            value);
+    JVMFlag::printError(verbose,
+                        "G1HeapRegionSize (" SIZE_FORMAT ") must be "
+                        "greater than or equal to ergonomic heap region minimum size\n",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -79,10 +79,10 @@
   if (!UseG1GC) return JVMFlag::SUCCESS;
 
   if (value > G1MaxNewSizePercent) {
-    CommandLineError::print(verbose,
-                            "G1NewSizePercent (" UINTX_FORMAT ") must be "
-                            "less than or equal to G1MaxNewSizePercent (" UINTX_FORMAT ")\n",
-                            value, G1MaxNewSizePercent);
+    JVMFlag::printError(verbose,
+                        "G1NewSizePercent (" UINTX_FORMAT ") must be "
+                        "less than or equal to G1MaxNewSizePercent (" UINTX_FORMAT ")\n",
+                        value, G1MaxNewSizePercent);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -93,10 +93,10 @@
   if (!UseG1GC) return JVMFlag::SUCCESS;
 
   if (value < G1NewSizePercent) {
-    CommandLineError::print(verbose,
-                            "G1MaxNewSizePercent (" UINTX_FORMAT ") must be "
-                            "greater than or equal to G1NewSizePercent (" UINTX_FORMAT ")\n",
-                            value, G1NewSizePercent);
+    JVMFlag::printError(verbose,
+                        "G1MaxNewSizePercent (" UINTX_FORMAT ") must be "
+                        "greater than or equal to G1NewSizePercent (" UINTX_FORMAT ")\n",
+                        value, G1NewSizePercent);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -105,10 +105,10 @@
 
 JVMFlag::Error MaxGCPauseMillisConstraintFuncG1(uintx value, bool verbose) {
   if (UseG1GC && FLAG_IS_CMDLINE(MaxGCPauseMillis) && (value >= GCPauseIntervalMillis)) {
-    CommandLineError::print(verbose,
-                            "MaxGCPauseMillis (" UINTX_FORMAT ") must be "
-                            "less than GCPauseIntervalMillis (" UINTX_FORMAT ")\n",
-                            value, GCPauseIntervalMillis);
+    JVMFlag::printError(verbose,
+                        "MaxGCPauseMillis (" UINTX_FORMAT ") must be "
+                        "less than GCPauseIntervalMillis (" UINTX_FORMAT ")\n",
+                        value, GCPauseIntervalMillis);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -119,25 +119,25 @@
   if (UseG1GC) {
     if (FLAG_IS_CMDLINE(GCPauseIntervalMillis)) {
       if (value < 1) {
-        CommandLineError::print(verbose,
-                                "GCPauseIntervalMillis (" UINTX_FORMAT ") must be "
-                                "greater than or equal to 1\n",
-                                value);
+        JVMFlag::printError(verbose,
+                            "GCPauseIntervalMillis (" UINTX_FORMAT ") must be "
+                            "greater than or equal to 1\n",
+                            value);
         return JVMFlag::VIOLATES_CONSTRAINT;
       }
 
       if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
-        CommandLineError::print(verbose,
-                                "GCPauseIntervalMillis cannot be set "
-                                "without setting MaxGCPauseMillis\n");
+        JVMFlag::printError(verbose,
+                            "GCPauseIntervalMillis cannot be set "
+                            "without setting MaxGCPauseMillis\n");
         return JVMFlag::VIOLATES_CONSTRAINT;
       }
 
       if (value <= MaxGCPauseMillis) {
-        CommandLineError::print(verbose,
-                                "GCPauseIntervalMillis (" UINTX_FORMAT ") must be "
-                                "greater than MaxGCPauseMillis (" UINTX_FORMAT ")\n",
-                                value, MaxGCPauseMillis);
+        JVMFlag::printError(verbose,
+                            "GCPauseIntervalMillis (" UINTX_FORMAT ") must be "
+                            "greater than MaxGCPauseMillis (" UINTX_FORMAT ")\n",
+                            value, MaxGCPauseMillis);
         return JVMFlag::VIOLATES_CONSTRAINT;
       }
     }
@@ -153,9 +153,9 @@
   // i.e. result of '(uint)(NewSize / region size(1~32MB))'
   // So maximum of NewSize should be 'max_juint * 1M'
   if (UseG1GC && (value > (max_juint * 1 * M))) {
-    CommandLineError::print(verbose,
-                            "NewSize (" SIZE_FORMAT ") must be less than ergonomic maximum value\n",
-                            value);
+    JVMFlag::printError(verbose,
+                        "NewSize (" SIZE_FORMAT ") must be less than ergonomic maximum value\n",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 #endif // _LP64
--- a/src/hotspot/share/gc/parallel/jvmFlagConstraintsParallel.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/parallel/jvmFlagConstraintsParallel.cpp	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "runtime/flags/jvmFlagRangeList.hpp"
+#include "gc/parallel/jvmFlagConstraintsParallel.hpp"
 #include "runtime/globals.hpp"
 #include "utilities/globalDefinitions.hpp"
 
@@ -32,10 +32,10 @@
   // So can't exceed with "max_jint"
 
   if (UseParallelGC && (value > (uint)max_jint)) {
-    CommandLineError::print(verbose,
-                            "ParallelGCThreads (" UINT32_FORMAT ") must be "
-                            "less than or equal to " UINT32_FORMAT " for Parallel GC\n",
-                            value, max_jint);
+    JVMFlag::printError(verbose,
+                        "ParallelGCThreads (" UINT32_FORMAT ") must be "
+                        "less than or equal to " UINT32_FORMAT " for Parallel GC\n",
+                        value, max_jint);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -44,10 +44,10 @@
 JVMFlag::Error InitialTenuringThresholdConstraintFuncParallel(uintx value, bool verbose) {
   // InitialTenuringThreshold is only used for ParallelGC.
   if (UseParallelGC && (value > MaxTenuringThreshold)) {
-      CommandLineError::print(verbose,
-                              "InitialTenuringThreshold (" UINTX_FORMAT ") must be "
-                              "less than or equal to MaxTenuringThreshold (" UINTX_FORMAT ")\n",
-                              value, MaxTenuringThreshold);
+      JVMFlag::printError(verbose,
+                          "InitialTenuringThreshold (" UINTX_FORMAT ") must be "
+                          "less than or equal to MaxTenuringThreshold (" UINTX_FORMAT ")\n",
+                          value, MaxTenuringThreshold);
       return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -57,10 +57,10 @@
   // As only ParallelGC uses InitialTenuringThreshold,
   // we don't need to compare InitialTenuringThreshold with MaxTenuringThreshold.
   if (UseParallelGC && (value < InitialTenuringThreshold)) {
-    CommandLineError::print(verbose,
-                            "MaxTenuringThreshold (" UINTX_FORMAT ") must be "
-                            "greater than or equal to InitialTenuringThreshold (" UINTX_FORMAT ")\n",
-                            value, InitialTenuringThreshold);
+    JVMFlag::printError(verbose,
+                        "MaxTenuringThreshold (" UINTX_FORMAT ") must be "
+                        "greater than or equal to InitialTenuringThreshold (" UINTX_FORMAT ")\n",
+                        value, InitialTenuringThreshold);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
--- a/src/hotspot/share/gc/parallel/pcTasks.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/parallel/pcTasks.cpp	Tue May 29 13:16:23 2018 -0700
@@ -104,7 +104,7 @@
       break;
 
     case system_dictionary:
-      SystemDictionary::always_strong_oops_do(&mark_and_push_closure);
+      SystemDictionary::oops_do(&mark_and_push_closure);
       break;
 
     case class_loader_data:
--- a/src/hotspot/share/gc/parallel/psCompactionManager.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/parallel/psCompactionManager.cpp	Tue May 29 13:16:23 2018 -0700
@@ -200,16 +200,9 @@
       cm->mark_and_push(referent_addr);
     }
   }
-  T* next_addr = (T*)java_lang_ref_Reference::next_addr_raw(obj);
-  // Treat discovered as normal oop, if ref is not "active",
-  // i.e. if next is non-NULL.
-  T  next_oop = RawAccess<>::oop_load(next_addr);
-  if (!CompressedOops::is_null(next_oop)) { // i.e. ref is not "active"
-    T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj);
-    log_develop_trace(gc, ref)("   Process discovered as normal " PTR_FORMAT, p2i(discovered_addr));
-    cm->mark_and_push(discovered_addr);
-  }
-  cm->mark_and_push(next_addr);
+  // Treat discovered as normal oop.
+  T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj);
+  cm->mark_and_push(discovered_addr);
   klass->InstanceKlass::oop_pc_follow_contents(obj, cm);
 }
 
--- a/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Tue May 29 13:16:23 2018 -0700
@@ -521,7 +521,7 @@
     ObjectSynchronizer::oops_do(mark_and_push_closure());
     Management::oops_do(mark_and_push_closure());
     JvmtiExport::oops_do(mark_and_push_closure());
-    SystemDictionary::always_strong_oops_do(mark_and_push_closure());
+    SystemDictionary::oops_do(mark_and_push_closure());
     ClassLoaderDataGraph::always_strong_cld_do(follow_cld_closure());
     // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
     //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure()));
@@ -556,7 +556,7 @@
     GCTraceTime(Debug, gc, phases) t("Class Unloading", _gc_timer);
 
     // Unload classes and purge the SystemDictionary.
-    bool purged_class = SystemDictionary::do_unloading(is_alive_closure(), _gc_timer);
+    bool purged_class = SystemDictionary::do_unloading(_gc_timer);
 
     // Unload nmethods.
     CodeCache::do_unloading(is_alive_closure(), purged_class);
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Tue May 29 13:16:23 2018 -0700
@@ -2139,7 +2139,7 @@
     GCTraceTime(Debug, gc, phases) tm_m("Class Unloading", &_gc_timer);
 
     // Follow system dictionary roots and unload classes.
-    bool purged_class = SystemDictionary::do_unloading(is_alive_closure(), &_gc_timer);
+    bool purged_class = SystemDictionary::do_unloading(&_gc_timer);
 
     // Unload nmethods.
     CodeCache::do_unloading(is_alive_closure(), purged_class);
@@ -3081,13 +3081,10 @@
 #ifdef ASSERT
 template <class T> static void trace_reference_gc(const char *s, oop obj,
                                                   T* referent_addr,
-                                                  T* next_addr,
                                                   T* discovered_addr) {
   log_develop_trace(gc, ref)("%s obj " PTR_FORMAT, s, p2i(obj));
   log_develop_trace(gc, ref)("     referent_addr/* " PTR_FORMAT " / " PTR_FORMAT,
                              p2i(referent_addr), referent_addr ? p2i((oop)RawAccess<>::oop_load(referent_addr)) : NULL);
-  log_develop_trace(gc, ref)("     next_addr/* " PTR_FORMAT " / " PTR_FORMAT,
-                             p2i(next_addr), next_addr ? p2i((oop)RawAccess<>::oop_load(next_addr)) : NULL);
   log_develop_trace(gc, ref)("     discovered_addr/* " PTR_FORMAT " / " PTR_FORMAT,
                              p2i(discovered_addr), discovered_addr ? p2i((oop)RawAccess<>::oop_load(discovered_addr)) : NULL);
 }
@@ -3097,12 +3094,10 @@
 static void oop_pc_update_pointers_specialized(oop obj, ParCompactionManager* cm) {
   T* referent_addr = (T*)java_lang_ref_Reference::referent_addr_raw(obj);
   PSParallelCompact::adjust_pointer(referent_addr, cm);
-  T* next_addr = (T*)java_lang_ref_Reference::next_addr_raw(obj);
-  PSParallelCompact::adjust_pointer(next_addr, cm);
   T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj);
   PSParallelCompact::adjust_pointer(discovered_addr, cm);
   debug_only(trace_reference_gc("InstanceRefKlass::oop_update_ptrs", obj,
-                                referent_addr, next_addr, discovered_addr);)
+                                referent_addr, discovered_addr);)
 }
 
 void InstanceRefKlass::oop_pc_update_pointers(oop obj, ParCompactionManager* cm) {
--- a/src/hotspot/share/gc/parallel/psPromotionManager.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/parallel/psPromotionManager.cpp	Tue May 29 13:16:23 2018 -0700
@@ -442,7 +442,7 @@
   if (PSScavenge::should_scavenge(referent_addr)) {
     ReferenceProcessor* rp = PSScavenge::reference_processor();
     if (rp->discover_reference(obj, klass->reference_type())) {
-      // reference already enqueued, referent and next will be traversed later
+      // reference discovered, referent will be traversed later.
       klass->InstanceKlass::oop_ps_push_contents(obj, pm);
       return;
     } else {
@@ -450,20 +450,10 @@
       pm->claim_or_forward_depth(referent_addr);
     }
   }
-  // Treat discovered as normal oop, if ref is not "active",
-  // i.e. if next is non-NULL.
-  T* next_addr = (T*)java_lang_ref_Reference::next_addr_raw(obj);
-  T  next_oop = RawAccess<>::oop_load(next_addr);
-  if (!CompressedOops::is_null(next_oop)) { // i.e. ref is not "active"
-    T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj);
-    log_develop_trace(gc, ref)("   Process discovered as normal " PTR_FORMAT, p2i(discovered_addr));
-    if (PSScavenge::should_scavenge(discovered_addr)) {
-      pm->claim_or_forward_depth(discovered_addr);
-    }
-  }
-  // Treat next as normal oop;  next is a link in the reference queue.
-  if (PSScavenge::should_scavenge(next_addr)) {
-    pm->claim_or_forward_depth(next_addr);
+  // Treat discovered as normal oop
+  T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj);
+  if (PSScavenge::should_scavenge(discovered_addr)) {
+    pm->claim_or_forward_depth(discovered_addr);
   }
   klass->InstanceKlass::oop_ps_push_contents(obj, pm);
 }
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp	Tue May 29 13:16:23 2018 -0700
@@ -228,7 +228,7 @@
     GCTraceTime(Debug, gc, phases) tm_m("Class Unloading", gc_timer());
 
     // Unload classes and purge the SystemDictionary.
-    bool purged_class = SystemDictionary::do_unloading(&is_alive, gc_timer());
+    bool purged_class = SystemDictionary::do_unloading(gc_timer());
 
     // Unload nmethods.
     CodeCache::do_unloading(&is_alive, purged_class);
--- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Tue May 29 13:16:23 2018 -0700
@@ -783,7 +783,6 @@
 void GenCollectedHeap::process_roots(StrongRootsScope* scope,
                                      ScanningOption so,
                                      OopClosure* strong_roots,
-                                     OopClosure* weak_roots,
                                      CLDClosure* strong_cld_closure,
                                      CLDClosure* weak_cld_closure,
                                      CodeBlobToOopClosure* code_roots) {
@@ -827,7 +826,7 @@
   }
 
   if (!_process_strong_tasks->is_task_claimed(GCH_PS_SystemDictionary_oops_do)) {
-    SystemDictionary::roots_oops_do(strong_roots, weak_roots);
+    SystemDictionary::oops_do(strong_roots);
   }
 
   if (!_process_strong_tasks->is_task_claimed(GCH_PS_CodeCache_oops_do)) {
@@ -869,7 +868,7 @@
                                            CLDClosure* cld_closure) {
   MarkingCodeBlobClosure mark_code_closure(root_closure, CodeBlobToOopClosure::FixRelocations);
 
-  process_roots(scope, SO_ScavengeCodeCache, root_closure, root_closure,
+  process_roots(scope, SO_ScavengeCodeCache, root_closure,
                 cld_closure, cld_closure, &mark_code_closure);
   process_string_table_roots(scope, root_closure);
 
@@ -893,10 +892,9 @@
                                           OopsInGenClosure* root_closure,
                                           CLDClosure* cld_closure) {
   MarkingCodeBlobClosure mark_code_closure(root_closure, is_adjust_phase);
-  OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 
-  process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
+  process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
   if (is_adjust_phase) {
     // We never treat the string table as roots during marking
     // for the full gc, so we only need to process it during
--- a/src/hotspot/share/gc/shared/genCollectedHeap.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.hpp	Tue May 29 13:16:23 2018 -0700
@@ -396,7 +396,6 @@
   void process_roots(StrongRootsScope* scope,
                      ScanningOption so,
                      OopClosure* strong_roots,
-                     OopClosure* weak_roots,
                      CLDClosure* strong_cld_closure,
                      CLDClosure* weak_cld_closure,
                      CodeBlobToOopClosure* code_roots);
--- a/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp	Tue May 29 13:16:23 2018 -0700
@@ -30,12 +30,10 @@
 #include "gc/shared/plab.hpp"
 #include "gc/shared/threadLocalAllocBuffer.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/flags/jvmFlagRangeList.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/globals_extension.hpp"
 #include "runtime/thread.inline.hpp"
 #include "utilities/align.hpp"
-#include "utilities/defaultStream.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_CMSGC
 #include "gc/cms/jvmFlagConstraintsCMS.hpp"
@@ -88,10 +86,10 @@
   // CMS and G1 GCs use ConcGCThreads.
   if ((GCConfig::is_gc_selected(CollectedHeap::CMS) ||
        GCConfig::is_gc_selected(CollectedHeap::G1)) && (value > ParallelGCThreads)) {
-    CommandLineError::print(verbose,
-                            "ConcGCThreads (" UINT32_FORMAT ") must be "
-                            "less than or equal to ParallelGCThreads (" UINT32_FORMAT ")\n",
-                            value, ParallelGCThreads);
+    JVMFlag::printError(verbose,
+                        "ConcGCThreads (" UINT32_FORMAT ") must be "
+                        "less than or equal to ParallelGCThreads (" UINT32_FORMAT ")\n",
+                        value, ParallelGCThreads);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -102,10 +100,10 @@
   if ((GCConfig::is_gc_selected(CollectedHeap::CMS) ||
        GCConfig::is_gc_selected(CollectedHeap::G1)  ||
        GCConfig::is_gc_selected(CollectedHeap::Parallel)) && (value < PLAB::min_size())) {
-    CommandLineError::print(verbose,
-                            "%s (" SIZE_FORMAT ") must be "
-                            "greater than or equal to ergonomic PLAB minimum size (" SIZE_FORMAT ")\n",
-                            name, value, PLAB::min_size());
+    JVMFlag::printError(verbose,
+                        "%s (" SIZE_FORMAT ") must be "
+                        "greater than or equal to ergonomic PLAB minimum size (" SIZE_FORMAT ")\n",
+                        name, value, PLAB::min_size());
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -116,10 +114,10 @@
   if ((GCConfig::is_gc_selected(CollectedHeap::CMS) ||
        GCConfig::is_gc_selected(CollectedHeap::G1)  ||
        GCConfig::is_gc_selected(CollectedHeap::Parallel)) && (value > PLAB::max_size())) {
-    CommandLineError::print(verbose,
-                            "%s (" SIZE_FORMAT ") must be "
-                            "less than or equal to ergonomic PLAB maximum size (" SIZE_FORMAT ")\n",
-                            name, value, PLAB::max_size());
+    JVMFlag::printError(verbose,
+                        "%s (" SIZE_FORMAT ") must be "
+                        "less than or equal to ergonomic PLAB maximum size (" SIZE_FORMAT ")\n",
+                        name, value, PLAB::max_size());
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -156,10 +154,10 @@
 
 JVMFlag::Error MinHeapFreeRatioConstraintFunc(uintx value, bool verbose) {
   if (value > MaxHeapFreeRatio) {
-    CommandLineError::print(verbose,
-                            "MinHeapFreeRatio (" UINTX_FORMAT ") must be "
-                            "less than or equal to MaxHeapFreeRatio (" UINTX_FORMAT ")\n",
-                            value, MaxHeapFreeRatio);
+    JVMFlag::printError(verbose,
+                        "MinHeapFreeRatio (" UINTX_FORMAT ") must be "
+                        "less than or equal to MaxHeapFreeRatio (" UINTX_FORMAT ")\n",
+                        value, MaxHeapFreeRatio);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -168,10 +166,10 @@
 
 JVMFlag::Error MaxHeapFreeRatioConstraintFunc(uintx value, bool verbose) {
   if (value < MinHeapFreeRatio) {
-    CommandLineError::print(verbose,
-                            "MaxHeapFreeRatio (" UINTX_FORMAT ") must be "
-                            "greater than or equal to MinHeapFreeRatio (" UINTX_FORMAT ")\n",
-                            value, MinHeapFreeRatio);
+    JVMFlag::printError(verbose,
+                        "MaxHeapFreeRatio (" UINTX_FORMAT ") must be "
+                        "greater than or equal to MinHeapFreeRatio (" UINTX_FORMAT ")\n",
+                        value, MinHeapFreeRatio);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -180,11 +178,11 @@
 
 static JVMFlag::Error CheckMaxHeapSizeAndSoftRefLRUPolicyMSPerMB(size_t maxHeap, intx softRef, bool verbose) {
   if ((softRef > 0) && ((maxHeap / M) > (max_uintx / softRef))) {
-    CommandLineError::print(verbose,
-                            "Desired lifetime of SoftReferences cannot be expressed correctly. "
-                            "MaxHeapSize (" SIZE_FORMAT ") or SoftRefLRUPolicyMSPerMB "
-                            "(" INTX_FORMAT ") is too large\n",
-                            maxHeap, softRef);
+    JVMFlag::printError(verbose,
+                        "Desired lifetime of SoftReferences cannot be expressed correctly. "
+                        "MaxHeapSize (" SIZE_FORMAT ") or SoftRefLRUPolicyMSPerMB "
+                        "(" INTX_FORMAT ") is too large\n",
+                        maxHeap, softRef);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -197,10 +195,10 @@
 
 JVMFlag::Error MarkStackSizeConstraintFunc(size_t value, bool verbose) {
   if (value > MarkStackSizeMax) {
-    CommandLineError::print(verbose,
-                            "MarkStackSize (" SIZE_FORMAT ") must be "
-                            "less than or equal to MarkStackSizeMax (" SIZE_FORMAT ")\n",
-                            value, MarkStackSizeMax);
+    JVMFlag::printError(verbose,
+                        "MarkStackSize (" SIZE_FORMAT ") must be "
+                        "less than or equal to MarkStackSizeMax (" SIZE_FORMAT ")\n",
+                        value, MarkStackSizeMax);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -209,10 +207,10 @@
 
 JVMFlag::Error MinMetaspaceFreeRatioConstraintFunc(uintx value, bool verbose) {
   if (value > MaxMetaspaceFreeRatio) {
-    CommandLineError::print(verbose,
-                            "MinMetaspaceFreeRatio (" UINTX_FORMAT ") must be "
-                            "less than or equal to MaxMetaspaceFreeRatio (" UINTX_FORMAT ")\n",
-                            value, MaxMetaspaceFreeRatio);
+    JVMFlag::printError(verbose,
+                        "MinMetaspaceFreeRatio (" UINTX_FORMAT ") must be "
+                        "less than or equal to MaxMetaspaceFreeRatio (" UINTX_FORMAT ")\n",
+                        value, MaxMetaspaceFreeRatio);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -221,10 +219,10 @@
 
 JVMFlag::Error MaxMetaspaceFreeRatioConstraintFunc(uintx value, bool verbose) {
   if (value < MinMetaspaceFreeRatio) {
-    CommandLineError::print(verbose,
-                            "MaxMetaspaceFreeRatio (" UINTX_FORMAT ") must be "
-                            "greater than or equal to MinMetaspaceFreeRatio (" UINTX_FORMAT ")\n",
-                            value, MinMetaspaceFreeRatio);
+    JVMFlag::printError(verbose,
+                        "MaxMetaspaceFreeRatio (" UINTX_FORMAT ") must be "
+                        "greater than or equal to MinMetaspaceFreeRatio (" UINTX_FORMAT ")\n",
+                        value, MinMetaspaceFreeRatio);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -252,12 +250,12 @@
 
   // MaxTenuringThreshold=0 means NeverTenure=false && AlwaysTenure=true
   if ((value == 0) && (NeverTenure || !AlwaysTenure)) {
-    CommandLineError::print(verbose,
-                            "MaxTenuringThreshold (0) should match to NeverTenure=false "
-                            "&& AlwaysTenure=true. But we have NeverTenure=%s "
-                            "AlwaysTenure=%s\n",
-                            NeverTenure ? "true" : "false",
-                            AlwaysTenure ? "true" : "false");
+    JVMFlag::printError(verbose,
+                        "MaxTenuringThreshold (0) should match to NeverTenure=false "
+                        "&& AlwaysTenure=true. But we have NeverTenure=%s "
+                        "AlwaysTenure=%s\n",
+                        NeverTenure ? "true" : "false",
+                        AlwaysTenure ? "true" : "false");
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -288,10 +286,10 @@
 JVMFlag::Error InitialBootClassLoaderMetaspaceSizeConstraintFunc(size_t value, bool verbose) {
   size_t aligned_max = align_down(max_uintx/2, Metaspace::reserve_alignment_words());
   if (value > aligned_max) {
-    CommandLineError::print(verbose,
-                            "InitialBootClassLoaderMetaspaceSize (" SIZE_FORMAT ") must be "
-                            "less than or equal to aligned maximum value (" SIZE_FORMAT ")\n",
-                            value, aligned_max);
+    JVMFlag::printError(verbose,
+                        "InitialBootClassLoaderMetaspaceSize (" SIZE_FORMAT ") must be "
+                        "less than or equal to aligned maximum value (" SIZE_FORMAT ")\n",
+                        value, aligned_max);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -301,10 +299,10 @@
 static JVMFlag::Error MaxSizeForAlignment(const char* name, size_t value, size_t alignment, bool verbose) {
   size_t aligned_max = ((max_uintx - alignment) & ~(alignment-1));
   if (value > aligned_max) {
-    CommandLineError::print(verbose,
-                            "%s (" SIZE_FORMAT ") must be "
-                            "less than or equal to aligned maximum value (" SIZE_FORMAT ")\n",
-                            name, value, aligned_max);
+    JVMFlag::printError(verbose,
+                        "%s (" SIZE_FORMAT ") must be "
+                        "less than or equal to aligned maximum value (" SIZE_FORMAT ")\n",
+                        name, value, aligned_max);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -343,10 +341,10 @@
   // If an overflow happened in Arguments::set_heap_size(), MaxHeapSize will have too large a value.
   // Check for this by ensuring that MaxHeapSize plus the requested min base address still fit within max_uintx.
   if (UseCompressedOops && FLAG_IS_ERGO(MaxHeapSize) && (value > (max_uintx - MaxHeapSize))) {
-    CommandLineError::print(verbose,
-                            "HeapBaseMinAddress (" SIZE_FORMAT ") or MaxHeapSize (" SIZE_FORMAT ") is too large. "
-                            "Sum of them must be less than or equal to maximum of size_t (" SIZE_FORMAT ")\n",
-                            value, MaxHeapSize, max_uintx);
+    JVMFlag::printError(verbose,
+                        "HeapBaseMinAddress (" SIZE_FORMAT ") or MaxHeapSize (" SIZE_FORMAT ") is too large. "
+                        "Sum of them must be less than or equal to maximum of size_t (" SIZE_FORMAT ")\n",
+                        value, MaxHeapSize, max_uintx);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -367,17 +365,17 @@
 JVMFlag::Error MinTLABSizeConstraintFunc(size_t value, bool verbose) {
   // At least, alignment reserve area is needed.
   if (value < ThreadLocalAllocBuffer::alignment_reserve_in_bytes()) {
-    CommandLineError::print(verbose,
-                            "MinTLABSize (" SIZE_FORMAT ") must be "
-                            "greater than or equal to reserved area in TLAB (" SIZE_FORMAT ")\n",
-                            value, ThreadLocalAllocBuffer::alignment_reserve_in_bytes());
+    JVMFlag::printError(verbose,
+                        "MinTLABSize (" SIZE_FORMAT ") must be "
+                        "greater than or equal to reserved area in TLAB (" SIZE_FORMAT ")\n",
+                        value, ThreadLocalAllocBuffer::alignment_reserve_in_bytes());
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   if (value > (ThreadLocalAllocBuffer::max_size() * HeapWordSize)) {
-    CommandLineError::print(verbose,
-                            "MinTLABSize (" SIZE_FORMAT ") must be "
-                            "less than or equal to ergonomic TLAB maximum (" SIZE_FORMAT ")\n",
-                            value, ThreadLocalAllocBuffer::max_size() * HeapWordSize);
+    JVMFlag::printError(verbose,
+                        "MinTLABSize (" SIZE_FORMAT ") must be "
+                        "less than or equal to ergonomic TLAB maximum (" SIZE_FORMAT ")\n",
+                        value, ThreadLocalAllocBuffer::max_size() * HeapWordSize);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -387,17 +385,17 @@
   // Skip for default value of zero which means set ergonomically.
   if (FLAG_IS_CMDLINE(TLABSize)) {
     if (value < MinTLABSize) {
-      CommandLineError::print(verbose,
-                              "TLABSize (" SIZE_FORMAT ") must be "
-                              "greater than or equal to MinTLABSize (" SIZE_FORMAT ")\n",
-                              value, MinTLABSize);
+      JVMFlag::printError(verbose,
+                          "TLABSize (" SIZE_FORMAT ") must be "
+                          "greater than or equal to MinTLABSize (" SIZE_FORMAT ")\n",
+                          value, MinTLABSize);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
     if (value > (ThreadLocalAllocBuffer::max_size() * HeapWordSize)) {
-      CommandLineError::print(verbose,
-                              "TLABSize (" SIZE_FORMAT ") must be "
-                              "less than or equal to ergonomic TLAB maximum size (" SIZE_FORMAT ")\n",
-                              value, (ThreadLocalAllocBuffer::max_size() * HeapWordSize));
+      JVMFlag::printError(verbose,
+                          "TLABSize (" SIZE_FORMAT ") must be "
+                          "less than or equal to ergonomic TLAB maximum size (" SIZE_FORMAT ")\n",
+                          value, (ThreadLocalAllocBuffer::max_size() * HeapWordSize));
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -412,10 +410,10 @@
 
     // Compare with 'max_uintx' as ThreadLocalAllocBuffer::_refill_waste_limit is 'size_t'.
     if (refill_waste_limit > (max_uintx - value)) {
-      CommandLineError::print(verbose,
-                              "TLABWasteIncrement (" UINTX_FORMAT ") must be "
-                              "less than or equal to ergonomic TLAB waste increment maximum size(" SIZE_FORMAT ")\n",
-                              value, (max_uintx - refill_waste_limit));
+      JVMFlag::printError(verbose,
+                          "TLABWasteIncrement (" UINTX_FORMAT ") must be "
+                          "less than or equal to ergonomic TLAB waste increment maximum size(" SIZE_FORMAT ")\n",
+                          value, (max_uintx - refill_waste_limit));
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -425,11 +423,11 @@
 JVMFlag::Error SurvivorRatioConstraintFunc(uintx value, bool verbose) {
   if (FLAG_IS_CMDLINE(SurvivorRatio) &&
       (value > (MaxHeapSize / Universe::heap()->collector_policy()->space_alignment()))) {
-    CommandLineError::print(verbose,
-                            "SurvivorRatio (" UINTX_FORMAT ") must be "
-                            "less than or equal to ergonomic SurvivorRatio maximum (" SIZE_FORMAT ")\n",
-                            value,
-                            (MaxHeapSize / Universe::heap()->collector_policy()->space_alignment()));
+    JVMFlag::printError(verbose,
+                        "SurvivorRatio (" UINTX_FORMAT ") must be "
+                        "less than or equal to ergonomic SurvivorRatio maximum (" SIZE_FORMAT ")\n",
+                        value,
+                        (MaxHeapSize / Universe::heap()->collector_policy()->space_alignment()));
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -438,10 +436,10 @@
 
 JVMFlag::Error MetaspaceSizeConstraintFunc(size_t value, bool verbose) {
   if (value > MaxMetaspaceSize) {
-    CommandLineError::print(verbose,
-                            "MetaspaceSize (" SIZE_FORMAT ") must be "
-                            "less than or equal to MaxMetaspaceSize (" SIZE_FORMAT ")\n",
-                            value, MaxMetaspaceSize);
+    JVMFlag::printError(verbose,
+                        "MetaspaceSize (" SIZE_FORMAT ") must be "
+                        "less than or equal to MaxMetaspaceSize (" SIZE_FORMAT ")\n",
+                        value, MaxMetaspaceSize);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -450,10 +448,10 @@
 
 JVMFlag::Error MaxMetaspaceSizeConstraintFunc(size_t value, bool verbose) {
   if (value < MetaspaceSize) {
-    CommandLineError::print(verbose,
-                            "MaxMetaspaceSize (" SIZE_FORMAT ") must be "
-                            "greater than or equal to MetaspaceSize (" SIZE_FORMAT ")\n",
-                            value, MaxMetaspaceSize);
+    JVMFlag::printError(verbose,
+                        "MaxMetaspaceSize (" SIZE_FORMAT ") must be "
+                        "greater than or equal to MetaspaceSize (" SIZE_FORMAT ")\n",
+                        value, MaxMetaspaceSize);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -463,17 +461,17 @@
 JVMFlag::Error SurvivorAlignmentInBytesConstraintFunc(intx value, bool verbose) {
   if (value != 0) {
     if (!is_power_of_2(value)) {
-      CommandLineError::print(verbose,
-                              "SurvivorAlignmentInBytes (" INTX_FORMAT ") must be "
-                              "power of 2\n",
-                              value);
+      JVMFlag::printError(verbose,
+                          "SurvivorAlignmentInBytes (" INTX_FORMAT ") must be "
+                          "power of 2\n",
+                          value);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
     if (value < ObjectAlignmentInBytes) {
-      CommandLineError::print(verbose,
-                              "SurvivorAlignmentInBytes (" INTX_FORMAT ") must be "
-                              "greater than or equal to ObjectAlignmentInBytes (" INTX_FORMAT ")\n",
-                              value, ObjectAlignmentInBytes);
+      JVMFlag::printError(verbose,
+                          "SurvivorAlignmentInBytes (" INTX_FORMAT ") must be "
+                          "greater than or equal to ObjectAlignmentInBytes (" INTX_FORMAT ")\n",
+                          value, ObjectAlignmentInBytes);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
--- a/src/hotspot/share/gc/shared/referenceProcessor.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/shared/referenceProcessor.cpp	Tue May 29 13:16:23 2018 -0700
@@ -303,9 +303,6 @@
 }
 
 void DiscoveredListIterator::enqueue() {
-  // Self-loop next, so as to make Ref not active.
-  java_lang_ref_Reference::set_next_raw(_current_discovered, _current_discovered);
-
   HeapAccess<AS_NO_KEEPALIVE>::oop_store_at(_current_discovered,
                                             java_lang_ref_Reference::discovered_offset,
                                             _next_discovered);
@@ -364,38 +361,35 @@
                              iter.removed(), iter.processed(), p2i(&refs_list));
 }
 
+inline void log_dropped_ref(const DiscoveredListIterator& iter, const char* reason) {
+  log_develop_trace(gc, ref)("Dropping %s reference " PTR_FORMAT ": %s",
+                             reason, p2i(iter.obj()),
+                             iter.obj()->klass()->internal_name());
+}
+
+// Traverse the list and remove any Refs whose referents are alive,
+// or NULL if discovery is not atomic.
 void ReferenceProcessor::process_phase2(DiscoveredList&    refs_list,
                                         BoolObjectClosure* is_alive,
                                         OopClosure*        keep_alive,
                                         VoidClosure*       complete_gc) {
-  if (discovery_is_atomic()) {
-    // complete_gc is ignored in this case for this phase
-    pp2_work(refs_list, is_alive, keep_alive);
-  } else {
-    assert(complete_gc != NULL, "Error");
-    pp2_work_concurrent_discovery(refs_list, is_alive,
-                                  keep_alive, complete_gc);
-  }
-}
-// Traverse the list and remove any Refs that are not active, or
-// whose referents are either alive or NULL.
-void
-ReferenceProcessor::pp2_work(DiscoveredList&    refs_list,
-                             BoolObjectClosure* is_alive,
-                             OopClosure*        keep_alive) {
-  assert(discovery_is_atomic(), "Error");
+  // complete_gc is unused.
   DiscoveredListIterator iter(refs_list, keep_alive, is_alive);
   while (iter.has_next()) {
-    iter.load_ptrs(DEBUG_ONLY(false /* allow_null_referent */));
-    DEBUG_ONLY(oop next = java_lang_ref_Reference::next(iter.obj());)
-    assert(next == NULL, "Should not discover inactive Reference");
-    if (iter.is_referent_alive()) {
-      log_develop_trace(gc, ref)("Dropping strongly reachable reference (" INTPTR_FORMAT ": %s)",
-                                 p2i(iter.obj()), iter.obj()->klass()->internal_name());
+    iter.load_ptrs(DEBUG_ONLY(!discovery_is_atomic() /* allow_null_referent */));
+    if (iter.referent() == NULL) {
+      // Reference has been cleared since discovery; only possible if
+      // discovery is not atomic (checked by load_ptrs).  Remove
+      // reference from list.
+      log_dropped_ref(iter, "cleared");
+      iter.remove();
+      iter.move_to_next();
+    } else if (iter.is_referent_alive()) {
       // The referent is reachable after all.
-      // Remove Reference object from list.
+      // Remove reference from list.
+      log_dropped_ref(iter, "reachable");
       iter.remove();
-      // Update the referent pointer as necessary: Note that this
+      // Update the referent pointer as necessary.  Note that this
       // should not entail any recursive marking because the
       // referent must already have been traversed.
       iter.make_referent_alive();
@@ -413,45 +407,6 @@
   )
 }
 
-void
-ReferenceProcessor::pp2_work_concurrent_discovery(DiscoveredList&    refs_list,
-                                                  BoolObjectClosure* is_alive,
-                                                  OopClosure*        keep_alive,
-                                                  VoidClosure*       complete_gc) {
-  assert(!discovery_is_atomic(), "Error");
-  DiscoveredListIterator iter(refs_list, keep_alive, is_alive);
-  while (iter.has_next()) {
-    iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */));
-    HeapWord* next_addr = java_lang_ref_Reference::next_addr_raw(iter.obj());
-    oop next = java_lang_ref_Reference::next(iter.obj());
-    if ((iter.referent() == NULL || iter.is_referent_alive() ||
-         next != NULL)) {
-      assert(oopDesc::is_oop_or_null(next), "Expected an oop or NULL for next field at " PTR_FORMAT, p2i(next));
-      // Remove Reference object from list
-      iter.remove();
-      // Trace the cohorts
-      iter.make_referent_alive();
-      if (UseCompressedOops) {
-        keep_alive->do_oop((narrowOop*)next_addr);
-      } else {
-        keep_alive->do_oop((oop*)next_addr);
-      }
-      iter.move_to_next();
-    } else {
-      iter.next();
-    }
-  }
-  // Now close the newly reachable set
-  complete_gc->do_void();
-  NOT_PRODUCT(
-    if (iter.processed() > 0) {
-      log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " active Refs out of " SIZE_FORMAT
-        " Refs in discovered list " INTPTR_FORMAT,
-        iter.removed(), iter.processed(), p2i(&refs_list));
-    }
-  )
-}
-
 void ReferenceProcessor::process_phase3(DiscoveredList&    refs_list,
                                         bool               clear_referent,
                                         BoolObjectClosure* is_alive,
@@ -465,8 +420,12 @@
       // NULL out referent pointer
       iter.clear_referent();
     } else {
-      // keep the referent around
+      // Current reference is a FinalReference; that's the only kind we
+      // don't clear the referent, instead keeping it for calling finalize.
       iter.make_referent_alive();
+      // Self-loop next, to mark it not active.
+      assert(java_lang_ref_Reference::next(iter.obj()) == NULL, "enqueued FinalReference");
+      java_lang_ref_Reference::set_next_raw(iter.obj(), iter.obj());
     }
     iter.enqueue();
     log_develop_trace(gc, ref)("Adding %sreference (" INTPTR_FORMAT ": %s) as pending",
@@ -913,9 +872,9 @@
   if (!_discovering_refs || !RegisterReferences) {
     return false;
   }
-  // We only discover active references.
-  oop next = java_lang_ref_Reference::next(obj);
-  if (next != NULL) {   // Ref is no longer active
+
+  if ((rt == REF_FINAL) && (java_lang_ref_Reference::next(obj) != NULL)) {
+    // Don't rediscover non-active FinalReferences.
     return false;
   }
 
@@ -1121,24 +1080,15 @@
       return true;
     }
     iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */));
-    oop obj = iter.obj();
-    oop next = java_lang_ref_Reference::next(obj);
-    if (iter.referent() == NULL || iter.is_referent_alive() || next != NULL) {
-      // The referent has been cleared, or is alive, or the Reference is not
-      // active; we need to trace and mark its cohort.
+    if (iter.referent() == NULL || iter.is_referent_alive()) {
+      // The referent has been cleared, or is alive; we need to trace
+      // and mark its cohort.
       log_develop_trace(gc, ref)("Precleaning Reference (" INTPTR_FORMAT ": %s)",
                                  p2i(iter.obj()), iter.obj()->klass()->internal_name());
       // Remove Reference object from list
       iter.remove();
       // Keep alive its cohort.
       iter.make_referent_alive();
-      if (UseCompressedOops) {
-        narrowOop* next_addr = (narrowOop*)java_lang_ref_Reference::next_addr_raw(obj);
-        keep_alive->do_oop(next_addr);
-      } else {
-        oop* next_addr = (oop*)java_lang_ref_Reference::next_addr_raw(obj);
-        keep_alive->do_oop(next_addr);
-      }
       iter.move_to_next();
     } else {
       iter.next();
--- a/src/hotspot/share/gc/shared/referenceProcessor.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/shared/referenceProcessor.hpp	Tue May 29 13:16:23 2018 -0700
@@ -262,15 +262,6 @@
                       BoolObjectClosure* is_alive,
                       OopClosure*        keep_alive,
                       VoidClosure*       complete_gc);
-  // Work methods in support of process_phase2
-  void pp2_work(DiscoveredList&    refs_list,
-                BoolObjectClosure* is_alive,
-                OopClosure*        keep_alive);
-  void pp2_work_concurrent_discovery(
-                DiscoveredList&    refs_list,
-                BoolObjectClosure* is_alive,
-                OopClosure*        keep_alive,
-                VoidClosure*       complete_gc);
   // Phase3: process the referents by either clearing them
   // or keeping them alive (and their closure), and enqueuing them.
   void process_phase3(DiscoveredList&    refs_list,
--- a/src/hotspot/share/gc/shared/weakProcessor.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/gc/shared/weakProcessor.cpp	Tue May 29 13:16:23 2018 -0700
@@ -23,6 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "classfile/systemDictionary.hpp"
+#include "gc/shared/oopStorage.inline.hpp"
 #include "gc/shared/weakProcessor.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/jniHandles.hpp"
@@ -34,6 +36,7 @@
 void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) {
   JNIHandles::weak_oops_do(is_alive, keep_alive);
   JvmtiExport::weak_oops_do(is_alive, keep_alive);
+  SystemDictionary::vm_weak_oop_storage()->weak_oops_do(is_alive, keep_alive);
   JFR_ONLY(Jfr::weak_oops_do(is_alive, keep_alive);)
 }
 
--- a/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp	Tue May 29 13:16:23 2018 -0700
@@ -100,7 +100,7 @@
   Universe::oops_do(closure);
   JNIHandles::oops_do(closure);
   JvmtiExport::oops_do(closure);
-  SystemDictionary::always_strong_oops_do(closure);
+  SystemDictionary::oops_do(closure);
   Management::oops_do(closure);
   StringTable::oops_do(closure);
   AOTLoader::oops_do(closure);
--- a/src/hotspot/share/memory/metaspace.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/memory/metaspace.cpp	Tue May 29 13:16:23 2018 -0700
@@ -132,18 +132,17 @@
 bool MetaspaceGC::inc_capacity_until_GC(size_t v, size_t* new_cap_until_GC, size_t* old_cap_until_GC) {
   assert_is_aligned(v, Metaspace::commit_alignment());
 
-  size_t capacity_until_GC = _capacity_until_GC;
-  size_t new_value = capacity_until_GC + v;
+  size_t old_capacity_until_GC = _capacity_until_GC;
+  size_t new_value = old_capacity_until_GC + v;
 
-  if (new_value < capacity_until_GC) {
+  if (new_value < old_capacity_until_GC) {
     // The addition wrapped around, set new_value to aligned max value.
     new_value = align_down(max_uintx, Metaspace::commit_alignment());
   }
 
-  size_t expected = _capacity_until_GC;
-  size_t actual = Atomic::cmpxchg(new_value, &_capacity_until_GC, expected);
+  size_t prev_value = Atomic::cmpxchg(new_value, &_capacity_until_GC, old_capacity_until_GC);
 
-  if (expected != actual) {
+  if (old_capacity_until_GC != prev_value) {
     return false;
   }
 
@@ -151,7 +150,7 @@
     *new_cap_until_GC = new_value;
   }
   if (old_cap_until_GC != NULL) {
-    *old_cap_until_GC = capacity_until_GC;
+    *old_cap_until_GC = old_capacity_until_GC;
   }
   return true;
 }
--- a/src/hotspot/share/memory/metaspace/virtualSpaceNode.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/memory/metaspace/virtualSpaceNode.cpp	Tue May 29 13:16:23 2018 -0700
@@ -521,16 +521,6 @@
         "Checking that the pre-committed memory was registered by the VirtualSpace");
 
     set_top((MetaWord*)virtual_space()->low());
-    set_reserved(MemRegion((HeapWord*)_rs.base(),
-        (HeapWord*)(_rs.base() + _rs.size())));
-
-    assert(reserved()->start() == (HeapWord*) _rs.base(),
-        "Reserved start was not set properly " PTR_FORMAT
-        " != " PTR_FORMAT, p2i(reserved()->start()), p2i(_rs.base()));
-    assert(reserved()->word_size() == _rs.size() / BytesPerWord,
-        "Reserved size was not set properly " SIZE_FORMAT
-        " != " SIZE_FORMAT, reserved()->word_size(),
-        _rs.size() / BytesPerWord);
   }
 
   // Initialize Occupancy Map.
--- a/src/hotspot/share/memory/metaspace/virtualSpaceNode.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/memory/metaspace/virtualSpaceNode.hpp	Tue May 29 13:16:23 2018 -0700
@@ -49,7 +49,6 @@
   const bool _is_class;
 
   // total in the VirtualSpace
-  MemRegion _reserved;
   ReservedSpace _rs;
   VirtualSpace _virtual_space;
   MetaWord* _top;
@@ -102,11 +101,9 @@
   VirtualSpaceNode* next() { return _next; }
   void set_next(VirtualSpaceNode* v) { _next = v; }
 
-  void set_reserved(MemRegion const v) { _reserved = v; }
   void set_top(MetaWord* v) { _top = v; }
 
   // Accessors
-  MemRegion* reserved() { return &_reserved; }
   VirtualSpace* virtual_space() const { return (VirtualSpace*) &_virtual_space; }
 
   // Returns true if "word_size" is available in the VirtualSpace
@@ -135,8 +132,7 @@
   // Allocate a chunk from the virtual space and return it.
   Metachunk* get_chunk_vs(size_t chunk_word_size);
 
-  // Expands/shrinks the committed space in a virtual space.  Delegates
-  // to Virtualspace
+  // Expands the committed space by at least min_words words.
   bool expand_by(size_t min_words, size_t preferred_words);
 
   // In preparation for deleting this node, remove all the chunks
--- a/src/hotspot/share/memory/padded.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/memory/padded.hpp	Tue May 29 13:16:23 2018 -0700
@@ -104,6 +104,8 @@
  public:
   // Creates an aligned padded 2D array.
   // The memory cannot be deleted since the raw memory chunk is not returned.
+  // Always uses mmap to reserve memory. Only the first few pages with the index to
+  // the rows are touched. Allocation size should be "large" to cover page overhead.
   static T** create_unfreeable(uint rows, uint columns, size_t* allocation_size = NULL);
 };
 
--- a/src/hotspot/share/memory/padded.inline.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/memory/padded.inline.hpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,9 +62,8 @@
   size_t total_size = table_size + rows * row_size + alignment;
 
   // Allocate a chunk of memory large enough to allow alignment of the chunk.
-  void* chunk = AllocateHeap(total_size, flags);
+  void* chunk = MmapArrayAllocator<uint8_t>::allocate(total_size, flags);
   // Clear the allocated memory.
-  memset(chunk, 0, total_size);
   // Align the chunk of memory.
   T** result = (T**)align_up(chunk, alignment);
   void* data_start = (void*)((uintptr_t)result + table_size);
--- a/src/hotspot/share/oops/instanceRefKlass.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/oops/instanceRefKlass.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,10 +30,8 @@
 
 void InstanceRefKlass::update_nonstatic_oop_maps(Klass* k) {
   // Clear the nonstatic oop-map entries corresponding to referent
-  // and nextPending field.  They are treated specially by the
+  // and discovered fields.  They are treated specially by the
   // garbage collector.
-  // The discovered field is used only by the garbage collector
-  // and is also treated specially.
   InstanceKlass* ik = InstanceKlass::cast(k);
 
   // Check that we have the right class
@@ -45,22 +43,33 @@
 
   OopMapBlock* map = ik->start_of_nonstatic_oop_maps();
 
-  // Check that the current map is (2,4) - currently points at field with
-  // offset 2 (words) and has 4 map entries.
-  debug_only(int offset = java_lang_ref_Reference::referent_offset);
-  debug_only(unsigned int count = ((java_lang_ref_Reference::discovered_offset -
-    java_lang_ref_Reference::referent_offset)/heapOopSize) + 1);
+#ifdef ASSERT
+  // Verify fields are in the expected places.
+  int referent_offset = java_lang_ref_Reference::referent_offset;
+  int queue_offset = java_lang_ref_Reference::queue_offset;
+  int next_offset = java_lang_ref_Reference::next_offset;
+  int discovered_offset = java_lang_ref_Reference::discovered_offset;
+  assert(referent_offset < queue_offset, "just checking");
+  assert(queue_offset < next_offset, "just checking");
+  assert(next_offset < discovered_offset, "just checking");
+  const unsigned int count =
+    1 + ((discovered_offset - referent_offset) / heapOopSize);
+  assert(count == 4, "just checking");
+#endif // ASSERT
 
+  // Updated map starts at "queue", covers "queue" and "next".
+  const int new_offset = java_lang_ref_Reference::queue_offset;
+  const unsigned int new_count = 2; // queue and next
+
+  // Verify existing map is as expected, and update if needed.
   if (UseSharedSpaces) {
-    assert(map->offset() == java_lang_ref_Reference::queue_offset &&
-           map->count() == 1, "just checking");
+    assert(map->offset() == new_offset, "just checking");
+    assert(map->count() == new_count, "just checking");
   } else {
-    assert(map->offset() == offset && map->count() == count,
-           "just checking");
-
-    // Update map to (3,1) - point to offset of 3 (words) with 1 map entry.
-    map->set_offset(java_lang_ref_Reference::queue_offset);
-    map->set_count(1);
+    assert(map->offset() == referent_offset, "just checking");
+    assert(map->count() == count, "just checking");
+    map->set_offset(new_offset);
+    map->set_count(new_count);
   }
 }
 
@@ -74,7 +83,7 @@
   if (referent != NULL) {
     guarantee(oopDesc::is_oop(referent), "referent field heap failed");
   }
-  // Verify next field
+  // Additional verification for next field, which must be a Reference or null
   oop next = java_lang_ref_Reference::next(obj);
   if (next != NULL) {
     guarantee(oopDesc::is_oop(next), "next field should be an oop");
--- a/src/hotspot/share/oops/instanceRefKlass.inline.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/oops/instanceRefKlass.inline.hpp	Tue May 29 13:16:23 2018 -0700
@@ -46,14 +46,6 @@
 }
 
 template <bool nv, typename T, class OopClosureType, class Contains>
-void InstanceRefKlass::do_next(oop obj, OopClosureType* closure, Contains& contains) {
-  T* next_addr = (T*)java_lang_ref_Reference::next_addr_raw(obj);
-  if (contains(next_addr)) {
-    Devirtualizer<nv>::do_oop(closure, next_addr);
-  }
-}
-
-template <bool nv, typename T, class OopClosureType, class Contains>
 void InstanceRefKlass::do_discovered(oop obj, OopClosureType* closure, Contains& contains) {
   T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj);
   if (contains(discovered_addr)) {
@@ -84,24 +76,15 @@
     return;
   }
 
-  // Treat referent as normal oop.
+  // Treat referent and discovered as normal oops.
   do_referent<nv, T>(obj, closure, contains);
-
-  // Treat discovered as normal oop, if ref is not "active" (next non-NULL).
-  T next_oop  = RawAccess<>::oop_load((T*)java_lang_ref_Reference::next_addr_raw(obj));
-  if (!CompressedOops::is_null(next_oop)) {
-    do_discovered<nv, T>(obj, closure, contains);
-  }
-
-  // Treat next as normal oop.
-  do_next<nv, T>(obj, closure, contains);
+  do_discovered<nv, T>(obj, closure, contains);
 }
 
 template <bool nv, typename T, class OopClosureType, class Contains>
 void InstanceRefKlass::oop_oop_iterate_fields(oop obj, OopClosureType* closure, Contains& contains) {
   do_referent<nv, T>(obj, closure, contains);
   do_discovered<nv, T>(obj, closure, contains);
-  do_next<nv, T>(obj, closure, contains);
 }
 
 template <bool nv, typename T, class OopClosureType, class Contains>
@@ -192,14 +175,11 @@
 template <typename T>
 void InstanceRefKlass::trace_reference_gc(const char *s, oop obj) {
   T* referent_addr   = (T*) java_lang_ref_Reference::referent_addr_raw(obj);
-  T* next_addr       = (T*) java_lang_ref_Reference::next_addr_raw(obj);
   T* discovered_addr = (T*) java_lang_ref_Reference::discovered_addr_raw(obj);
 
   log_develop_trace(gc, ref)("InstanceRefKlass %s for obj " PTR_FORMAT, s, p2i(obj));
   log_develop_trace(gc, ref)("     referent_addr/* " PTR_FORMAT " / " PTR_FORMAT,
       p2i(referent_addr), p2i(referent_addr ? RawAccess<>::oop_load(referent_addr) : (oop)NULL));
-  log_develop_trace(gc, ref)("     next_addr/* " PTR_FORMAT " / " PTR_FORMAT,
-      p2i(next_addr), p2i(next_addr ? RawAccess<>::oop_load(next_addr) : (oop)NULL));
   log_develop_trace(gc, ref)("     discovered_addr/* " PTR_FORMAT " / " PTR_FORMAT,
       p2i(discovered_addr), p2i(discovered_addr ? RawAccess<>::oop_load(discovered_addr) : (oop)NULL));
 }
--- a/src/hotspot/share/prims/jvmtiTagMap.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/prims/jvmtiTagMap.cpp	Tue May 29 13:16:23 2018 -0700
@@ -2577,7 +2577,7 @@
 
     jvmtiHeapReferenceKind kind = root_kind();
     if (kind == JVMTI_HEAP_REFERENCE_SYSTEM_CLASS) {
-      // SystemDictionary::always_strong_oops_do reports the application
+      // SystemDictionary::oops_do reports the application
       // class loader as a root. We want this root to be reported as
       // a root kind of "OTHER" rather than "SYSTEM_CLASS".
       if (!o->is_instance() || !InstanceKlass::cast(o->klass())->is_mirror_instance_klass()) {
@@ -3003,7 +3003,7 @@
 
   // Preloaded classes and loader from the system dictionary
   blk.set_kind(JVMTI_HEAP_REFERENCE_SYSTEM_CLASS);
-  SystemDictionary::always_strong_oops_do(&blk);
+  SystemDictionary::oops_do(&blk);
   ClassLoaderDataGraph::always_strong_oops_do(&blk, false);
   if (blk.stopped()) {
     return false;
--- a/src/hotspot/share/runtime/arguments.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/arguments.cpp	Tue May 29 13:16:23 2018 -0700
@@ -3365,6 +3365,10 @@
   UNSUPPORTED_OPTION(TieredCompilation);
 #endif
 
+  if (!check_vm_args_consistency()) {
+    return JNI_ERR;
+  }
+
 #if INCLUDE_JVMCI
   if (EnableJVMCI &&
       !create_numbered_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
@@ -3372,10 +3376,6 @@
   }
 #endif
 
-  if (!check_vm_args_consistency()) {
-    return JNI_ERR;
-  }
-
 #if INCLUDE_JVMCI
   if (UseJVMCICompiler) {
     Compilation_mode = CompMode_server;
--- a/src/hotspot/share/runtime/flags/jvmFlag.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1504,3 +1504,12 @@
   FREE_C_HEAP_ARRAY(JVMFlag*, array);
 }
 
+void JVMFlag::printError(bool verbose, const char* msg, ...) {
+  if (verbose) {
+    va_list listPointer;
+    va_start(listPointer, msg);
+    jio_vfprintf(defaultStream::error_stream(), msg, listPointer);
+    va_end(listPointer);
+  }
+}
+
--- a/src/hotspot/share/runtime/flags/jvmFlag.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlag.hpp	Tue May 29 13:16:23 2018 -0700
@@ -276,6 +276,7 @@
 
   // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
   static void printFlags(outputStream* out, bool withComments, bool printRanges = false, bool skipDefaults = false);
+  static void printError(bool verbose, const char* msg, ...);
 
   static void verify() PRODUCT_RETURN;
 };
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,17 +31,15 @@
 #include "runtime/arguments.hpp"
 #include "runtime/flags/jvmFlag.hpp"
 #include "runtime/flags/jvmFlagConstraintsCompiler.hpp"
-#include "runtime/flags/jvmFlagRangeList.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/globals_extension.hpp"
-#include "utilities/defaultStream.hpp"
 
 JVMFlag::Error AliasLevelConstraintFunc(intx value, bool verbose) {
   if ((value <= 1) && (Arguments::mode() == Arguments::_comp || Arguments::mode() == Arguments::_mixed)) {
-    CommandLineError::print(verbose,
-                            "AliasLevel (" INTX_FORMAT ") is not "
-                            "compatible with -Xcomp or -Xmixed\n",
-                            value);
+    JVMFlag::printError(verbose,
+                        "AliasLevel (" INTX_FORMAT ") is not "
+                        "compatible with -Xcomp or -Xmixed\n",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -82,10 +80,10 @@
   min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT);
 
   if (value < (intx)min_number_of_compiler_threads) {
-    CommandLineError::print(verbose,
-                            "CICompilerCount (" INTX_FORMAT ") must be "
-                            "at least %d \n",
-                            value, min_number_of_compiler_threads);
+    JVMFlag::printError(verbose,
+                        "CICompilerCount (" INTX_FORMAT ") must be "
+                        "at least %d \n",
+                        value, min_number_of_compiler_threads);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -94,10 +92,10 @@
 
 JVMFlag::Error AllocatePrefetchDistanceConstraintFunc(intx value, bool verbose) {
   if (value < 0 || value > 512) {
-    CommandLineError::print(verbose,
-                            "AllocatePrefetchDistance (" INTX_FORMAT ") must be "
-                            "between 0 and " INTX_FORMAT "\n",
-                            AllocatePrefetchDistance, 512);
+    JVMFlag::printError(verbose,
+                        "AllocatePrefetchDistance (" INTX_FORMAT ") must be "
+                        "between 0 and " INTX_FORMAT "\n",
+                        AllocatePrefetchDistance, 512);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -107,9 +105,9 @@
 JVMFlag::Error AllocatePrefetchStepSizeConstraintFunc(intx value, bool verbose) {
   if (AllocatePrefetchStyle == 3) {
     if (value % wordSize != 0) {
-      CommandLineError::print(verbose,
-                              "AllocatePrefetchStepSize (" INTX_FORMAT ") must be multiple of %d\n",
-                              value, wordSize);
+      JVMFlag::printError(verbose,
+                          "AllocatePrefetchStepSize (" INTX_FORMAT ") must be multiple of %d\n",
+                          value, wordSize);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -124,9 +122,9 @@
   max_value = 3;
 #endif
   if (value < 0 || value > max_value) {
-    CommandLineError::print(verbose,
-                            "AllocatePrefetchInstr (" INTX_FORMAT ") must be "
-                            "between 0 and " INTX_FORMAT "\n", value, max_value);
+    JVMFlag::printError(verbose,
+                        "AllocatePrefetchInstr (" INTX_FORMAT ") must be "
+                        "between 0 and " INTX_FORMAT "\n", value, max_value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -135,11 +133,11 @@
 
 JVMFlag::Error CompileThresholdConstraintFunc(intx value, bool verbose) {
   if (value < 0 || value > INT_MAX >> InvocationCounter::count_shift) {
-    CommandLineError::print(verbose,
-                            "CompileThreshold (" INTX_FORMAT ") "
-                            "must be between 0 and %d\n",
-                            value,
-                            INT_MAX >> InvocationCounter::count_shift);
+    JVMFlag::printError(verbose,
+                        "CompileThreshold (" INTX_FORMAT ") "
+                        "must be between 0 and %d\n",
+                        value,
+                        INT_MAX >> InvocationCounter::count_shift);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -150,10 +148,10 @@
   int backward_branch_limit;
   if (ProfileInterpreter) {
     if (OnStackReplacePercentage < InterpreterProfilePercentage) {
-      CommandLineError::print(verbose,
-                              "OnStackReplacePercentage (" INTX_FORMAT ") must be "
-                              "larger than InterpreterProfilePercentage (" INTX_FORMAT ")\n",
-                              OnStackReplacePercentage, InterpreterProfilePercentage);
+      JVMFlag::printError(verbose,
+                          "OnStackReplacePercentage (" INTX_FORMAT ") must be "
+                          "larger than InterpreterProfilePercentage (" INTX_FORMAT ")\n",
+                          OnStackReplacePercentage, InterpreterProfilePercentage);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
 
@@ -161,20 +159,20 @@
                             << InvocationCounter::count_shift;
 
     if (backward_branch_limit < 0) {
-      CommandLineError::print(verbose,
-                              "CompileThreshold * (InterpreterProfilePercentage - OnStackReplacePercentage) / 100 = "
-                              INTX_FORMAT " "
-                              "must be between 0 and " INTX_FORMAT ", try changing "
-                              "CompileThreshold, InterpreterProfilePercentage, and/or OnStackReplacePercentage\n",
-                              (CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100,
-                              INT_MAX >> InvocationCounter::count_shift);
+      JVMFlag::printError(verbose,
+                          "CompileThreshold * (InterpreterProfilePercentage - OnStackReplacePercentage) / 100 = "
+                          INTX_FORMAT " "
+                          "must be between 0 and " INTX_FORMAT ", try changing "
+                          "CompileThreshold, InterpreterProfilePercentage, and/or OnStackReplacePercentage\n",
+                          (CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100,
+                          INT_MAX >> InvocationCounter::count_shift);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   } else {
     if (OnStackReplacePercentage < 0 ) {
-      CommandLineError::print(verbose,
-                              "OnStackReplacePercentage (" INTX_FORMAT ") must be "
-                              "non-negative\n", OnStackReplacePercentage);
+      JVMFlag::printError(verbose,
+                          "OnStackReplacePercentage (" INTX_FORMAT ") must be "
+                          "non-negative\n", OnStackReplacePercentage);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
 
@@ -182,12 +180,12 @@
                             << InvocationCounter::count_shift;
 
     if (backward_branch_limit < 0) {
-      CommandLineError::print(verbose,
-                              "CompileThreshold * OnStackReplacePercentage / 100 = " INTX_FORMAT " "
-                              "must be between 0 and " INTX_FORMAT ", try changing "
-                              "CompileThreshold and/or OnStackReplacePercentage\n",
-                              (CompileThreshold * OnStackReplacePercentage) / 100,
-                              INT_MAX >> InvocationCounter::count_shift);
+      JVMFlag::printError(verbose,
+                          "CompileThreshold * OnStackReplacePercentage / 100 = " INTX_FORMAT " "
+                          "must be between 0 and " INTX_FORMAT ", try changing "
+                          "CompileThreshold and/or OnStackReplacePercentage\n",
+                          (CompileThreshold * OnStackReplacePercentage) / 100,
+                          INT_MAX >> InvocationCounter::count_shift);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
@@ -196,29 +194,29 @@
 
 JVMFlag::Error CodeCacheSegmentSizeConstraintFunc(uintx value, bool verbose) {
   if (CodeCacheSegmentSize < (uintx)CodeEntryAlignment) {
-    CommandLineError::print(verbose,
-                            "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
-                            "larger than or equal to CodeEntryAlignment (" INTX_FORMAT ") "
-                            "to align entry points\n",
-                            CodeCacheSegmentSize, CodeEntryAlignment);
+    JVMFlag::printError(verbose,
+                        "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
+                        "larger than or equal to CodeEntryAlignment (" INTX_FORMAT ") "
+                        "to align entry points\n",
+                        CodeCacheSegmentSize, CodeEntryAlignment);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
   if (CodeCacheSegmentSize < sizeof(jdouble)) {
-    CommandLineError::print(verbose,
-                            "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
-                            "at least " SIZE_FORMAT " to align constants\n",
-                            CodeCacheSegmentSize, sizeof(jdouble));
+    JVMFlag::printError(verbose,
+                        "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
+                        "at least " SIZE_FORMAT " to align constants\n",
+                        CodeCacheSegmentSize, sizeof(jdouble));
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
 #ifdef COMPILER2
   if (CodeCacheSegmentSize < (uintx)OptoLoopAlignment) {
-    CommandLineError::print(verbose,
-                            "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
-                            "larger than or equal to OptoLoopAlignment (" INTX_FORMAT ") "
-                            "to align inner loops\n",
-                            CodeCacheSegmentSize, OptoLoopAlignment);
+    JVMFlag::printError(verbose,
+                        "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
+                        "larger than or equal to OptoLoopAlignment (" INTX_FORMAT ") "
+                        "to align inner loops\n",
+                        CodeCacheSegmentSize, OptoLoopAlignment);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 #endif
@@ -230,11 +228,11 @@
 #ifdef SOLARIS
   if ((value < MinimumPriority || value > MaximumPriority) &&
       (value != -1) && (value != -FXCriticalPriority)) {
-    CommandLineError::print(verbose,
-                            "CompileThreadPriority (" INTX_FORMAT ") must be "
-                            "between %d and %d inclusively or -1 (means no change) "
-                            "or %d (special value for critical thread class/priority)\n",
-                            value, MinimumPriority, MaximumPriority, -FXCriticalPriority);
+    JVMFlag::printError(verbose,
+                        "CompileThreadPriority (" INTX_FORMAT ") must be "
+                        "between %d and %d inclusively or -1 (means no change) "
+                        "or %d (special value for critical thread class/priority)\n",
+                        value, MinimumPriority, MaximumPriority, -FXCriticalPriority);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 #endif
@@ -245,25 +243,25 @@
 JVMFlag::Error CodeEntryAlignmentConstraintFunc(intx value, bool verbose) {
 #ifdef SPARC
   if (CodeEntryAlignment % relocInfo::addr_unit() != 0) {
-    CommandLineError::print(verbose,
-                            "CodeEntryAlignment (" INTX_FORMAT ") must be "
-                            "multiple of NOP size\n", CodeEntryAlignment);
+    JVMFlag::printError(verbose,
+                        "CodeEntryAlignment (" INTX_FORMAT ") must be "
+                        "multiple of NOP size\n", CodeEntryAlignment);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 #endif
 
   if (!is_power_of_2(value)) {
-    CommandLineError::print(verbose,
-                            "CodeEntryAlignment (" INTX_FORMAT ") must be "
-                            "a power of two\n", CodeEntryAlignment);
+    JVMFlag::printError(verbose,
+                        "CodeEntryAlignment (" INTX_FORMAT ") must be "
+                        "a power of two\n", CodeEntryAlignment);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
   if (CodeEntryAlignment < 16) {
-      CommandLineError::print(verbose,
-                              "CodeEntryAlignment (" INTX_FORMAT ") must be "
-                              "greater than or equal to %d\n",
-                              CodeEntryAlignment, 16);
+      JVMFlag::printError(verbose,
+                          "CodeEntryAlignment (" INTX_FORMAT ") must be "
+                          "greater than or equal to %d\n",
+                          CodeEntryAlignment, 16);
       return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -272,20 +270,20 @@
 
 JVMFlag::Error OptoLoopAlignmentConstraintFunc(intx value, bool verbose) {
   if (!is_power_of_2(value)) {
-    CommandLineError::print(verbose,
-                            "OptoLoopAlignment (" INTX_FORMAT ") "
-                            "must be a power of two\n",
-                            value);
+    JVMFlag::printError(verbose,
+                        "OptoLoopAlignment (" INTX_FORMAT ") "
+                        "must be a power of two\n",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
   // Relevant on ppc, s390, sparc. Will be optimized where
   // addr_unit() == 1.
   if (OptoLoopAlignment % relocInfo::addr_unit() != 0) {
-    CommandLineError::print(verbose,
-                            "OptoLoopAlignment (" INTX_FORMAT ") must be "
-                            "multiple of NOP size (%d)\n",
-                            value, relocInfo::addr_unit());
+    JVMFlag::printError(verbose,
+                        "OptoLoopAlignment (" INTX_FORMAT ") must be "
+                        "multiple of NOP size (%d)\n",
+                        value, relocInfo::addr_unit());
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -294,9 +292,9 @@
 
 JVMFlag::Error ArraycopyDstPrefetchDistanceConstraintFunc(uintx value, bool verbose) {
   if (value >= 4032) {
-    CommandLineError::print(verbose,
-                            "ArraycopyDstPrefetchDistance (" UINTX_FORMAT ") must be"
-                            "between 0 and 4031\n", value);
+    JVMFlag::printError(verbose,
+                        "ArraycopyDstPrefetchDistance (" UINTX_FORMAT ") must be"
+                        "between 0 and 4031\n", value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -305,9 +303,9 @@
 
 JVMFlag::Error ArraycopySrcPrefetchDistanceConstraintFunc(uintx value, bool verbose) {
   if (value >= 4032) {
-    CommandLineError::print(verbose,
-                            "ArraycopySrcPrefetchDistance (" UINTX_FORMAT ") must be"
-                            "between 0 and 4031\n", value);
+    JVMFlag::printError(verbose,
+                        "ArraycopySrcPrefetchDistance (" UINTX_FORMAT ") must be"
+                        "between 0 and 4031\n", value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -317,9 +315,9 @@
 JVMFlag::Error TypeProfileLevelConstraintFunc(uintx value, bool verbose) {
   for (int i = 0; i < 3; i++) {
     if (value % 10 > 2) {
-      CommandLineError::print(verbose,
-                              "Invalid value (" UINTX_FORMAT ") "
-                              "in TypeProfileLevel at position %d\n", value, i);
+      JVMFlag::printError(verbose,
+                          "Invalid value (" UINTX_FORMAT ") "
+                          "in TypeProfileLevel at position %d\n", value, i);
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
     value = value / 10;
@@ -339,26 +337,26 @@
 #ifdef COMPILER2
 JVMFlag::Error InteriorEntryAlignmentConstraintFunc(intx value, bool verbose) {
   if (InteriorEntryAlignment > CodeEntryAlignment) {
-    CommandLineError::print(verbose,
-                           "InteriorEntryAlignment (" INTX_FORMAT ") must be "
-                           "less than or equal to CodeEntryAlignment (" INTX_FORMAT ")\n",
-                           InteriorEntryAlignment, CodeEntryAlignment);
+    JVMFlag::printError(verbose,
+                       "InteriorEntryAlignment (" INTX_FORMAT ") must be "
+                       "less than or equal to CodeEntryAlignment (" INTX_FORMAT ")\n",
+                       InteriorEntryAlignment, CodeEntryAlignment);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
 #ifdef SPARC
   if (InteriorEntryAlignment % relocInfo::addr_unit() != 0) {
-    CommandLineError::print(verbose,
-                            "InteriorEntryAlignment (" INTX_FORMAT ") must be "
-                            "multiple of NOP size\n");
+    JVMFlag::printError(verbose,
+                        "InteriorEntryAlignment (" INTX_FORMAT ") must be "
+                        "multiple of NOP size\n");
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 #endif
 
   if (!is_power_of_2(value)) {
-     CommandLineError::print(verbose,
-                             "InteriorEntryAlignment (" INTX_FORMAT ") must be "
-                             "a power of two\n", InteriorEntryAlignment);
+     JVMFlag::printError(verbose,
+                         "InteriorEntryAlignment (" INTX_FORMAT ") must be "
+                         "a power of two\n", InteriorEntryAlignment);
      return JVMFlag::VIOLATES_CONSTRAINT;
    }
 
@@ -370,10 +368,10 @@
 #endif
 
   if (InteriorEntryAlignment < minimum_alignment) {
-    CommandLineError::print(verbose,
-                            "InteriorEntryAlignment (" INTX_FORMAT ") must be "
-                            "greater than or equal to %d\n",
-                            InteriorEntryAlignment, minimum_alignment);
+    JVMFlag::printError(verbose,
+                        "InteriorEntryAlignment (" INTX_FORMAT ") must be "
+                        "greater than or equal to %d\n",
+                        InteriorEntryAlignment, minimum_alignment);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -382,10 +380,10 @@
 
 JVMFlag::Error NodeLimitFudgeFactorConstraintFunc(intx value, bool verbose) {
   if (value < MaxNodeLimit * 2 / 100 || value > MaxNodeLimit * 40 / 100) {
-    CommandLineError::print(verbose,
-                            "NodeLimitFudgeFactor must be between 2%% and 40%% "
-                            "of MaxNodeLimit (" INTX_FORMAT ")\n",
-                            MaxNodeLimit);
+    JVMFlag::printError(verbose,
+                        "NodeLimitFudgeFactor must be between 2%% and 40%% "
+                        "of MaxNodeLimit (" INTX_FORMAT ")\n",
+                        MaxNodeLimit);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
 
@@ -396,10 +394,10 @@
 JVMFlag::Error RTMTotalCountIncrRateConstraintFunc(int value, bool verbose) {
 #if INCLUDE_RTM_OPT
   if (UseRTMLocking && !is_power_of_2(RTMTotalCountIncrRate)) {
-    CommandLineError::print(verbose,
-                            "RTMTotalCountIncrRate (" INTX_FORMAT
-                            ") must be a power of 2, resetting it to 64\n",
-                            RTMTotalCountIncrRate);
+    JVMFlag::printError(verbose,
+                        "RTMTotalCountIncrRate (" INTX_FORMAT
+                        ") must be a power of 2, resetting it to 64\n",
+                        RTMTotalCountIncrRate);
     FLAG_SET_DEFAULT(RTMTotalCountIncrRate, 64);
   }
 #endif
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,26 +26,24 @@
 #include "runtime/arguments.hpp"
 #include "runtime/flags/jvmFlag.hpp"
 #include "runtime/flags/jvmFlagConstraintsRuntime.hpp"
-#include "runtime/flags/jvmFlagRangeList.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/safepointMechanism.hpp"
 #include "runtime/task.hpp"
-#include "utilities/defaultStream.hpp"
 
 JVMFlag::Error ObjectAlignmentInBytesConstraintFunc(intx value, bool verbose) {
   if (!is_power_of_2(value)) {
-    CommandLineError::print(verbose,
-                            "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
-                            "power of 2\n",
-                            value);
+    JVMFlag::printError(verbose,
+                        "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
+                        "power of 2\n",
+                        value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   // In case page size is very small.
   if (value >= (intx)os::vm_page_size()) {
-    CommandLineError::print(verbose,
-                            "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
-                            "less than page size (" INTX_FORMAT ")\n",
-                            value, (intx)os::vm_page_size());
+    JVMFlag::printError(verbose,
+                        "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
+                        "less than page size (" INTX_FORMAT ")\n",
+                        value, (intx)os::vm_page_size());
     return JVMFlag::VIOLATES_CONSTRAINT;
   }
   return JVMFlag::SUCCESS;
@@ -55,10 +53,10 @@
 // It is sufficient to check against the largest type size.
 JVMFlag::Error ContendedPaddingWidthConstraintFunc(intx value, bool verbose) {
   if ((value % BytesPerLong) != 0) {
-    CommandLineError::print(verbose,
-                            "ContendedPaddingWidth (" INTX_FORMAT ") must be "
-                            "a multiple of %d\n",
-                            value, BytesPerLong);
+    JVMFlag::printError(verbose,
+                        "ContendedPaddingWidth (" INTX_FORMAT ") must be "
+                        "a multiple of %d\n",
+                        value, BytesPerLong);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -67,10 +65,10 @@
 
 JVMFlag::Error BiasedLockingBulkRebiasThresholdFunc(intx value, bool verbose) {
   if (value > BiasedLockingBulkRevokeThreshold) {
-    CommandLineError::print(verbose,
-                            "BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ") must be "
-                            "less than or equal to BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")\n",
-                            value, BiasedLockingBulkRevokeThreshold);
+    JVMFlag::printError(verbose,
+                        "BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ") must be "
+                        "less than or equal to BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")\n",
+                        value, BiasedLockingBulkRevokeThreshold);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -79,10 +77,10 @@
 
 JVMFlag::Error BiasedLockingStartupDelayFunc(intx value, bool verbose) {
   if ((value % PeriodicTask::interval_gran) != 0) {
-    CommandLineError::print(verbose,
-                            "BiasedLockingStartupDelay (" INTX_FORMAT ") must be "
-                            "evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n",
-                            value, PeriodicTask::interval_gran);
+    JVMFlag::printError(verbose,
+                        "BiasedLockingStartupDelay (" INTX_FORMAT ") must be "
+                        "evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n",
+                        value, PeriodicTask::interval_gran);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -91,17 +89,17 @@
 
 JVMFlag::Error BiasedLockingBulkRevokeThresholdFunc(intx value, bool verbose) {
   if (value < BiasedLockingBulkRebiasThreshold) {
-    CommandLineError::print(verbose,
-                            "BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ") must be "
-                            "greater than or equal to BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")\n",
-                            value, BiasedLockingBulkRebiasThreshold);
+    JVMFlag::printError(verbose,
+                        "BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ") must be "
+                        "greater than or equal to BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")\n",
+                        value, BiasedLockingBulkRebiasThreshold);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else if ((double)value/(double)BiasedLockingDecayTime > 0.1) {
-    CommandLineError::print(verbose,
-                            "The ratio of BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")"
-                            " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
-                            "less than or equal to 0.1\n",
-                            value, BiasedLockingBulkRebiasThreshold);
+    JVMFlag::printError(verbose,
+                        "The ratio of BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")"
+                        " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
+                        "less than or equal to 0.1\n",
+                        value, BiasedLockingBulkRebiasThreshold);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -110,11 +108,11 @@
 
 JVMFlag::Error BiasedLockingDecayTimeFunc(intx value, bool verbose) {
   if (BiasedLockingBulkRebiasThreshold/(double)value > 0.1) {
-    CommandLineError::print(verbose,
-                            "The ratio of BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")"
-                            " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
-                            "less than or equal to 0.1\n",
-                            BiasedLockingBulkRebiasThreshold, value);
+    JVMFlag::printError(verbose,
+                        "The ratio of BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")"
+                        " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
+                        "less than or equal to 0.1\n",
+                        BiasedLockingBulkRebiasThreshold, value);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -123,10 +121,10 @@
 
 JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) {
   if ((value % PeriodicTask::interval_gran != 0)) {
-    CommandLineError::print(verbose,
-                            "PerfDataSamplingInterval (" INTX_FORMAT ") must be "
-                            "evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n",
-                            value, PeriodicTask::interval_gran);
+    JVMFlag::printError(verbose,
+                        "PerfDataSamplingInterval (" INTX_FORMAT ") must be "
+                        "evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n",
+                        value, PeriodicTask::interval_gran);
     return JVMFlag::VIOLATES_CONSTRAINT;
   } else {
     return JVMFlag::SUCCESS;
@@ -136,7 +134,7 @@
 JVMFlag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose) {
   if (value) {
     if (!SafepointMechanism::supports_thread_local_poll()) {
-      CommandLineError::print(verbose, "ThreadLocalHandshakes not yet supported on this platform\n");
+      JVMFlag::printError(verbose, "ThreadLocalHandshakes not yet supported on this platform\n");
       return JVMFlag::VIOLATES_CONSTRAINT;
     }
   }
--- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,18 +35,8 @@
 #include "runtime/globals_extension.hpp"
 #include "runtime/os.hpp"
 #include "runtime/task.hpp"
-#include "utilities/defaultStream.hpp"
 #include "utilities/macros.hpp"
 
-void CommandLineError::print(bool verbose, const char* msg, ...) {
-  if (verbose) {
-    va_list listPointer;
-    va_start(listPointer, msg);
-    jio_vfprintf(defaultStream::error_stream(), msg, listPointer);
-    va_end(listPointer);
-  }
-}
-
 class JVMFlagRange_int : public JVMFlagRange {
   int _min;
   int _max;
@@ -63,10 +53,10 @@
 
   JVMFlag::Error check_int(int value, bool verbose = true) {
     if ((value < _min) || (value > _max)) {
-      CommandLineError::print(verbose,
-                              "int %s=%d is outside the allowed range "
-                              "[ %d ... %d ]\n",
-                              name(), value, _min, _max);
+      JVMFlag::printError(verbose,
+                          "int %s=%d is outside the allowed range "
+                          "[ %d ... %d ]\n",
+                          name(), value, _min, _max);
       return JVMFlag::OUT_OF_BOUNDS;
     } else {
       return JVMFlag::SUCCESS;
@@ -93,10 +83,10 @@
 
   JVMFlag::Error check_intx(intx value, bool verbose = true) {
     if ((value < _min) || (value > _max)) {
-      CommandLineError::print(verbose,
-                              "intx %s=" INTX_FORMAT " is outside the allowed range "
-                              "[ " INTX_FORMAT " ... " INTX_FORMAT " ]\n",
-                              name(), value, _min, _max);
+      JVMFlag::printError(verbose,
+                          "intx %s=" INTX_FORMAT " is outside the allowed range "
+                          "[ " INTX_FORMAT " ... " INTX_FORMAT " ]\n",
+                          name(), value, _min, _max);
       return JVMFlag::OUT_OF_BOUNDS;
     } else {
       return JVMFlag::SUCCESS;
@@ -124,10 +114,10 @@
 
   JVMFlag::Error check_uint(uint value, bool verbose = true) {
     if ((value < _min) || (value > _max)) {
-      CommandLineError::print(verbose,
-                              "uint %s=%u is outside the allowed range "
-                              "[ %u ... %u ]\n",
-                              name(), value, _min, _max);
+      JVMFlag::printError(verbose,
+                          "uint %s=%u is outside the allowed range "
+                          "[ %u ... %u ]\n",
+                          name(), value, _min, _max);
       return JVMFlag::OUT_OF_BOUNDS;
     } else {
       return JVMFlag::SUCCESS;
@@ -155,10 +145,10 @@
 
   JVMFlag::Error check_uintx(uintx value, bool verbose = true) {
     if ((value < _min) || (value > _max)) {
-      CommandLineError::print(verbose,
-                              "uintx %s=" UINTX_FORMAT " is outside the allowed range "
-                              "[ " UINTX_FORMAT " ... " UINTX_FORMAT " ]\n",
-                              name(), value, _min, _max);
+      JVMFlag::printError(verbose,
+                          "uintx %s=" UINTX_FORMAT " is outside the allowed range "
+                          "[ " UINTX_FORMAT " ... " UINTX_FORMAT " ]\n",
+                          name(), value, _min, _max);
       return JVMFlag::OUT_OF_BOUNDS;
     } else {
       return JVMFlag::SUCCESS;
@@ -186,10 +176,10 @@
 
   JVMFlag::Error check_uint64_t(uint64_t value, bool verbose = true) {
     if ((value < _min) || (value > _max)) {
-      CommandLineError::print(verbose,
-                              "uint64_t %s=" UINT64_FORMAT " is outside the allowed range "
-                              "[ " UINT64_FORMAT " ... " UINT64_FORMAT " ]\n",
-                              name(), value, _min, _max);
+      JVMFlag::printError(verbose,
+                          "uint64_t %s=" UINT64_FORMAT " is outside the allowed range "
+                          "[ " UINT64_FORMAT " ... " UINT64_FORMAT " ]\n",
+                          name(), value, _min, _max);
       return JVMFlag::OUT_OF_BOUNDS;
     } else {
       return JVMFlag::SUCCESS;
@@ -217,10 +207,10 @@
 
   JVMFlag::Error check_size_t(size_t value, bool verbose = true) {
     if ((value < _min) || (value > _max)) {
-      CommandLineError::print(verbose,
-                              "size_t %s=" SIZE_FORMAT " is outside the allowed range "
-                              "[ " SIZE_FORMAT " ... " SIZE_FORMAT " ]\n",
-                              name(), value, _min, _max);
+      JVMFlag::printError(verbose,
+                          "size_t %s=" SIZE_FORMAT " is outside the allowed range "
+                          "[ " SIZE_FORMAT " ... " SIZE_FORMAT " ]\n",
+                          name(), value, _min, _max);
       return JVMFlag::OUT_OF_BOUNDS;
     } else {
       return JVMFlag::SUCCESS;
@@ -248,10 +238,10 @@
 
   JVMFlag::Error check_double(double value, bool verbose = true) {
     if ((value < _min) || (value > _max)) {
-      CommandLineError::print(verbose,
-                              "double %s=%f is outside the allowed range "
-                              "[ %f ... %f ]\n",
-                              name(), value, _min, _max);
+      JVMFlag::printError(verbose,
+                          "double %s=%f is outside the allowed range "
+                          "[ %f ... %f ]\n",
+                          name(), value, _min, _max);
       return JVMFlag::OUT_OF_BOUNDS;
     } else {
       return JVMFlag::SUCCESS;
@@ -432,7 +422,6 @@
 }
 
 bool JVMFlagRangeList::check_ranges() {
-  // Check ranges.
   bool status = true;
   for (int i=0; i<length(); i++) {
     JVMFlagRange* range = at(i);
--- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlagRangeList.hpp	Tue May 29 13:16:23 2018 -0700
@@ -39,11 +39,6 @@
  * then we need to use constraint instead.
  */
 
-class CommandLineError : public AllStatic {
-public:
-  static void print(bool verbose, const char* msg, ...);
-};
-
 class JVMFlagRange : public CHeapObj<mtArguments> {
 private:
   const char* _name;
--- a/src/hotspot/share/runtime/globals.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/globals.cpp	Tue May 29 13:16:23 2018 -0700
@@ -32,7 +32,6 @@
 #include "runtime/globals_extension.hpp"
 #include "runtime/flags/jvmFlagConstraintList.hpp"
 #include "runtime/flags/jvmFlagWriteableList.hpp"
-#include "runtime/flags/jvmFlagRangeList.hpp"
 #include "runtime/os.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "utilities/defaultStream.hpp"
--- a/src/hotspot/share/runtime/mutex.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/mutex.cpp	Tue May 29 13:16:23 2018 -0700
@@ -903,7 +903,7 @@
   }
 #endif // CHECK_UNHANDLED_OOPS
 
-  debug_only(check_prelock_state(Self));
+  debug_only(check_prelock_state(Self, StrictSafepointChecks));
   assert(_owner != Self, "invariant");
   assert(_OnDeck != Self->_MutexEvent, "invariant");
 
@@ -971,7 +971,7 @@
 
 bool Monitor::try_lock() {
   Thread * const Self = Thread::current();
-  debug_only(check_prelock_state(Self));
+  debug_only(check_prelock_state(Self, false));
   // assert(!thread->is_inside_signal_handler(), "don't lock inside signal handler");
 
   // Special case, where all Java threads are stopped.
@@ -1381,10 +1381,10 @@
 
 
 // Factored out common sanity checks for locking mutex'es. Used by lock() and try_lock()
-void Monitor::check_prelock_state(Thread *thread) {
-  assert((!thread->is_Java_thread() || ((JavaThread *)thread)->thread_state() == _thread_in_vm)
-         || rank() == Mutex::special, "wrong thread state for using locks");
-  if (StrictSafepointChecks) {
+void Monitor::check_prelock_state(Thread *thread, bool safepoint_check) {
+  if (safepoint_check) {
+    assert((!thread->is_Java_thread() || ((JavaThread *)thread)->thread_state() == _thread_in_vm)
+           || rank() == Mutex::special, "wrong thread state for using locks");
     if (thread->is_VM_thread() && !allow_vm_block()) {
       fatal("VM thread using lock %s (not allowed to block on)", name());
     }
--- a/src/hotspot/share/runtime/mutex.hpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/runtime/mutex.hpp	Tue May 29 13:16:23 2018 -0700
@@ -144,7 +144,7 @@
 #endif
 
   void set_owner_implementation(Thread* owner)                        PRODUCT_RETURN;
-  void check_prelock_state     (Thread* thread)                       PRODUCT_RETURN;
+  void check_prelock_state     (Thread* thread, bool safepoint_check) PRODUCT_RETURN;
   void check_block_state       (Thread* thread)                       PRODUCT_RETURN;
 
   // platform-dependent support code can go here (in os_<os_family>.cpp)
--- a/src/hotspot/share/services/threadService.cpp	Sat May 26 20:29:15 2018 -0700
+++ b/src/hotspot/share/services/threadService.cpp	Tue May 29 13:16:23 2018 -0700
@@ -675,15 +675,15 @@
   // dump all locked concurrent locks
   assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped");
 
-  ResourceMark rm;
-
-  GrowableArray<oop>* aos_objects = new GrowableArray<oop>(INITIAL_ARRAY_SIZE);
+  GrowableArray<oop>* aos_objects = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<oop>(INITIAL_ARRAY_SIZE, true /* C_heap */);
 
   // Find all instances of AbstractOwnableSynchronizer
   HeapInspection::find_instances_at_safepoint(SystemDictionary::abstract_ownable_synchronizer_klass(),
                                                 aos_objects);
   // Build a map of thread to its owned AQS locks
   build_map(aos_objects);
+
+  delete aos_objects;
 }
 
 
--- a/src/java.base/share/classes/java/lang/ref/Reference.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/java.base/share/classes/java/lang/ref/Reference.java	Tue May 29 13:16:23 2018 -0700
@@ -43,71 +43,146 @@
 
 public abstract class Reference<T> {
 
-    /* A Reference instance is in one of four possible internal states:
+    /* The state of a Reference object is characterized by two attributes.  It
+     * may be either "active", "pending", or "inactive".  It may also be
+     * either "registered", "enqueued", "dequeued", or "unregistered".
+     *
+     *   Active: Subject to special treatment by the garbage collector.  Some
+     *   time after the collector detects that the reachability of the
+     *   referent has changed to the appropriate state, the collector
+     *   "notifies" the reference, changing the state to either "pending" or
+     *   "inactive".
+     *   referent != null; discovered = null, or in GC discovered list.
      *
-     *     Active: Subject to special treatment by the garbage collector.  Some
-     *     time after the collector detects that the reachability of the
-     *     referent has changed to the appropriate state, it changes the
-     *     instance's state to either Pending or Inactive, depending upon
-     *     whether or not the instance was registered with a queue when it was
-     *     created.  In the former case it also adds the instance to the
-     *     pending-Reference list.  Newly-created instances are Active.
+     *   Pending: An element of the pending-Reference list, waiting to be
+     *   processed by the ReferenceHandler thread.  The pending-Reference
+     *   list is linked through the discovered fields of references in the
+     *   list.
+     *   referent = null; discovered = next element in pending-Reference list.
+     *
+     *   Inactive: Neither Active nor Pending.
+     *   referent = null.
+     *
+     *   Registered: Associated with a queue when created, and not yet added
+     *   to the queue.
+     *   queue = the associated queue.
      *
-     *     Pending: An element of the pending-Reference list, waiting to be
-     *     enqueued by the Reference-handler thread.  Unregistered instances
-     *     are never in this state.
+     *   Enqueued: Added to the associated queue, and not yet removed.
+     *   queue = ReferenceQueue.ENQUEUE; next = next entry in list, or this to
+     *   indicate end of list.
+     *
+     *   Dequeued: Added to the associated queue and then removed.
+     *   queue = ReferenceQueue.NULL; next = this.
+     *
+     *   Unregistered: Not associated with a queue when created.
+     *   queue = ReferenceQueue.NULL.
      *
-     *     Enqueued: An element of the queue with which the instance was
-     *     registered when it was created.  When an instance is removed from
-     *     its ReferenceQueue, it is made Inactive.  Unregistered instances are
-     *     never in this state.
+     * The collector only needs to examine the referent field and the
+     * discovered field to determine whether a (non-FinalReference) Reference
+     * object needs special treatment.  If the referent is non-null and not
+     * known to be live, then it may need to be discovered for possible later
+     * notification.  But if the discovered field is non-null, then it has
+     * already been discovered.
      *
-     *     Inactive: Nothing more to do.  Once an instance becomes Inactive its
-     *     state will never change again.
+     * FinalReference (which exists to support finalization) differs from
+     * other references, because a FinalReference is not cleared when
+     * notified.  The referent being null or not cannot be used to distinguish
+     * between the active state and pending or inactive states.  However,
+     * FinalReferences do not support enqueue().  Instead, the next field of a
+     * FinalReference object is set to "this" when it is added to the
+     * pending-Reference list.  The use of "this" as the value of next in the
+     * enqueued and dequeued states maintains the non-active state.  An
+     * additional check that the next field is null is required to determine
+     * that a FinalReference object is active.
      *
-     * The state is encoded in the queue and next fields as follows:
-     *
-     *     Active: queue = ReferenceQueue with which instance is registered, or
-     *     ReferenceQueue.NULL if it was not registered with a queue; next =
-     *     null.
+     * Initial states:
+     *   [active/registered]
+     *   [active/unregistered] [1]
      *
-     *     Pending: queue = ReferenceQueue with which instance is registered;
-     *     next = this
+     * Transitions:
+     *                            clear
+     *   [active/registered]     ------->   [inactive/registered]
+     *          |                                 |
+     *          |                                 | enqueue [2]
+     *          | GC              enqueue [2]     |
+     *          |                -----------------|
+     *          |                                 |
+     *          v                                 |
+     *   [pending/registered]    ---              v
+     *          |                   | ReferenceHandler
+     *          | enqueue [2]       |--->   [inactive/enqueued]
+     *          v                   |             |
+     *   [pending/enqueued]      ---              |
+     *          |                                 | poll/remove
+     *          | poll/remove                     |
+     *          |                                 |
+     *          v            ReferenceHandler     v
+     *   [pending/dequeued]      ------>    [inactive/dequeued]
      *
-     *     Enqueued: queue = ReferenceQueue.ENQUEUED; next = Following instance
-     *     in queue, or this if at end of list.
      *
-     *     Inactive: queue = ReferenceQueue.NULL; next = this.
+     *                           clear/enqueue/GC [3]
+     *   [active/unregistered]   ------
+     *          |                      |
+     *          | GC                   |
+     *          |                      |--> [inactive/unregistered]
+     *          v                      |
+     *   [pending/unregistered]  ------
+     *                           ReferenceHandler
+     *
+     * Terminal states:
+     *   [inactive/dequeued]
+     *   [inactive/unregistered]
      *
-     * With this scheme the collector need only examine the next field in order
-     * to determine whether a Reference instance requires special treatment: If
-     * the next field is null then the instance is active; if it is non-null,
-     * then the collector should treat the instance normally.
+     * Unreachable states (because enqueue also clears):
+     *   [active/enqeued]
+     *   [active/dequeued]
+     *
+     * [1] Unregistered is not permitted for FinalReferences.
      *
-     * To ensure that a concurrent collector can discover active Reference
-     * objects without interfering with application threads that may apply
-     * the enqueue() method to those objects, collectors should link
-     * discovered objects through the discovered field. The discovered
-     * field is also used for linking Reference objects in the pending list.
+     * [2] These transitions are not possible for FinalReferences, making
+     * [pending/enqueued] and [pending/dequeued] unreachable, and
+     * [inactive/registered] terminal.
+     *
+     * [3] The garbage collector may directly transition a Reference
+     * from [active/unregistered] to [inactive/unregistered],
+     * bypassing the pending-Reference list.
      */
 
     private T referent;         /* Treated specially by GC */
 
+    /* The queue this reference gets enqueued to by GC notification or by
+     * calling enqueue().
+     *
+     * When registered: the queue with which this reference is registered.
+     *        enqueued: ReferenceQueue.ENQUEUE
+     *        dequeued: ReferenceQueue.NULL
+     *    unregistered: ReferenceQueue.NULL
+     */
     volatile ReferenceQueue<? super T> queue;
 
-    /* When active:   NULL
-     *     pending:   this
-     *    Enqueued:   next reference in queue (or this if last)
-     *    Inactive:   this
+    /* The link in a ReferenceQueue's list of Reference objects.
+     *
+     * When registered: null
+     *        enqueued: next element in queue (or this if last)
+     *        dequeued: this (marking FinalReferences as inactive)
+     *    unregistered: null
      */
     @SuppressWarnings("rawtypes")
     volatile Reference next;
 
-    /* When active:   next element in a discovered reference list maintained by GC (or this if last)
-     *     pending:   next element in the pending list (or null if last)
-     *   otherwise:   NULL
+    /* Used by the garbage collector to accumulate Reference objects that need
+     * to be revisited in order to decide whether they should be notified.
+     * Also used as the link in the pending-Reference list.  The discovered
+     * field and the next field are distinct to allow the enqueue() method to
+     * be applied to a Reference object while it is either in the
+     * pending-Reference list or in the garbage collector's discovered set.
+     *
+     * When active: null or next element in a discovered reference list
+     *              maintained by the GC (or this if last)
+     *     pending: next element in the pending-Reference list (null if last)
+     *    inactive: null
      */
-    private transient Reference<T> discovered;  /* used by VM */
+    private transient Reference<T> discovered;
 
 
     /* High-priority thread to enqueue pending References
@@ -141,17 +216,17 @@
     }
 
     /*
-     * Atomically get and clear (set to null) the VM's pending list.
+     * Atomically get and clear (set to null) the VM's pending-Reference list.
      */
     private static native Reference<Object> getAndClearReferencePendingList();
 
     /*
-     * Test whether the VM's pending list contains any entries.
+     * Test whether the VM's pending-Reference list contains any entries.
      */
     private static native boolean hasReferencePendingList();
 
     /*
-     * Wait until the VM's pending list may be non-null.
+     * Wait until the VM's pending-Reference list may be non-null.
      */
     private static native void waitForReferencePendingList();
 
--- a/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,7 @@
                 return false;
             }
             assert queue == this;
+            // Self-loop end, so if a FinalReference it remains inactive.
             r.next = (head == null) ? r : head;
             head = r;
             queueLength++;
@@ -90,7 +91,10 @@
             // poll().  Volatiles ensure ordering.
             @SuppressWarnings("unchecked")
             Reference<? extends T> rn = r.next;
+            // Handle self-looped next as end of list designator.
             head = (rn == r) ? null : rn;
+            // Self-loop next rather than setting to null, so if a
+            // FinalReference it remains inactive.
             r.next = r;
             queueLength--;
             if (r instanceof FinalReference) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacScope.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacScope.java	Tue May 29 13:16:23 2018 -0700
@@ -31,6 +31,7 @@
 import javax.lang.model.element.TypeElement;
 
 import com.sun.tools.javac.code.Kinds.Kind;
+import com.sun.tools.javac.code.Scope.CompoundScope;
 import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.comp.AttrContext;
 import com.sun.tools.javac.comp.Env;
@@ -63,7 +64,10 @@
             return new JavacScope(env) {
                 @Override @DefinedBy(Api.COMPILER_TREE)
                 public Iterable<? extends Element> getLocalElements() {
-                    return env.toplevel.namedImportScope.getSymbols(VALIDATOR);
+                    CompoundScope result = new CompoundScope(env.toplevel.packge);
+                    result.prependSubScope(env.toplevel.toplevelScope);
+                    result.prependSubScope(env.toplevel.namedImportScope);
+                    return result.getSymbols(VALIDATOR);
                 }
             };
         } else {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java	Tue May 29 13:16:23 2018 -0700
@@ -1229,7 +1229,7 @@
         jcCompilationUnit.lineMap = jcCompilationUnit.getLineMap();
         jcCompilationUnit.modle = psym.modle;
         jcCompilationUnit.sourcefile = jfo;
-        jcCompilationUnit.namedImportScope = new NamedImportScope(psym, jcCompilationUnit.toplevelScope);
+        jcCompilationUnit.namedImportScope = new NamedImportScope(psym);
         jcCompilationUnit.packge = psym;
         jcCompilationUnit.starImportScope = new StarImportScope(psym);
         jcCompilationUnit.toplevelScope = WriteableScope.create(psym);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Tue May 29 13:16:23 2018 -0700
@@ -740,58 +740,91 @@
          * No further changes to class hierarchy or class content will be reflected.
          */
         public void finalizeScope() {
-            for (List<Scope> scopes = this.subScopes; scopes.nonEmpty(); scopes = scopes.tail) {
-                Scope impScope = scopes.head;
+            for (List<Scope> scopes = this.subScopes.toList(); scopes.nonEmpty(); scopes = scopes.tail) {
+                scopes.head = finalizeSingleScope(scopes.head);
+            }
+        }
+
+        protected Scope finalizeSingleScope(Scope impScope) {
+            if (impScope instanceof FilterImportScope && impScope.owner.kind == Kind.TYP) {
+                WriteableScope finalized = WriteableScope.create(impScope.owner);
 
-                if (impScope instanceof FilterImportScope && impScope.owner.kind == Kind.TYP) {
-                    WriteableScope finalized = WriteableScope.create(impScope.owner);
+                for (Symbol sym : impScope.getSymbols()) {
+                    finalized.enter(sym);
+                }
 
-                    for (Symbol sym : impScope.getSymbols()) {
-                        finalized.enter(sym);
+                finalized.listeners.add(new ScopeListener() {
+                    @Override
+                    public void symbolAdded(Symbol sym, Scope s) {
+                        Assert.error("The scope is sealed.");
                     }
 
-                    finalized.listeners.add(new ScopeListener() {
-                        @Override
-                        public void symbolAdded(Symbol sym, Scope s) {
-                            Assert.error("The scope is sealed.");
-                        }
+                    @Override
+                    public void symbolRemoved(Symbol sym, Scope s) {
+                        Assert.error("The scope is sealed.");
+                    }
+                });
 
-                        @Override
-                        public void symbolRemoved(Symbol sym, Scope s) {
-                            Assert.error("The scope is sealed.");
-                        }
-                    });
+                return finalized;
+            }
 
-                    scopes.head = finalized;
-                }
-            }
+            return impScope;
         }
 
     }
 
     public static class NamedImportScope extends ImportScope {
 
-        public NamedImportScope(Symbol owner, Scope currentFileScope) {
+        /*A cache for quick lookup of Scopes that may contain the given name.
+          ScopeImpl and Entry is not used, as it is maps names to Symbols,
+          but it is necessary to map names to Scopes at this place (so that any
+          changes to the content of the Scopes is reflected when looking up the
+          Symbols.
+         */
+        private final Map<Name, Scope[]> name2Scopes = new HashMap<>();
+
+        public NamedImportScope(Symbol owner) {
             super(owner);
-            prependSubScope(currentFileScope);
         }
 
         public Scope importByName(Types types, Scope origin, Name name, ImportFilter filter, JCImport imp, BiConsumer<JCImport, CompletionFailure> cfHandler) {
-            return appendScope(new FilterImportScope(types, origin, name, filter, imp, cfHandler));
+            return appendScope(new FilterImportScope(types, origin, name, filter, imp, cfHandler), name);
         }
 
         public Scope importType(Scope delegate, Scope origin, Symbol sym) {
-            return appendScope(new SingleEntryScope(delegate.owner, sym, origin));
+            return appendScope(new SingleEntryScope(delegate.owner, sym, origin), sym.name);
+        }
+
+        private Scope appendScope(Scope newScope, Name name) {
+            appendSubScope(newScope);
+            Scope[] existing = name2Scopes.get(name);
+            if (existing != null)
+                existing = Arrays.copyOf(existing, existing.length + 1);
+            else
+                existing = new Scope[1];
+            existing[existing.length - 1] = newScope;
+            name2Scopes.put(name, existing);
+            return newScope;
         }
 
-        private Scope appendScope(Scope newScope) {
-            List<Scope> existingScopes = this.subScopes.reverse();
-            subScopes = List.of(existingScopes.head);
-            subScopes = subScopes.prepend(newScope);
-            for (Scope s : existingScopes.tail) {
-                subScopes = subScopes.prepend(s);
+        @Override
+        public Iterable<Symbol> getSymbolsByName(Name name, Filter<Symbol> sf, LookupKind lookupKind) {
+            Scope[] scopes = name2Scopes.get(name);
+            if (scopes == null)
+                return Collections.emptyList();
+            return () -> Iterators.createCompoundIterator(Arrays.asList(scopes),
+                                                          scope -> scope.getSymbolsByName(name,
+                                                                                          sf,
+                                                                                          lookupKind)
+                                                                        .iterator());
+        }
+        public void finalizeScope() {
+            super.finalizeScope();
+            for (Scope[] scopes : name2Scopes.values()) {
+                for (int i = 0; i < scopes.length; i++) {
+                    scopes[i] = finalizeSingleScope(scopes[i]);
+                }
             }
-            return newScope;
         }
 
         private static class SingleEntryScope extends Scope {
@@ -977,7 +1010,7 @@
      */
     public static class CompoundScope extends Scope implements ScopeListener {
 
-        List<Scope> subScopes = List.nil();
+        ListBuffer<Scope> subScopes = new ListBuffer<>();
         private int mark = 0;
 
         public CompoundScope(Symbol owner) {
@@ -986,7 +1019,16 @@
 
         public void prependSubScope(Scope that) {
            if (that != null) {
-                subScopes = subScopes.prepend(that);
+                subScopes.prepend(that);
+                that.listeners.add(this);
+                mark++;
+                listeners.symbolAdded(null, this);
+           }
+        }
+
+        public void appendSubScope(Scope that) {
+           if (that != null) {
+                subScopes.append(that);
                 that.listeners.add(this);
                 mark++;
                 listeners.symbolAdded(null, this);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Tue May 29 13:16:23 2018 -0700
@@ -215,7 +215,7 @@
         localEnv.toplevel = tree;
         localEnv.enclClass = predefClassDef;
         tree.toplevelScope = WriteableScope.create(tree.packge);
-        tree.namedImportScope = new NamedImportScope(tree.packge, tree.toplevelScope);
+        tree.namedImportScope = new NamedImportScope(tree.packge);
         tree.starImportScope = new StarImportScope(tree.packge);
         localEnv.info.scope = tree.toplevelScope;
         localEnv.info.lint = lint;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Tue May 29 13:16:23 2018 -0700
@@ -1140,6 +1140,7 @@
             for (Type t : targets) {
                 t = types.erasure(t);
                 if (t.tsym != syms.serializableType.tsym &&
+                    t.tsym != tree.type.tsym &&
                     t.tsym != syms.objectType.tsym) {
                     markers.append(t.tsym);
                 }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Tue May 29 13:16:23 2018 -0700
@@ -280,7 +280,9 @@
             tree.vartype.type = atype.makeVarargs();
         }
         WriteableScope enclScope = enter.enterScope(env);
-        Type vartype = tree.isImplicitlyTyped() ? Type.noType : tree.vartype.type;
+        Type vartype = tree.isImplicitlyTyped()
+                ? env.info.scope.owner.kind == MTH ? Type.noType : syms.errType
+                : tree.vartype.type;
         VarSymbol v = new VarSymbol(0, tree.name, vartype, enclScope.owner);
         v.flags_field = chk.checkFlags(tree.pos(), tree.mods.flags, v, tree);
         tree.sym = v;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Tue May 29 13:16:23 2018 -0700
@@ -673,7 +673,6 @@
             msym.requires = List.nil();
             msym.uses = List.nil();
             msym.directives = directives.toList();
-            msym.flags_field |= Flags.ACYCLIC;
         } catch (IOException ex) {
             throw new IllegalStateException(ex);
         }
@@ -1739,7 +1738,7 @@
                 if (!nonSyntheticDeps.add(current))
                     continue;
                 current.complete();
-                if ((current.flags() & Flags.ACYCLIC) != 0)
+                if ((current.flags() & Flags.AUTOMATIC_MODULE) != 0)
                     continue;
                 Assert.checkNonNull(current.requires, current::toString);
                 for (RequiresDirective dep : current.requires) {
@@ -1750,7 +1749,6 @@
             if (nonSyntheticDeps.contains(mod.sym)) {
                 log.error(rd.moduleName.pos(), Errors.CyclicRequires(rd.directive.module));
             }
-            mod.sym.flags_field |= Flags.ACYCLIC;
         }
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Tue May 29 13:16:23 2018 -0700
@@ -2305,6 +2305,10 @@
             if (sym.exists()) return sym;
             else bestSoFar = bestOf(bestSoFar, sym);
 
+            sym = findGlobalType(env, env.toplevel.toplevelScope, name, noRecovery);
+            if (sym.exists()) return sym;
+            else bestSoFar = bestOf(bestSoFar, sym);
+
             sym = findGlobalType(env, env.toplevel.packge.members(), name, noRecovery);
             if (sym.exists()) return sym;
             else bestSoFar = bestOf(bestSoFar, sym);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Tue May 29 13:16:23 2018 -0700
@@ -198,9 +198,9 @@
 
     /**
      * Specifies whether or not frames should be generated.
-     * Defaults to true; can be set by --frames; can be set to false by --no-frames; last one wins.
+     * Defaults to false; can be set to true by --frames; can be set to false by --no-frames; last one wins.
      */
-    public boolean frames = true;
+    public boolean frames = false;
 
     /**
      * This is the HTML version of the generated pages.
@@ -740,6 +740,7 @@
             new Option(resources, "--frames") {
                 @Override
                 public boolean process(String opt,  List<String> args) {
+                    reporter.print(WARNING, getText("doclet.Frames_specified", helpfile));
                     frames = true;
                     return true;
                 }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Tue May 29 13:16:23 2018 -0700
@@ -403,10 +403,10 @@
     Specify the character encoding for the output
 
 doclet.usage.frames.description=\
-    Enable the use of frames in the generated output (default)
+    Enable the use of frames in the generated output
 
 doclet.usage.no-frames.description=\
-    Disable the use of frames in the generated output
+    Disable the use of frames in the generated output (default)
 
 doclet.usage.override-methods.parameters=\
     (detail|summary)
@@ -450,3 +450,10 @@
     The default is currently HTML5 and the support for HTML 4.01 will be removed\n\
     in a future release. To suppress this warning, please ensure that any HTML constructs\n\
     in your comments are valid in HTML5, and remove the -html4 option.
+
+# L10N: do not localize the option names --frames
+doclet.Frames_specified=\
+    You have specified to generate frames, by using the --frames option.\n\
+    The default is currently to not generate frames and the support for \n\
+    frames will be removed in a future release.\n\
+    To suppress this warning, remove the --frames option and avoid the use of frames.
--- a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java	Sat May 26 20:29:15 2018 -0700
+++ b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java	Tue May 29 13:16:23 2018 -0700
@@ -88,7 +88,9 @@
         }
 
         if (listCounters != true && sb.length() == 0) {
-            throw new IllegalArgumentException("No command specified");
+            // Omitting the command shall cause the target VM to print out a list
+            // of available commands.
+            sb.append("help");
         }
 
         command = sb.toString().trim();
--- a/test/hotspot/jtreg/ProblemList-graal.txt	Sat May 26 20:29:15 2018 -0700
+++ b/test/hotspot/jtreg/ProblemList-graal.txt	Tue May 29 13:16:23 2018 -0700
@@ -58,6 +58,7 @@
 
 gc/arguments/TestNewSizeFlags.java                              8196611   generic-all
 gc/g1/TestConcurrentSystemGC.java                               8196611   generic-all
+vmTestbase/gc/lock/malloc/malloclock03/TestDescription.java     8196611   macosx-all
 
 gc/g1/ihop/TestIHOPErgo.java                                    8191048   generic-all
 gc/g1/plab/TestPLABEvacuationFailure.java                       8191048   generic-all
@@ -74,6 +75,8 @@
 
 gc/g1/ihop/TestIHOPStatic.java                                  8199486   generic-all
 
+gc/parallel/TestPrintGCDetailsVerbose.java                      8200186   macosx-all
+
 compiler/jvmci/compilerToVM/ReprofileTest.java                  8201333   generic-all
 
 compiler/tiered/TieredLevelsTest.java                           8202124   generic-all
@@ -85,8 +88,12 @@
 compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java                CODETOOLS-7902162   generic-all
 compiler/jvmci/events/JvmciShutdownEventTest.java               CODETOOLS-7902162   generic-all
 
+vmTestbase/nsk/stress/strace/strace001.java                     8191047   generic-all
+vmTestbase/nsk/stress/strace/strace002.java                     8191047   generic-all
+vmTestbase/nsk/stress/strace/strace005.java                     8191047   generic-all
+vmTestbase/nsk/stress/strace/strace006.java                     8191047   generic-all
+vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t002/TestDescription.java                         8191047   generic-all
 vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn009/forceEarlyReturn009.java   8191047   generic-all
-vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t002/TestDescription.java                         8191047   generic-all
 
 vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod012/TestDescription.java                     8195600   generic-all
 vmTestbase/nsk/jdi/ClassType/setValue/setvalue006/TestDescription.java                             8195600   generic-all
@@ -163,6 +170,7 @@
 vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java         8186299   generic-all
 vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java    8186299   generic-all
 
+# jvmti tests
 vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/TestDescription.java         8193577   generic-all
 vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-tagged/TestDescription.java   8193577   generic-all
 
@@ -170,5 +178,9 @@
 
 vmTestbase/nsk/jvmti/PopFrame/popframe009/TestDescription.java                     8195639   generic-all
 
+vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/TestDescription.java     8195674   generic-all
 vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn002/TestDescription.java     8195674   generic-all
 
+vmTestbase/nsk/jvmti/AttachOnDemand/attach024/TestDescription.java                 8195630   generic-all
+
+vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java       8202342   generic-all
--- a/test/hotspot/jtreg/compiler/jvmci/TestJVMCIPrintProperties.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/hotspot/jtreg/compiler/jvmci/TestJVMCIPrintProperties.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
 
 /*
  * @test TestBasicLogOutput
+ * @bug 8203370
  * @summary Ensure -XX:-JVMCIPrintProperties can be enabled and successfully prints expected output to stdout.
  * @requires vm.jvmci
  * @library /test/lib
@@ -34,9 +35,14 @@
 public class TestJVMCIPrintProperties {
 
     public static void main(String[] args) throws Exception {
+        test("-XX:+EnableJVMCI");
+        test("-XX:+UseJVMCICompiler");
+    }
+
+    static void test(String enableFlag) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
             "-XX:+UnlockExperimentalVMOptions",
-            "-XX:+EnableJVMCI", "-Djvmci.Compiler=null",
+            enableFlag, "-Djvmci.Compiler=null",
             "-XX:+JVMCIPrintProperties");
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         output.shouldContain("[JVMCI properties]"); // expected message
--- a/test/jdk/ProblemList-graal.txt	Sat May 26 20:29:15 2018 -0700
+++ b/test/jdk/ProblemList-graal.txt	Tue May 29 13:16:23 2018 -0700
@@ -60,8 +60,11 @@
 java/util/logging/RootLogger/RootLevelInConfigFile.java                 8185139   generic-all
 java/util/logging/TestAppletLoggerContext.java                          8185139   generic-all
 java/util/logging/TestConfigurationListeners.java                       8185139   generic-all
+java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java 8185139 generic-all
+java/util/logging/FileHandlerLongLimit.java                             8185139   generic-all
 
 java/util/concurrent/tck/JSR166TestCase.java                            8187486   generic-all
 
 java/lang/ref/OOMEInReferenceHandler.java                               8196611   generic-all
 java/lang/Runtime/exec/LotsOfOutput.java                                8196611   generic-all
+java/util/concurrent/ScheduledThreadPoolExecutor/BasicCancelTest.java   8196611   generic-all
--- a/test/jdk/sun/util/calendar/zi/tzdata/VERSION	Sat May 26 20:29:15 2018 -0700
+++ b/test/jdk/sun/util/calendar/zi/tzdata/VERSION	Tue May 29 13:16:23 2018 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2018d
+tzdata2018e
--- a/test/jdk/sun/util/calendar/zi/tzdata/africa	Sat May 26 20:29:15 2018 -0700
+++ b/test/jdk/sun/util/calendar/zi/tzdata/africa	Tue May 29 13:16:23 2018 -0700
@@ -29,7 +29,7 @@
 # tz@iana.org for general use in the future).  For more, please see
 # the file CONTRIBUTING in the tz distribution.
 
-# From Paul Eggert (2017-02-20):
+# From Paul Eggert (2017-04-09):
 #
 # Unless otherwise specified, the source for data through 1990 is:
 # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -75,7 +75,7 @@
 # cannot now come up with solid citations.
 #
 # I invented the following abbreviations; corrections are welcome!
-#	 +02	WAST	West Africa Summer Time
+#	 +02	WAST	West Africa Summer Time (no longer used)
 #	 +03	CAST	Central Africa Summer Time (no longer used)
 #	 +03	SAST	South Africa Summer Time (no longer used)
 #	 +03	EAT	East Africa Time
@@ -990,6 +990,10 @@
 # commence at OOhOO on Monday 21 March 1994 and shall end at 02h00 on
 # Sunday 4 September 1994.
 
+# From Michael Deckers (2017-04-06):
+# ... both summer and winter time are called "standard"
+# (which differs from the use in Ireland) ...
+
 # From Petronella Sibeene (2007-03-30):
 # http://allafrica.com/stories/200703300178.html
 # While the entire country changes its time, Katima Mulilo and other
@@ -1015,19 +1019,42 @@
 # the same time they would normally start DST, the first Sunday in September:
 # https://www.timeanddate.com/news/time/namibia-new-time-zone.html
 
+# From Paul Eggert (2017-04-09):
+# Before the change, summer and winter time were both standard time legally.
+# However in common parlance, winter time was considered to be DST.  See, e.g.:
+# http://www.nbc.na/news/namibias-winter-time-could-be-scrapped.2706
+# https://zone.my.na/news/times-are-changing-in-namibia
+# https://www.newera.com.na/2017/02/23/namibias-winter-time-might-be-repealed/
+# Use plain "WAT" and "CAT" for the time zone abbreviations, to be compatible
+# with Namibia's neighbors.
+
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Namibia	1994	only	-	Mar	21	0:00	0	-
-Rule	Namibia	1994	2016	-	Sep	Sun>=1	2:00	1:00	S
-Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	0	-
+# Vanguard section, for zic and other parsers that support negative DST.
+#Rule	Namibia	1994	only	-	Mar	21	0:00	-1:00	WAT
+#Rule	Namibia	1994	2017	-	Sep	Sun>=1	2:00	0	CAT
+#Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	-1:00	WAT
+# Rearguard section, for parsers that do not support negative DST.
+Rule	Namibia	1994	only	-	Mar	21	0:00	0	WAT
+Rule	Namibia	1994	2017	-	Sep	Sun>=1	2:00	1:00	CAT
+Rule	Namibia	1995	2017	-	Apr	Sun>=1	2:00	0	WAT
+# End of rearguard section.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Windhoek	1:08:24 -	LMT	1892 Feb 8
 			1:30	-	+0130	1903 Mar
 			2:00	-	SAST	1942 Sep 20  2:00
 			2:00	1:00	SAST	1943 Mar 21  2:00
 			2:00	-	SAST	1990 Mar 21 # independence
+# Vanguard section, for zic and other parsers that support negative DST.
+#			2:00	Namibia	%s
+# Rearguard section, for parsers that do not support negative DST.
 			2:00	-	CAT	1994 Mar 21  0:00
-			1:00	Namibia	WA%sT	2017 Sep  3  2:00
+# From Paul Eggert (2017-04-07):
+# The official date of the 2017 rule change was 2017-10-24.  See:
+# http://www.lac.org.na/laws/annoSTAT/Namibian%20Time%20Act%209%20of%202017.pdf
+			1:00	Namibia	%s	2017 Oct 24
 			2:00	-	CAT
+# End of rearguard section.
 
 # Niger
 # See Africa/Lagos.
--- a/test/jdk/sun/util/calendar/zi/tzdata/asia	Sat May 26 20:29:15 2018 -0700
+++ b/test/jdk/sun/util/calendar/zi/tzdata/asia	Tue May 29 13:16:23 2018 -0700
@@ -2006,6 +2006,19 @@
 # There is no common English-language abbreviation for this time zone.
 # Use KST, as that's what we already use for 1954-1961 in ROK.
 
+# From Kang Seonghoon (2018-04-29):
+# North Korea will revert its time zone from UTC+8:30 (PYT; Pyongyang
+# Time) back to UTC+9 (KST; Korea Standard Time).
+#
+# From Seo Sanghyeon (2018-04-30):
+# Rodong Sinmun 2018-04-30 announced Pyongyang Time transition plan.
+# https://www.nknews.org/kcna/wp-content/uploads/sites/5/2018/04/rodong-2018-04-30.pdf
+# ... the transition date is 2018-05-05 ...  Citation should be Decree
+# No. 2232 of April 30, 2018, of the Presidium of the Supreme People's
+# Assembly, as published in Rodong Sinmun.
+# From Tim Parenti (2018-04-29):
+# It appears to be the front page story at the top in the right-most column.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Seoul	8:27:52	-	LMT	1908 Apr  1
 			8:30	-	KST	1912 Jan  1
@@ -2017,7 +2030,8 @@
 			8:30	-	KST	1912 Jan  1
 			9:00	-	JST	1945 Aug 24
 			9:00	-	KST	2015 Aug 15 00:00
-			8:30	-	KST
+			8:30	-	KST	2018 May  5
+			9:00	-	KST
 
 ###############################################################################
 
@@ -2681,7 +2695,7 @@
 # From Sharef Mustafa (2018-03-16):
 # Palestine summer time will start on Mar 24th 2018 by advancing the
 # clock by 60 minutes as per Palestinian cabinet decision published on
-# the offical website, though the decree did not specify the exact
+# the official website, though the decree did not specify the exact
 # time of the time shift.
 # http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817
 #
--- a/test/jdk/sun/util/calendar/zi/tzdata/australasia	Sat May 26 20:29:15 2018 -0700
+++ b/test/jdk/sun/util/calendar/zi/tzdata/australasia	Tue May 29 13:16:23 2018 -0700
@@ -1108,6 +1108,15 @@
 # (1999-09-27) writes that Giles Meteorological Station uses
 # South Australian time even though it's located in Western Australia.
 
+# From Paul Eggert (2018-04-01):
+# The Guardian Express of Perth, Australia reported today that the
+# government decided to advance the clocks permanently on January 1,
+# 2019, from UT +08 to UT +09.  The article noted that an exemption
+# would be made for people aged 61 and over, who "can apply in writing
+# to have the extra hour of sunshine removed from their area."  See:
+# Daylight saving coming to WA in 2019. Guardian Express. 2018-04-01.
+# https://www.communitynews.com.au/guardian-express/news/exclusive-daylight-savings-coming-wa-summer-2018/
+
 # Queensland
 
 # From Paul Eggert (2018-02-26):
--- a/test/jdk/sun/util/calendar/zi/tzdata/europe	Sat May 26 20:29:15 2018 -0700
+++ b/test/jdk/sun/util/calendar/zi/tzdata/europe	Tue May 29 13:16:23 2018 -0700
@@ -551,13 +551,13 @@
 # summer and negative daylight saving time in winter.  It is for when
 # negative SAVE values are used.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-#Rule	Eire	1971	only	-	Oct	31	 2:00u	-1:00	GMT
-#Rule	Eire	1972	1980	-	Mar	Sun>=16	 2:00u	0	IST
-#Rule	Eire	1972	1980	-	Oct	Sun>=23	 2:00u	-1:00	GMT
-#Rule	Eire	1981	max	-	Mar	lastSun	 1:00u	0	IST
-#Rule	Eire	1981	1989	-	Oct	Sun>=23	 1:00u	-1:00	GMT
-#Rule	Eire	1990	1995	-	Oct	Sun>=22	 1:00u	-1:00	GMT
-#Rule	Eire	1996	max	-	Oct	lastSun	 1:00u	-1:00	GMT
+#Rule	Eire	1971	only	-	Oct	31	 2:00u	-1:00	-
+#Rule	Eire	1972	1980	-	Mar	Sun>=16	 2:00u	0	-
+#Rule	Eire	1972	1980	-	Oct	Sun>=23	 2:00u	-1:00	-
+#Rule	Eire	1981	max	-	Mar	lastSun	 1:00u	0	-
+#Rule	Eire	1981	1989	-	Oct	Sun>=23	 1:00u	-1:00	-
+#Rule	Eire	1990	1995	-	Oct	Sun>=22	 1:00u	-1:00	-
+#Rule	Eire	1996	max	-	Oct	lastSun	 1:00u	-1:00	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Dublin	-0:25:00 -	LMT	1880 Aug  2
@@ -993,18 +993,30 @@
 # Please see the 'asia' file for Asia/Nicosia.
 
 # Czech Republic / Czechia
+#
+# From Paul Eggert (2018-04-15):
+# The source for Czech data is: Kdy začíná a končí letní čas. 2018-04-15.
+# https://kalendar.beda.cz/kdy-zacina-a-konci-letni-cas
+# We know of no English-language name for historical Czech winter time;
+# abbreviate it as "GMT", as it happened to be GMT.
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Czech	1945	only	-	Apr	 8	2:00s	1:00	S
-Rule	Czech	1945	only	-	Nov	18	2:00s	0	-
+Rule	Czech	1945	only	-	Apr	Mon>=1	2:00s	1:00	S
+Rule	Czech	1945	only	-	Oct	 1	2:00s	0	-
 Rule	Czech	1946	only	-	May	 6	2:00s	1:00	S
 Rule	Czech	1946	1949	-	Oct	Sun>=1	2:00s	0	-
-Rule	Czech	1947	only	-	Apr	20	2:00s	1:00	S
-Rule	Czech	1948	only	-	Apr	18	2:00s	1:00	S
+Rule	Czech	1947	1948	-	Apr	Sun>=15	2:00s	1:00	S
 Rule	Czech	1949	only	-	Apr	 9	2:00s	1:00	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Prague	0:57:44 -	LMT	1850
 			0:57:44	-	PMT	1891 Oct    # Prague Mean Time
-			1:00	C-Eur	CE%sT	1944 Sep 17  2:00s
+			1:00	C-Eur	CE%sT	1945 May  9
+			1:00	Czech	CE%sT	1946 Dec  1  3:00
+# Vanguard section, for zic and other parsers that support negative DST.
+#			1:00	-1:00	GMT	1947 Feb 23  2:00
+# Rearguard section, for parsers that do not support negative DST.
+			0:00	-	GMT	1947 Feb 23  2:00
+# End of rearguard section.
 			1:00	Czech	CE%sT	1979
 			1:00	EU	CE%sT
 # Use Europe/Prague also for Slovakia.
@@ -2039,7 +2051,7 @@
 Rule	Neth	1945	only	-	Apr	 2	2:00s	1:00	S
 Rule	Neth	1945	only	-	Sep	16	2:00s	0	-
 #
-# Amsterdam Mean Time was +00:19:32.13 exactly, but the .13 is omitted
+# Amsterdam Mean Time was +00:19:32.13, but the .13 is omitted
 # below because the current format requires GMTOFF to be an integer.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Europe/Amsterdam	0:19:32 -	LMT	1835
--- a/test/langtools/ProblemList.txt	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/ProblemList.txt	Tue May 29 13:16:23 2018 -0700
@@ -56,6 +56,7 @@
 tools/javac/warnings/suppress/TypeAnnotations.java                              8057683    generic-all    improve ordering of errors with type annotations
 tools/javac/modules/SourceInSymlinkTest.java                                    8180263    windows-all    fails when run on a subst drive
 tools/javac/options/release/ReleaseOptionUnsupported.java                       8193784    generic-all    temporary until support for --release 11 is worked out
+tools/javac/importscope/T8193717.java                                           8203925    generic-all    the test requires too much memory
 
 ###########################################################################
 #
--- a/test/langtools/jdk/javadoc/doclet/AccessFrameTitle/AccessFrameTitle.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/AccessFrameTitle/AccessFrameTitle.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4636655
+ * @bug 4636655 8196202
  * @summary  Add title attribute to <FRAME> tags for accessibility
  * @author dkramer
  * @library ../lib
@@ -42,6 +42,7 @@
     @Test
     void test() {
         javadoc("-d", "out",
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/AccessH1/AccessH1.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/AccessH1/AccessH1.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4636667 7052425 8016549
+ * @bug 4636667 7052425 8016549 8196202
  * @summary  Use <H1, <H2>, and <H3> in proper sequence for accessibility
  * @author dkramer
  * @library ../lib
@@ -44,6 +44,7 @@
     void test() {
         javadoc("-d", "out",
                 "-doctitle", "Document Title",
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/AccessSummary/AccessSummary.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/AccessSummary/AccessSummary.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4637604 4775148 8183037 8182765
+ * @bug      4637604 4775148 8183037 8182765 8196202
  * @summary  Test the tables for summary attribute
  * @author   dkramer
  * @library ../lib
@@ -45,7 +45,10 @@
 
     @Test
     void testAccessSummary() {
-        javadoc("-d", "out", "-sourcepath", testSrc, "p1", "p2");
+        javadoc("-d", "out",
+                "--frames",
+                "-sourcepath", testSrc,
+                "p1", "p2");
         checkExit(Exit.OK);
         checkSummary(false);
     }
@@ -54,6 +57,7 @@
     void testAccessSummary_html4() {
         javadoc("-d", "out-html4",
                 "-html4",
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/DocRootSlash/DocRootSlash.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/DocRootSlash/DocRootSlash.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4524350 4662945 4633447
+ * @bug 4524350 4662945 4633447 8196202
  * @summary stddoclet: {@docRoot} inserts an extra trailing "/"
  * @author dkramer
  * @library ../lib
@@ -56,6 +56,7 @@
         javadoc("-d", "out",
                 "-Xdoclint:none",
                 "-overview", (srcdir + "/overview.html"),
+                "--frames",
                 "-header", "<A HREF=\"{@docroot}/package-list\">{&#064;docroot}</A> <A HREF=\"{@docRoot}/help-doc\">{&#064;docRoot}</A>",
                 "-sourcepath", srcdir,
                 "p1", "p2");
--- a/test/langtools/jdk/javadoc/doclet/JavascriptWinTitle/JavascriptWinTitle.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/JavascriptWinTitle/JavascriptWinTitle.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4645058 4747738 4855054 8024756 8141492
+ * @bug 4645058 4747738 4855054 8024756 8141492 8196202
  * @summary  Javascript IE load error when linked by -linkoffline
  *           Window title shouldn't change when loading left frames (javascript)
  * @author dkramer
@@ -43,6 +43,7 @@
     @Test
     void test() {
         javadoc("-d", "out",
+                "--frames",
                 "-doctitle", "Document Title",
                 "-windowtitle", "Window Title",
                 "-overview", testSrc("overview.html"),
--- a/test/langtools/jdk/javadoc/doclet/MetaTag/MetaTag.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/MetaTag/MetaTag.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4034096 4764726 6235799 8182765
+ * @bug      4034096 4764726 6235799 8182765 8196202
  * @summary  Add support for HTML keywords via META tag for
  *           class and member names to improve API search
  * @author   dkramer
@@ -53,6 +53,7 @@
         javadoc("-d", "out-1",
                 "-sourcepath", testSrc,
                 "-keywords",
+                "--frames",
                 "-doctitle", "Sample Packages",
                 "p1", "p2");
 
@@ -66,6 +67,7 @@
         javadoc("-d", "out-2",
                 "-sourcepath", testSrc,
                 "-notimestamp",
+                "--frames",
                 "-doctitle", "Sample Packages",
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -80,6 +82,7 @@
                 "-html4",
                 "-sourcepath", testSrc,
                 "-keywords",
+                "--frames",
                 "-doctitle", "Sample Packages",
                 "p1", "p2");
 
@@ -94,6 +97,7 @@
                 "-html4",
                 "-sourcepath", testSrc,
                 "-notimestamp",
+                "--frames",
                 "-doctitle", "Sample Packages",
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/PackagesHeader/PackagesHeader.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/PackagesHeader/PackagesHeader.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4766385
+ * @bug      4766385 8196202
  * @summary  Test that the header option for upper left frame
  *           is present for three sets of options: (1) -header,
  *           (2) -packagesheader, and (3) -header -packagesheader
@@ -46,6 +46,7 @@
         // First test with -header only
         javadoc("-d", "out-header",
                 "-header", "Main Frame Header",
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -60,6 +61,7 @@
         // Second test with -packagesheader only
         javadoc("-d", "out-packages-header",
                 "-packagesheader", "Packages Frame Header",
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -76,6 +78,7 @@
         javadoc("-d", "out-both",
                 "-packagesheader", "Packages Frame Header",
                 "-header", "Main Frame Header",
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/ValidHtml/ValidHtml.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/ValidHtml/ValidHtml.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4275630 4749453 4625400 4753048 4415270 8074521 8182765
+ * @bug 4275630 4749453 4625400 4753048 4415270 8074521 8182765 8196202
  * @summary  Generated HTML is invalid with frames.
  *           Displays unnecessary horizontal scroll bars.
  *           Missing whitespace in DOCTYPE declaration
@@ -49,6 +49,7 @@
                     "-doctitle", "Document Title",
                     "-windowtitle", "Window Title",
                     "-use",
+                    "--frames",
                     "-overview", testSrc("overview.html"),
                     "-sourcepath", testSrc,
                     "p1", "p2");
@@ -72,6 +73,7 @@
                 "-doctitle", "Document Title",
                 "-windowtitle", "Window Title",
                 "-use",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "-sourcepath", testSrc,
                 "p1", "p2");
--- a/test/langtools/jdk/javadoc/doclet/WindowTitles/WindowTitles.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/WindowTitles/WindowTitles.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4530730
+ * @bug 4530730 8196202
  * @summary stddoclet: With frames off, window titles have "()" appended
  * @author dkramer
  * @library ../lib
@@ -47,6 +47,7 @@
         // Test for all cases except the split index page
         javadoc("-d", "out-1",
                 "-use",
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testClassDocCatalog/TestClassDocCatalog.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testClassDocCatalog/TestClassDocCatalog.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8071982
+ * @bug 8071982 8196202
  * @summary Test for package-frame.html.
  * @library ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -41,6 +41,7 @@
     @Test
     void test() {
         javadoc("-d", "out",
+                "--frames",
                 testSrc("pkg1/EmptyAnnotation.java"),
                 testSrc("pkg1/EmptyClass.java"),
                 testSrc("pkg1/EmptyEnum.java"),
--- a/test/langtools/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8162353 8164747 8173707
+ * @bug 8162353 8164747 8173707 8196202
  * @summary javadoc should provide a way to disable use of frames
  * @library /tools/lib ../lib
  * @modules
@@ -226,6 +226,11 @@
 
         private boolean frames;
         private boolean overview;
+        private static final String framesWarning
+                = "javadoc: warning - You have specified to generate frames, by using the --frames option.\n"
+                + "The default is currently to not generate frames and the support for \n"
+                + "frames will be removed in a future release.\n"
+                + "To suppress this warning, remove the --frames option and avoid the use of frames.";
 
         Checker(FrameKind fKind, OverviewKind oKind, HtmlKind hKind) {
             this.fKind = fKind;
@@ -240,11 +245,11 @@
 
         void check() throws IOException {
             switch (fKind) {
-                case DEFAULT:
                 case FRAMES:
                     frames = true;
                     break;
 
+                case DEFAULT:
                 case NO_FRAMES:
                     frames = false;
                     break;
@@ -272,6 +277,8 @@
             checkNavBar();
             checkHelpDoc();
 
+            checkWarning();
+
         }
 
         private void checkAllClassesFiles() {
@@ -379,6 +386,10 @@
                     "overview-summary.html");
         }
 
+        private void checkWarning() {
+            checkOutput(Output.OUT, frames, framesWarning);
+        }
+
         private long getPackageCount() {
             return this.classes.stream()
                 .filter(name -> name.contains("."))
--- a/test/langtools/jdk/javadoc/doclet/testGeneratedBy/TestGeneratedBy.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testGeneratedBy/TestGeneratedBy.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8000418 8024288
+ * @bug 8000418 8024288 8196202
  * @summary Verify that files use a common Generated By string
  * @library ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -41,6 +41,7 @@
     @Test
     void testTimestamp() {
         javadoc("-d", "out-timestamp",
+                "--frames",
             "-sourcepath", testSrc,
             "pkg");
         checkExit(Exit.OK);
@@ -52,6 +53,7 @@
     void testNoTimestamp() {
         javadoc("-d", "out-notimestamp",
             "-notimestamp",
+                "--frames",
             "-sourcepath", testSrc,
             "pkg");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testGroupName/TestGroupName.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testGroupName/TestGroupName.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8190003 8196201
+ * @bug 8190003 8196201 8196202
  * @summary Special characters in group names should be escaped
  * @library /tools/lib ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -58,6 +58,7 @@
                 "package p3; public class C3 { }");
 
         javadoc("-d", base.resolve("out").toString(),
+                "--frames",
                 "-sourcepath", src.toString(),
                 "-group", "abc < & > def", "p1",
                 "p1", "p2", "p3");
@@ -90,6 +91,7 @@
                 "package pc3; public class CC3 { }");
 
         javadoc("-d", base.resolve("out").toString(),
+                "--frames",
                 "--module-source-path", src.toString(),
                 "-group", "abc < & > def", "ma",
                 "--module", "ma,mb,mc");
--- a/test/langtools/jdk/javadoc/doclet/testGroupOption/TestGroupOption.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testGroupOption/TestGroupOption.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4924383 8149402
+ * @bug      4924383 8149402 8196202
  * @summary  Test to make sure the -group option works correctly
  *           with the given pattern usages.
  * @author   jamieh
@@ -60,6 +60,7 @@
     // Make sure that the headers of group that is defined using patterns are printed.
     void test2() {
         javadoc("-d", "out-2",
+                "--frames",
                 "-sourcepath", testSrc,
                 "-group", "Group pkg*", "pkg*",
                 "-group", "Group abc*", "abc*",
--- a/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4905786 6259611 8162363
+ * @bug      4905786 6259611 8162363 8196202
  * @summary  Make sure that headings use the TH tag instead of the TD tag.
  * @author   jamieh
  * @library ../lib
@@ -62,6 +62,7 @@
         javadoc("-d", "out",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "-header", "Test Files",
                 "pkg1", "pkg2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8073100 8182765
+ * @bug 8073100 8182765 8196202
  * @summary ensure the hidden tag works as intended
  * @library ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -44,6 +44,7 @@
     @Test
     public void test1() {
         javadoc("-d", "out1",
+                "--frames",
                 "-sourcepath", testSrc,
                 "-package",
                 "pkg1");
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8008164 8169819 8183037 8182765
+ * @bug 8008164 8169819 8183037 8182765 8196202
  * @summary Test styles on HTML tables generated by javadoc.
  * @author Bhavesh Patel
  * @library ../lib
@@ -44,6 +44,7 @@
         javadoc("-d", "out",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg1", "pkg2");
         checkExit(Exit.ERROR);
         checkOutput(Output.OUT, true,
@@ -81,6 +82,7 @@
                 "-html4",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg1", "pkg2");
         checkExit(Exit.OK);
 
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java	Tue May 29 13:16:23 2018 -0700
@@ -50,6 +50,7 @@
         javadoc("-d", "out",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg1", "pkg2");
         checkExit(Exit.OK);
 
@@ -64,6 +65,7 @@
                 "-html4",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg1", "pkg2");
         checkExit(Exit.OK);
 
--- a/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 8151743 8169819 8183037 8182765
+ * @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 8151743 8169819 8183037 8182765 8196202
  * @summary Test the version of HTML generated by the javadoc tool.
  * @author bpatel
  * @library ../lib
@@ -45,6 +45,7 @@
         javadoc("-d", "out-1",
                 "-private",
                 "-linksource",
+                "--frames",
                 "-sourcepath", testSrc,
                 "-use",
                 "pkg", "pkg1", "pkg2", "pkg3");
@@ -62,6 +63,7 @@
                 "-html4",
                 "-private",
                 "-linksource",
+                "--frames",
                 "-sourcepath", testSrc,
                 "-use",
                 "pkg", "pkg1", "pkg2", "pkg3");
@@ -79,6 +81,7 @@
                 "-html4",
                 "-private",
                 "-linksource",
+                "--frames",
                 "-sourcepath", testSrc,
                 "-use",
                 "pkg", "pkg1", "pkg2", "pkg3");
--- a/test/langtools/jdk/javadoc/doclet/testIndex/TestIndex.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testIndex/TestIndex.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4852280 4517115 4973608 4994589 8026567 8071982
+ * @bug      4852280 4517115 4973608 4994589 8026567 8071982 8196202
  * @summary  Perform tests on index.html file.
  *           Also test that index-all.html has the appropriate output.
  *           Test for unnamed package in index.
@@ -44,6 +44,7 @@
     @Test
     void test() {
         javadoc("-d", "out",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg", testSrc("NoPackage.java"));
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testJavascript/TestJavascript.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testJavascript/TestJavascript.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4665566 4855876 7025314 8012375 8015997 8016328 8024756 8148985 8151921 8151743
+ * @bug      4665566 4855876 7025314 8012375 8015997 8016328 8024756 8148985 8151921 8151743 8196202
  * @summary  Verify that the output has the right javascript.
  * @author   jamieh
  * @library  ../lib
@@ -42,6 +42,7 @@
     @Test
     void test() {
         javadoc("-d", "out",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg", testSrc("TestJavascript.java"));
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testModuleDirs/TestModuleDirs.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testModuleDirs/TestModuleDirs.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8195795 8201396
+ * @bug 8195795 8201396 8196202
  * @summary test the use of module directories in output,
  *          and the --no-module-directories option
  * @modules jdk.javadoc/jdk.javadoc.internal.api
@@ -82,6 +82,7 @@
 
         javadoc("-d", base.resolve("api").toString(),
                 "-quiet",
+                "--frames",
                 "--module-source-path", src.toString(),
                 "--no-module-directories",
                 "--module", "ma,mb");
@@ -125,6 +126,7 @@
 
         javadoc("-d", base.resolve("api").toString(),
                 "-quiet",
+                "--frames",
                 "--module-source-path", src.toString(),
                 "--module", "ma,mb");
 
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Tue May 29 13:16:23 2018 -0700
@@ -26,7 +26,7 @@
  * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363
  *      8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218
  *      8175823 8166306 8178043 8181622 8183511 8169819 8074407 8183037 8191464
-        8164407 8192007 8182765 8196200 8196201
+        8164407 8192007 8182765 8196200 8196201 8196202
  * @summary Test modules support in javadoc.
  * @author bpatel
  * @library ../lib
@@ -51,6 +51,7 @@
                 "-use",
                 "-Xdoclint:none",
                 "-overview", testSrc("overview.html"),
+                "--frames",
                 "--module-source-path", testSrc,
                 "--module", "moduleA,moduleB",
                 "testpkgmdlA", "testpkgmdlB");
@@ -76,6 +77,7 @@
                 "-use",
                 "-Xdoclint:none",
                 "-overview", testSrc("overview.html"),
+                "--frames",
                 "--module-source-path", testSrc,
                 "--module", "moduleA,moduleB",
                 "testpkgmdlA", "testpkgmdlB");
@@ -102,6 +104,7 @@
                 "-nocomment",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "--module-source-path", testSrc,
                 "--module", "moduleA,moduleB",
@@ -123,6 +126,7 @@
                 "-nocomment",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "--module-source-path", testSrc,
                 "--module", "moduleA,moduleB",
@@ -143,6 +147,7 @@
         javadoc("-d", "out-nomodule",
                 "-html4",
                 "-use",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "-sourcepath", testSrc,
                 "testpkgnomodule", "testpkgnomodule1");
@@ -161,6 +166,7 @@
     void testHtml5UnnamedModule() {
         javadoc("-d", "out-html5-nomodule",
                 "-use",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "-sourcepath", testSrc,
                 "testpkgnomodule", "testpkgnomodule1");
@@ -264,6 +270,7 @@
     void testModuleFilesAndLinks() {
         javadoc("-d", "out-modulelinks",
                 "-Xdoclint:none",
+                "--frames",
                 "--module-source-path", testSrc,
                 "--module", "moduleA,moduleB",
                 "testpkgmdlA", "testpkgmdlB");
@@ -328,6 +335,7 @@
                 "-author",
                 "-version",
                 "-Xdoclint:none",
+                "--frames",
                 "-tag", "regular:a:Regular Tag:",
                 "-tag", "moduletag:s:Module Tag:",
                 "--module-source-path", testSrc,
@@ -352,6 +360,7 @@
                 "-author",
                 "-version",
                 "-Xdoclint:none",
+                "--frames",
                 "-tag", "regular:a:Regular Tag:",
                 "-tag", "moduletag:s:Module Tag:",
                 "--module-source-path", testSrc,
@@ -377,6 +386,7 @@
                 "-author",
                 "-version",
                 "-Xdoclint:none",
+                "--frames",
                 "-tag", "regular:a:Regular Tag:",
                 "-tag", "moduletag:s:Module Tag:",
                 "--module-source-path", testSrc,
@@ -453,6 +463,7 @@
     @Test
     void testSingleModuleSinglePkg() {
         javadoc("-d", "out-singlemod",
+                "--frames",
                 "--module-source-path", testSrc,
                 "--module", "moduleC",
                 "testpkgmdlC");
@@ -468,6 +479,7 @@
         javadoc("-d", "out-singlemodmultiplepkg",
                 "--show-module-contents=all",
                 "-Xdoclint:none",
+                "--frames",
                 "--module-source-path", testSrc,
                 "--module", "moduleB",
                 "testpkg2mdlB", "testpkgmdlB");
@@ -483,6 +495,7 @@
         javadoc("-d", "out-group",
                 "--show-module-contents=all",
                 "-Xdoclint:none",
+                "--frames",
                 "-tag", "regular:a:Regular Tag:",
                 "-tag", "moduletag:s:Module Tag:",
                 "--module-source-path", testSrc,
@@ -505,6 +518,7 @@
                 "-html4",
                 "--show-module-contents=all",
                 "-Xdoclint:none",
+                "--frames",
                 "-tag", "regular:a:Regular Tag:",
                 "-tag", "moduletag:s:Module Tag:",
                 "--module-source-path", testSrc,
@@ -528,6 +542,7 @@
         javadoc("-d", "out-groupOrder",
                 "--show-module-contents=all",
                 "-Xdoclint:none",
+                "--frames",
                 "-tag", "regular:a:Regular Tag:",
                 "-tag", "moduletag:s:Module Tag:",
                 "--module-source-path", testSrc,
@@ -550,6 +565,7 @@
         javadoc("-d", "out-groupnomodule",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "-sourcepath", testSrc,
                 "-group", "Package Group 0", "testpkgnomodule",
@@ -568,6 +584,7 @@
                 "-html4",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "-sourcepath", testSrc,
                 "-group", "Package Group 0", "testpkgnomodule",
@@ -587,6 +604,7 @@
         javadoc("-d", "out-groupPkgOrder",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "-overview", testSrc("overview.html"),
                 "-sourcepath", testSrc,
                 "-group", "Z Group", "testpkgnomodule",
@@ -604,6 +622,7 @@
         javadoc("-d", "out-groupsinglemodule",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "--module-source-path", testSrc,
                 "-group", "Module Group B", "moduleB*",
                 "--module", "moduleB",
@@ -621,6 +640,7 @@
                 "-html4",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "--module-source-path", testSrc,
                 "-group", "Module Group B", "moduleB*",
                 "--module", "moduleB",
@@ -637,6 +657,7 @@
         javadoc("-d", "out-modulename",
                 "-use",
                 "-Xdoclint:none",
+                "--frames",
                 "--module-source-path", testSrc,
                 "--module", "moduleB,test.moduleFullName",
                 "testpkg2mdlB", "testpkgmdlB", "testpkgmdlfullname");
--- a/test/langtools/jdk/javadoc/doclet/testNavigation/TestModuleNavigation.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testNavigation/TestModuleNavigation.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8196027
+ * @bug 8196027 8196202
  * @summary test navigation links
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.main
@@ -74,6 +74,7 @@
 
         javadoc("-d", base.resolve("out").toString(), "-use",
                 "-quiet",
+                "--frames",
                 "--module-source-path", src.toString(),
                 "--module", "m,m2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java	Tue May 29 13:16:23 2018 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug      4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027 8182765
- *           8196200
+ *           8196200 8196202
  * @summary  Make sure the Next/Prev Class links iterate through all types.
  *           Make sure the navagation is 2 columns, not 3.
  * @author   jamieh
@@ -56,6 +56,7 @@
     void test(Path ignore) {
         javadoc("-d", "out",
                 "-overview", testSrc("overview.html"),
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg");
         checkExit(Exit.OK);
@@ -112,6 +113,7 @@
         javadoc("-d", "out-html4",
                 "-html4",
                 "-overview", testSrc("overview.html"),
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg");
         checkExit(Exit.OK);
@@ -150,6 +152,7 @@
     void test1(Path ignore) {
         javadoc("-d", "out-1",
                 "-html5",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg");
         checkExit(Exit.OK);
@@ -182,6 +185,7 @@
     void test2(Path ignore) {
         javadoc("-d", "out-2",
                 "-nonavbar",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg");
         checkExit(Exit.OK);
@@ -213,6 +217,7 @@
         javadoc("-d", "out-3",
                 "-html5",
                 "-nonavbar",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java	Tue May 29 13:16:23 2018 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug      4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 8026567 8162363
- *           8175200 8186332 8182765
+ *           8175200 8186332 8182765 8196202
  * @summary  Run Javadoc on a set of source files that demonstrate new
  *           language features.  Check the output to ensure that the new
  *           language features are properly documented.
@@ -47,6 +47,7 @@
         javadoc("-Xdoclint:none",
                 "-d", "out",
                 "-use",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg", "pkg1", "pkg2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813 8182765
+ * @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813 8182765 8196202
  * @summary test to determine if members are ordered correctly
  * @library ../lib/
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -129,6 +129,7 @@
             tester.javadoc("-d", "out-1",
                     "-sourcepath", tester.testSrc,
                     "-use",
+                    "--frames",
                     "pkg1");
             tester.checkExit(Exit.OK);
 
@@ -383,6 +384,7 @@
             List<String> cmdArgs = new ArrayList();
             cmdArgs.add("-d");
             cmdArgs.add("out-2");
+            cmdArgs.add("--frames");
             cmdArgs.add("-sourcepath");
             cmdArgs.add("src");
             cmdArgs.add("-package");
--- a/test/langtools/jdk/javadoc/doclet/testOverview/TestOverview.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testOverview/TestOverview.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8173302 8182765
+ * @bug 8173302 8182765 8196202
  * @summary make sure the overview-summary and module-summary pages don't
  *          don't have the See link, and the overview is copied correctly.
  * @library ../lib
@@ -45,6 +45,7 @@
                     "-doctitle", "Document Title",
                     "-windowtitle", "Window Title",
                     "-overview", testSrc("overview.html"),
+                    "--frames",
                     "-sourcepath", testSrc("src"),
                     "p1", "p2");
         checkExit(Exit.OK);
@@ -58,6 +59,7 @@
                 "-doctitle", "Document Title",
                 "-windowtitle", "Window Title",
                 "-overview", testSrc("overview.html"),
+                "--frames",
                 "-sourcepath", testSrc("src"),
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -70,6 +72,7 @@
                     "-doctitle", "Document Title",
                     "-windowtitle", "Window Title",
                     "-overview", testSrc("overview.html"),
+                    "--frames",
                     "-sourcepath", testSrc("msrc"),
                     "p1", "p2");
         checkExit(Exit.OK);
@@ -83,6 +86,7 @@
                 "-doctitle", "Document Title",
                 "-windowtitle", "Window Title",
                 "-overview", testSrc("overview.html"),
+                "--frames",
                 "-sourcepath", testSrc("msrc"),
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      6492694 8026567 8048351 8162363 8183511 8169819 8074407
+ * @bug      6492694 8026567 8048351 8162363 8183511 8169819 8074407 8196202
  * @summary  Test package deprecation.
  * @author   bpatel
  * @library  ../lib/
@@ -45,6 +45,7 @@
         javadoc("-d", "out-default",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", testSrc("C2.java"), testSrc("FooDepr.java"));
         checkExit(Exit.OK);
 
@@ -64,6 +65,7 @@
                 "-sourcepath", testSrc,
                 "-use",
                 "-nodeprecated",
+                "--frames",
                 "pkg", "pkg1", testSrc("C2.java"), testSrc("FooDepr.java"));
         checkExit(Exit.OK);
 
--- a/test/langtools/jdk/javadoc/doclet/testRecurseSubPackages/TestRecurseSubPackages.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testRecurseSubPackages/TestRecurseSubPackages.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4074234
+ * @bug 4074234 8196202
  * @summary Make Javadoc capable of traversing/recursing all of given subpackages.
  * @author jamieh
  * @library ../lib
@@ -42,6 +42,7 @@
     @Test
     void test() {
         javadoc("-d", "out",
+                "--frames",
                 "-sourcepath", testSrc,
                 "-subpackages", "pkg1",
                 "-exclude", "pkg1.pkg2.packageToExclude");
--- a/test/langtools/jdk/javadoc/doclet/testRelativeLinks/TestRelativeLinks.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testRelativeLinks/TestRelativeLinks.java	Tue May 29 13:16:23 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4460354 8014636 8043186 8195805 8182765
+ * @bug      4460354 8014636 8043186 8195805 8182765 8196202
  * @summary  Test to make sure that relative paths are redirected in the
  *           output so that they are not broken.
  * @author   jamieh
@@ -44,6 +44,7 @@
     void test() {
         javadoc("-d", "out",
                 "-use",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg", "pkg2");
         checkExit(Exit.ERROR);
--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Tue May 29 13:16:23 2018 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
- *      8181622 8182263 8074407 8187521 8198522 8182765 8199278 8196201
+ *      8181622 8182263 8074407 8187521 8198522 8182765 8199278 8196201 8196202
  * @summary Test the search feature of javadoc.
  * @author bpatel
  * @library ../lib
@@ -67,6 +67,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkInvalidUsageIndexTag();
@@ -105,6 +106,7 @@
                 "-Xdoclint:all",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.ERROR);
         checkDocLintErrors();
@@ -142,6 +144,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkSearchOutput(false);
@@ -167,6 +170,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkSearchOutput(true);
@@ -193,6 +197,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkSearchOutput(false);
@@ -216,6 +221,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkSearchOutput(true);
@@ -241,6 +247,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         setAutomaticCheckLinks(true); // @ignore JDK-8202627
         checkExit(Exit.OK);
@@ -266,6 +273,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkInvalidUsageIndexTag();
@@ -293,6 +301,7 @@
                 "--disable-javafx-strict-checks",
                 "-package",
                 "-use",
+                "--frames",
                 "pkgfx", "pkg3");
         checkExit(Exit.OK);
         checkSearchOutput(true);
@@ -318,6 +327,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkSearchOutput(true, false);
@@ -345,6 +355,7 @@
                 "-Xdoclint:none",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkSearchJS();
--- a/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java	Tue May 29 13:16:23 2018 -0700
@@ -25,7 +25,7 @@
 
 /*
  * @test
- * @bug      8173425 8186332 8182765
+ * @bug      8173425 8186332 8182765 8196202
  * @summary  tests for the summary tag behavior
  * @library  ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -157,6 +157,7 @@
     @Test
     void test3() {
         javadoc("-d", "out3",
+                "--frames",
                 "-sourcepath", testSrc,
                 "-overview", testSrc("p3/overview.html"),
                 "p3");
--- a/test/langtools/jdk/javadoc/doclet/testTopOption/TestTopOption.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testTopOption/TestTopOption.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      6227616 8043186
+ * @bug      6227616 8043186 8196202
  * @summary  Test the new -top option.
  * @author   jamieh
  * @library  ../lib
@@ -45,6 +45,7 @@
                 "-use",
                 "-top", "TOP TEXT",
                 "-d", "out-1",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg");
         checkExit(Exit.OK);
@@ -68,6 +69,7 @@
                 "-use",
                 "-top", "\u0130{@docroot}TOP TEXT",
                 "-d", "out-2",
+                "--frames",
                 "-sourcepath", testSrc,
                 "pkg");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java	Tue May 29 13:16:23 2018 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854 8071982 8162363 8175200 8186332
- *      8182765
+ *      8182765 8196202
  * @summary A simple test to ensure class-use files are correct.
  * @author jamieh
  * @library ../lib
@@ -46,6 +46,7 @@
         javadoc("-d", "out-1",
                 "-sourcepath", testSrc,
                 "-use",
+                "--frames",
                 "pkg1", "pkg2");
         checkExit(Exit.OK);
 
--- a/test/langtools/jdk/javadoc/doclet/testWindowTitle/TestWindowTitle.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testWindowTitle/TestWindowTitle.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8016675 8026736
+ * @bug 8016675 8026736 8196202
  * @summary Test for window title.
  * @author Bhavesh Patel
  * @library ../lib
@@ -48,6 +48,7 @@
 
         javadoc("-d", "out-js-chars",
                 "-windowtitle", title,
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -72,6 +73,7 @@
 
         javadoc("-d", "out-script",
                 "-windowtitle", title,
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -105,6 +107,7 @@
 
         javadoc("-d", "out-html-tags",
                 "-windowtitle", title,
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -128,6 +131,7 @@
 
         javadoc("-d", "out-html-entities",
                 "-windowtitle", title,
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
 
@@ -148,6 +152,7 @@
 
         javadoc("-d", "out-empty-tags",
                 "-windowtitle", title,
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
 
@@ -167,6 +172,7 @@
 
         javadoc("-d", "out-unicode",
                 "-windowtitle", title,
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
@@ -188,6 +194,7 @@
         String title = "";
         javadoc("-d", "out-empty",
                 "-windowtitle", title,
+                "--frames",
                 "-sourcepath", testSrc, "p1", "p2");
         checkExit(Exit.OK);
 
@@ -205,6 +212,7 @@
 
         javadoc("-d", "out-doctitle",
                 "-doctitle", title,
+                "--frames",
                 "-sourcepath", testSrc,
                 "p1", "p2");
         checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/tool/TestScriptInComment.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/tool/TestScriptInComment.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -242,6 +242,7 @@
         opts.add(srcDir.getPath());
         opts.add("-d");
         opts.add(outDir.getPath());
+        opts.add("--frames");
         if (option.text != null)
             opts.add(option.text);
         for (String opt: template.getOpts(srcDir)) {
--- a/test/langtools/jdk/javadoc/tool/api/basic/APITest.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/jdk/javadoc/tool/api/basic/APITest.java	Tue May 29 13:16:23 2018 -0700
@@ -190,9 +190,8 @@
      * Standard files generated by processing a documented class pkg.C.
      */
     protected static Set<String> standardExpectFiles = new HashSet<>(Arrays.asList(
-            "allclasses-frame.html",
+            "allclasses.html",
             "allclasses-index.html",
-            "allclasses-noframe.html",
             "allpackages-index.html",
             "constant-values.html",
             "deprecated-list.html",
@@ -233,7 +232,6 @@
             "package-search-index.js",
             "package-search-index.zip",
             "pkg/C.html",
-            "pkg/package-frame.html",
             "pkg/package-summary.html",
             "pkg/package-tree.html",
             "resources/glass.png",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java	Tue May 29 13:16:23 2018 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test 8203892
+ * @summary Target interface added as marker interface in calls to altMetafactory
+ * @library /tools/lib
+ * @modules jdk.jdeps/com.sun.tools.classfile
+ *          jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.jdeps/com.sun.tools.javap
+ * @build toolbox.ToolBox toolbox.JavacTask
+ * @run main CheckTargetIsNotAddedAsMarkerInterfaceTest
+ */
+
+import java.io.File;
+import java.nio.file.Paths;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.BootstrapMethods_attribute;
+import com.sun.tools.classfile.BootstrapMethods_attribute.BootstrapMethodSpecifier;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.ConstantPool.*;
+import com.sun.tools.javac.util.Assert;
+
+import toolbox.JavacTask;
+import toolbox.ToolBox;
+
+public class CheckTargetIsNotAddedAsMarkerInterfaceTest {
+
+    static final String testSource =
+        "import java.util.*;\n" +
+        "import java.util.function.*;\n" +
+        "import java.io.*;\n" +
+
+        "class Test {\n" +
+        "    public static <T> Comparator<T> comparingInt(ToIntFunction<? super T> keyExtractor) {\n" +
+        "        Objects.requireNonNull(keyExtractor);\n" +
+        "        return (Comparator<T> & Serializable)\n" +
+        "            (c1, c2) -> Integer.compare(keyExtractor.applyAsInt(c1), keyExtractor.applyAsInt(c2));\n" +
+        "    }\n" +
+        "}";
+
+    public static void main(String[] args) throws Exception {
+        new CheckTargetIsNotAddedAsMarkerInterfaceTest().run();
+    }
+
+    ToolBox tb = new ToolBox();
+
+    void run() throws Exception {
+        compileTestClass();
+        checkClassFile(new File(Paths.get(System.getProperty("user.dir"), "Test.class").toUri()));
+    }
+
+    void compileTestClass() throws Exception {
+        new JavacTask(tb)
+                .sources(testSource)
+                .run();
+    }
+
+    void checkClassFile(final File cfile) throws Exception {
+        ClassFile classFile = ClassFile.read(cfile);
+        for (Attribute attr : classFile.attributes) {
+            if (attr.getName(classFile.constant_pool).equals("BootstrapMethods")) {
+                BootstrapMethods_attribute bsmAttr = (BootstrapMethods_attribute)attr;
+                BootstrapMethodSpecifier bsmSpecifier = bsmAttr.bootstrap_method_specifiers[0];
+                Assert.check(classFile.constant_pool.get(bsmSpecifier.bootstrap_arguments[0]) instanceof CONSTANT_MethodType_info);
+                Assert.check(classFile.constant_pool.get(bsmSpecifier.bootstrap_arguments[1]) instanceof CONSTANT_MethodHandle_info);
+                Assert.check(classFile.constant_pool.get(bsmSpecifier.bootstrap_arguments[2]) instanceof CONSTANT_MethodType_info);
+                Assert.check(classFile.constant_pool.get(bsmSpecifier.bootstrap_arguments[3]) instanceof CONSTANT_Integer_info);
+                Assert.check(classFile.constant_pool.get(bsmSpecifier.bootstrap_arguments[4]) instanceof CONSTANT_Integer_info);
+                break;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/importscope/T8193717.java	Tue May 29 13:16:23 2018 -0700
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8193717
+ * @summary Check that code with a lot named imports can compile.
+ * @library /tools/lib
+ * @modules jdk.jdeps/com.sun.tools.classfile
+ *          jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.jdeps/com.sun.tools.javap
+ * @build toolbox.ToolBox toolbox.JavapTask
+ * @run main T8193717
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import javax.tools.ForwardingJavaFileManager;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.JavaFileObject.Kind;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.ToolProvider;
+
+import com.sun.tools.classfile.AccessFlags;
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.Attributes;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.ClassWriter;
+import com.sun.tools.classfile.ConstantPool;
+import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info;
+import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info;
+import com.sun.tools.classfile.ConstantPool.CPInfo;
+import com.sun.tools.classfile.Field;
+import com.sun.tools.classfile.Method;
+
+import toolbox.JavacTask;
+import toolbox.ToolBox;
+
+public class T8193717 {
+    public static void main(String... args) throws IOException {
+        new T8193717().run();
+    }
+
+    private static final int CLASSES = 500000;
+
+    private void run() throws IOException {
+        StringBuilder imports = new StringBuilder();
+        StringBuilder use = new StringBuilder();
+
+        for (int c = 0; c < CLASSES; c++) {
+            String simpleName = getSimpleName(c);
+            String pack = "p";
+            imports.append("import " + pack + "." + simpleName + ";\n");
+            use.append(simpleName + " " + simpleName + ";\n");
+        }
+        String source = imports.toString() + "public class T {\n" + use.toString() + "}";
+        ToolBox tb = new ToolBox();
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+
+        try (StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null)) {
+            fm.setLocationFromPaths(StandardLocation.CLASS_OUTPUT, List.of(Paths.get(".")));
+            new JavacTask(tb).sources(source)
+                             .options("-XDshould-stop.at=ATTR") //the source is too big for a classfile
+                             .fileManager(new TestJFM(fm))
+                             .run();
+        }
+    }
+
+    private static String getSimpleName(int c) {
+        return "T" + String.format("%0" + (int) Math.ceil(Math.log10(CLASSES)) + "d", c);
+    }
+
+    private byte[] generateClassFile(String name) throws IOException {
+        ConstantPool cp = new ConstantPool(new CPInfo[] {
+            new CONSTANT_Utf8_info(""),                     //0
+            new CONSTANT_Utf8_info(name.replace(".", "/")), //1
+            new CONSTANT_Class_info(null, 1),               //2
+            new CONSTANT_Utf8_info("java/lang/Object"),     //3
+            new CONSTANT_Class_info(null, 3),               //4
+        });
+        ClassFile cf = new ClassFile(0xCAFEBABE,
+                      0,
+                      51,
+                      cp,
+                      new AccessFlags(AccessFlags.ACC_ABSTRACT |
+                                      AccessFlags.ACC_INTERFACE |
+                                      AccessFlags.ACC_PUBLIC),
+                      2,
+                      4,
+                      new int[0],
+                      new Field[0],
+                      new Method[0],
+                      new Attributes(cp, new Attribute[0]));
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        new ClassWriter().write(cf, baos);
+        return baos.toByteArray();
+    }
+
+    final class TestJFM extends ForwardingJavaFileManager<JavaFileManager> {
+
+        public TestJFM(JavaFileManager fileManager) {
+            super(fileManager);
+        }
+
+        @Override
+        public Iterable<JavaFileObject> list(Location location, String packageName,
+                                             Set<Kind> kinds, boolean recurse) throws IOException {
+            if (location == StandardLocation.CLASS_PATH) {
+                if (packageName.equals("p")) {
+                    try {
+                        List<JavaFileObject> result = new ArrayList<>(CLASSES);
+
+                        for (int c = 0; c < CLASSES; c++) {
+                            result.add(new TestJFO("p." + getSimpleName(c)));
+                        }
+
+                        return result;
+                    } catch (URISyntaxException ex) {
+                        throw new IllegalStateException(ex);
+                    }
+                }
+            }
+            return super.list(location, packageName, kinds, recurse);
+        }
+
+        @Override
+        public String inferBinaryName(Location location, JavaFileObject file) {
+            if (file instanceof TestJFO) {
+                return ((TestJFO) file).name;
+            }
+            return super.inferBinaryName(location, file);
+        }
+
+        private class TestJFO extends SimpleJavaFileObject {
+
+            private final String name;
+
+            public TestJFO(String name) throws URISyntaxException {
+                super(new URI("mem://" + name.replace(".", "/") + ".class"), Kind.CLASS);
+                this.name = name;
+            }
+
+            @Override
+            public InputStream openInputStream() throws IOException {
+                return new ByteArrayInputStream(generateClassFile(name));
+            }
+        }
+
+    }
+}
--- a/test/langtools/tools/javac/lib/DPrinter.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/tools/javac/lib/DPrinter.java	Tue May 29 13:16:23 2018 -0700
@@ -81,6 +81,7 @@
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.Convert;
+import com.sun.tools.javac.util.ListBuffer;
 import com.sun.tools.javac.util.Log;
 
 
@@ -405,7 +406,7 @@
             printScope("origin",
                     (Scope) getField(scope, scope.getClass(), "origin"), Details.FULL);
         } else if (scope instanceof CompoundScope) {
-            printList("delegates", (List<?>) getField(scope, CompoundScope.class, "subScopes"));
+            printList("delegates", ((ListBuffer<?>) getField(scope, CompoundScope.class, "subScopes")).toList());
         } else {
             for (Symbol sym : scope.getSymbols()) {
                 printSymbol(sym.name.toString(), sym, Details.SUMMARY);
--- a/test/langtools/tools/javac/modules/ModuleInfoTest.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/tools/javac/modules/ModuleInfoTest.java	Tue May 29 13:16:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8158123 8161906 8162713
+ * @bug 8158123 8161906 8162713 8202832
  * @summary tests for module declarations
  * @library /tools/lib
  * @modules
@@ -37,6 +37,7 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.Arrays;
+import java.util.List;
 
 import toolbox.JavacTask;
 import toolbox.Task;
@@ -740,4 +741,61 @@
         if (!log.contains("module-info.java:1:11: compiler.err.expected: '}'"))
             throw new Exception("expected output not found");
     }
-}
\ No newline at end of file
+
+    @Test
+    public void testJDK8202832(Path base) throws Exception {
+        Path src = base.resolve("src");
+        tb.writeJavaFiles(src.resolve("m1a"),
+                          "module m1a {\n" +
+                          "    requires m2a;\n" +
+                          "    requires m2b;\n" +
+                          "}");
+        tb.writeJavaFiles(src.resolve("m1b"),
+                          "module m1b {\n" +
+                          "    requires m2b;\n" +
+                          "    requires m2a;\n" +
+                          "}");
+        tb.writeJavaFiles(src.resolve("m2a"),
+                          "module m2a {\n" +
+                          "    requires m3;\n" +
+                          "    requires m1a;\n" +
+                          "    requires m1b;\n" +
+                          "}");
+        tb.writeJavaFiles(src.resolve("m2b"),
+                          "module m2b {\n" +
+                          "    requires m3;\n" +
+                          "    requires m1a;\n" +
+                          "    requires m1b;\n" +
+                          "}");
+        tb.writeJavaFiles(src.resolve("m3"),
+                          "module m3 { }");
+
+        Path classes = base.resolve("classes");
+        Files.createDirectories(classes);
+
+        List<String> log = new JavacTask(tb)
+                .options("-XDrawDiagnostics",
+                         "--module-source-path", src.toString())
+                .outdir(classes)
+                .files(src.resolve("m1a").resolve("module-info.java"),
+                       src.resolve("m1b").resolve("module-info.java"),
+                       src.resolve("m2a").resolve("module-info.java"),
+                       src.resolve("m2b").resolve("module-info.java"),
+                       src.resolve("m3").resolve("module-info.java"))
+                .run(Task.Expect.FAIL)
+                .writeAll()
+                .getOutputLines(Task.OutputKind.DIRECT);
+
+        List<String> expected = List.of("module-info.java:2:14: compiler.err.cyclic.requires: m2b",
+                                        "module-info.java:3:14: compiler.err.cyclic.requires: m2a",
+                                        "module-info.java:3:14: compiler.err.cyclic.requires: m1a",
+                                        "module-info.java:4:14: compiler.err.cyclic.requires: m1b",
+                                        "module-info.java:2:14: compiler.err.cyclic.requires: m2a",
+                                        "module-info.java:3:14: compiler.err.cyclic.requires: m2b",
+                                        "module-info.java:3:14: compiler.err.cyclic.requires: m1a",
+                                        "module-info.java:4:14: compiler.err.cyclic.requires: m1b",
+                                        "8 errors");
+        if (!expected.equals(log))
+            throw new Exception("expected output not found");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/types/VarInstanceMemberTest.java	Tue May 29 13:16:23 2018 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8202178
+ * @summary Make sure that var kind != None
+ * @compile -Werror -Xlint:all VarInstanceMemberTest.java
+ * @run main VarInstanceMemberTest
+ */
+
+import java.net.URI;
+import java.util.Arrays;
+
+import javax.lang.model.type.TypeKind;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.tree.VariableTree;
+import com.sun.source.util.*;
+
+public class VarInstanceMemberTest {
+
+    static class JavaSource extends SimpleJavaFileObject {
+
+        final static String sourceStub = "class Test {var v1;}";
+
+        public JavaSource() {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return sourceStub;
+        }
+
+    }
+
+    public static void main(String[] args) throws Exception {
+        check();
+
+    }
+
+    static void check() throws Exception {
+        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+        DiagnosticCollector<JavaFileObject> dc = new DiagnosticCollector<JavaFileObject>();
+        JavacTask ct = (JavacTask) tool.getTask(null, null, dc,
+                null, null, Arrays.asList(new JavaSource()));
+        CompilationUnitTree tree = ct.parse().iterator().next();
+
+        ct.analyze();
+        new TreePathScanner<Object, Object>() {
+            @Override
+            public Object visitVariable(VariableTree node, Object p) {
+                TypeKind kind = Trees.instance(ct).getElement(getCurrentPath()).asType().getKind();
+                if (kind != TypeKind.ERROR) {
+                    throw new AssertionError("Kind = " + Trees.instance(ct).getElement(getCurrentPath()).asType().getKind());
+                }
+                return super.visitVariable(node, p);
+            }
+        }.scan(tree, null);
+    }
+
+}
+
--- a/test/langtools/tools/javadoc/api/basic/APITest.java	Sat May 26 20:29:15 2018 -0700
+++ b/test/langtools/tools/javadoc/api/basic/APITest.java	Tue May 29 13:16:23 2018 -0700
@@ -190,9 +190,8 @@
      * Standard files generated by processing a documented class pkg.C.
      */
     protected static Set<String> standardExpectFiles = new HashSet<>(Arrays.asList(
-            "allclasses-frame.html",
+            "allclasses.html",
             "allclasses-index.html",
-            "allclasses-noframe.html",
             "allpackages-index.html",
             "constant-values.html",
             "deprecated-list.html",
@@ -233,7 +232,6 @@
             "package-search-index.js",
             "package-search-index.zip",
             "pkg/C.html",
-            "pkg/package-frame.html",
             "pkg/package-summary.html",
             "pkg/package-tree.html",
             "resources/glass.png",