diff a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4 --- a/make/autoconf/hotspot.m4 +++ b/make/autoconf/hotspot.m4 @@ -27,11 +27,11 @@ VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \ graal vm-structs jni-check services management epsilongc g1gc parallelgc serialgc shenandoahgc zgc nmt cds \ static-build link-time-opt aot jfr" # Deprecated JVM features (these are ignored, but with a warning) -DEPRECATED_JVM_FEATURES="trace" +DEPRECATED_JVM_FEATURES="trace cmsgc" # All valid JVM variants VALID_JVM_VARIANTS="server client minimal core zero custom" ############################################################################### diff a/src/hotspot/cpu/aarch64/globals_aarch64.hpp b/src/hotspot/cpu/aarch64/globals_aarch64.hpp --- a/src/hotspot/cpu/aarch64/globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/globals_aarch64.hpp @@ -62,11 +62,10 @@ define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); define_pd_global(bool, PreserveFramePointer, false); -// GC Ergo Flags define_pd_global(uintx, TypeProfileLevel, 111); define_pd_global(bool, CompactStrings, true); // Clear short arrays bigger than one word in an arch-specific way diff a/src/hotspot/cpu/arm/globals_arm.hpp b/src/hotspot/cpu/arm/globals_arm.hpp --- a/src/hotspot/cpu/arm/globals_arm.hpp +++ b/src/hotspot/cpu/arm/globals_arm.hpp @@ -61,11 +61,10 @@ define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); define_pd_global(bool, PreserveFramePointer, false); -// GC Ergo Flags define_pd_global(uintx, TypeProfileLevel, 0); // No performance work done here yet. define_pd_global(bool, CompactStrings, false); diff a/src/hotspot/cpu/ppc/globals_ppc.hpp b/src/hotspot/cpu/ppc/globals_ppc.hpp --- a/src/hotspot/cpu/ppc/globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/globals_ppc.hpp @@ -65,11 +65,10 @@ define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); define_pd_global(bool, PreserveFramePointer, false); -// GC Ergo Flags define_pd_global(uintx, TypeProfileLevel, 111); define_pd_global(bool, CompactStrings, true); // 2x unrolled loop is shorter with more than 9 HeapWords. diff a/src/hotspot/cpu/s390/globals_s390.hpp b/src/hotspot/cpu/s390/globals_s390.hpp --- a/src/hotspot/cpu/s390/globals_s390.hpp +++ b/src/hotspot/cpu/s390/globals_s390.hpp @@ -67,11 +67,10 @@ define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); define_pd_global(bool, PreserveFramePointer, false); -// GC Ergo Flags define_pd_global(uintx, TypeProfileLevel, 111); define_pd_global(bool, CompactStrings, true); // 8146801 (Short Array Allocation): No performance work done here yet. diff a/src/hotspot/cpu/sparc/globals_sparc.hpp b/src/hotspot/cpu/sparc/globals_sparc.hpp --- a/src/hotspot/cpu/sparc/globals_sparc.hpp +++ b/src/hotspot/cpu/sparc/globals_sparc.hpp @@ -72,11 +72,10 @@ define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); define_pd_global(bool, PreserveFramePointer, false); -// GC Ergo Flags define_pd_global(uintx, TypeProfileLevel, 111); define_pd_global(bool, CompactStrings, true); define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong); diff a/src/hotspot/cpu/x86/globals_x86.hpp b/src/hotspot/cpu/x86/globals_x86.hpp --- a/src/hotspot/cpu/x86/globals_x86.hpp +++ b/src/hotspot/cpu/x86/globals_x86.hpp @@ -79,11 +79,10 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES); define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); -// GC Ergo Flags define_pd_global(uintx, TypeProfileLevel, 111); define_pd_global(bool, CompactStrings, true); define_pd_global(bool, PreserveFramePointer, false); diff a/src/hotspot/cpu/zero/globals_zero.hpp b/src/hotspot/cpu/zero/globals_zero.hpp --- a/src/hotspot/cpu/zero/globals_zero.hpp +++ b/src/hotspot/cpu/zero/globals_zero.hpp @@ -64,11 +64,10 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES); define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); -// GC Ergo Flags define_pd_global(uintx, TypeProfileLevel, 0); define_pd_global(bool, PreserveFramePointer, false); // No performance work done here yet. diff a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp --- a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp +++ b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp @@ -296,15 +296,11 @@ * the object is newly allocated and that no safepoint exists between the * allocation and the store. * * In the case of slow allocation the allocation code must handle the barrier * as part of the allocation in the case the allocated object is not located - * in the nursery, this would happen for humongous objects. This is similar to - * how CMS was required to handle this case, see the comments for the method - * CollectedHeap::new_deferred_store_barrier and OptoRuntime::new_deferred_store_barrier. - * A deferred card mark is required for these objects and handled in the above - * mentioned methods. + * in the nursery, this would happen for humongous objects. * * Returns true if the post barrier can be removed */ bool G1BarrierSetC2::g1_can_remove_post_barrier(GraphKit* kit, PhaseTransform* phase, Node* store, diff a/src/hotspot/share/gc/parallel/psPromotionManager.hpp b/src/hotspot/share/gc/parallel/psPromotionManager.hpp --- a/src/hotspot/share/gc/parallel/psPromotionManager.hpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.hpp @@ -100,12 +100,11 @@ // On the task queues we push reference locations as well as // partially-scanned arrays (in the latter case, we push an oop to // the from-space image of the array and the length on the // from-space image indicates how many entries on the array we still - // need to scan; this is basically how ParNew did partial array - // scanning too). To be able to distinguish between reference + // need to scan. To be able to distinguish between reference // locations and partially-scanned array oops we simply mask the // latter oops with 0x01. The next three methods do the masking, // unmasking, and checking whether the oop is masked or not. Notice // that the signature of the mask and unmask methods looks a bit // strange, as they accept and return different types (oop and diff a/src/hotspot/share/gc/shared/blockOffsetTable.hpp b/src/hotspot/share/gc/shared/blockOffsetTable.hpp --- a/src/hotspot/share/gc/shared/blockOffsetTable.hpp +++ b/src/hotspot/share/gc/shared/blockOffsetTable.hpp @@ -39,11 +39,10 @@ // operation may be important. Implementations of the "BlockOffsetArray" // class may be useful in providing such efficient implementations. // // BlockOffsetTable (abstract) // - BlockOffsetArray (abstract) -// - BlockOffsetArrayNonContigSpace // - BlockOffsetArrayContigSpace // class ContiguousSpace; diff a/src/hotspot/share/gc/shared/cardTableBarrierSet.cpp b/src/hotspot/share/gc/shared/cardTableBarrierSet.cpp --- a/src/hotspot/share/gc/shared/cardTableBarrierSet.cpp +++ b/src/hotspot/share/gc/shared/cardTableBarrierSet.cpp @@ -112,15 +112,12 @@ // compensating for the missing pre-barrier here. Turning now // to the post-barrier, we note that G1 needs a RS update barrier // which simply enqueues a (sequence of) dirty cards which may // optionally be refined by the concurrent update threads. Note // that this barrier need only be applied to a non-young write, -// but, like in CMS, because of the presence of concurrent refinement -// (much like CMS' precleaning), must strictly follow the oop-store. -// Thus, using the same protocol for maintaining the intended -// invariants turns out, serendepitously, to be the same for both -// G1 and CMS. +// but, because of the presence of concurrent refinement, +// must strictly follow the oop-store. // // For any future collector, this code should be reexamined with // that specific collector in mind, and the documentation above suitably // extended and updated. void CardTableBarrierSet::on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) { diff a/src/hotspot/share/gc/shared/collectedHeap.cpp b/src/hotspot/share/gc/shared/collectedHeap.cpp --- a/src/hotspot/share/gc/shared/collectedHeap.cpp +++ b/src/hotspot/share/gc/shared/collectedHeap.cpp @@ -333,13 +333,13 @@ #ifndef PRODUCT void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size) { if (CheckMemoryInitialization && ZapUnusedHeapArea) { - // please not mismatch between size (in 32/64 bit words), and ju_addr that always point to a 32 bit word + // please note mismatch between size (in 32/64 bit words), and ju_addr that always point to a 32 bit word for (juint* ju_addr = reinterpret_cast(addr); ju_addr < reinterpret_cast(addr + size); ++ju_addr) { - assert(*ju_addr == badHeapWordVal, "Found non badHeapWordValue in pre-allocation check"); + assert(*ju_addr == badHeapWordVal, "Found non badHeapWordValue in pre-allocation check"); } } } #endif // PRODUCT diff a/src/hotspot/share/gc/shared/referenceProcessor.hpp b/src/hotspot/share/gc/shared/referenceProcessor.hpp --- a/src/hotspot/share/gc/shared/referenceProcessor.hpp +++ b/src/hotspot/share/gc/shared/referenceProcessor.hpp @@ -215,12 +215,11 @@ bool _adjust_no_of_processing_threads; // allow dynamic adjustment of processing threads // For collectors that do not keep GC liveness information // in the object header, this field holds a closure that // helps the reference processor determine the reachability - // of an oop. It is currently initialized to NULL for all - // collectors except for G1. + // of an oop. BoolObjectClosure* _is_alive_non_header; // Soft ref clearing policies // . the default policy static ReferencePolicy* _default_soft_ref_policy; diff a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -90,13 +90,10 @@ // For klass field compression inline int klass_gap() const; inline void set_klass_gap(int z); static inline void set_klass_gap(HeapWord* mem, int z); - // For when the klass pointer is being used as a linked list "next" field. - inline void set_klass_to_list_ptr(oop k); - inline oop list_ptr_from_klass(); // size of object header, aligned to platform wordSize static int header_size() { return sizeof(oopDesc)/HeapWordSize; } // Returns whether this is an instance of k or an instance of a subclass of k diff a/src/hotspot/share/oops/oop.inline.hpp b/src/hotspot/share/oops/oop.inline.hpp --- a/src/hotspot/share/oops/oop.inline.hpp +++ b/src/hotspot/share/oops/oop.inline.hpp @@ -177,30 +177,10 @@ void oopDesc::set_klass_gap(int v) { set_klass_gap((HeapWord*)this, v); } -void oopDesc::set_klass_to_list_ptr(oop k) { - // This is only to be used during GC, for from-space objects, so no - // barrier is needed. - if (UseCompressedClassPointers) { - _metadata._compressed_klass = (narrowKlass)CompressedOops::encode(k); - } else { - _metadata._klass = (Klass*)(address)k; - } -} - -oop oopDesc::list_ptr_from_klass() { - // This is only to be used during GC, for from-space objects. - if (UseCompressedClassPointers) { - return CompressedOops::decode((narrowOop)_metadata._compressed_klass); - } else { - // Special case for GC - return (oop)(address)_metadata._klass; - } -} - bool oopDesc::is_a(Klass* k) const { return klass()->is_subtype_of(k); } int oopDesc::size() { diff a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -2613,14 +2613,14 @@ if (FLAG_SET_CMDLINE(ClassUnloading, false) != JVMFlag::SUCCESS) { return JNI_EINVAL; } // -Xconcgc } else if (match_option(option, "-Xconcgc")) { - handle_extra_cms_flags("-Xconcgc uses UseConcMarkSweepGC"); + warning("-Xconcgc uses UseConcMarkSweepGC; support was removed for both options in 14.0"); // -Xnoconcgc } else if (match_option(option, "-Xnoconcgc")) { - handle_extra_cms_flags("-Xnoconcgc uses UseConcMarkSweepGC"); + warning("-Xnoconcgc uses UseConcMarkSweepGC; support was removed for both options in 14.0"); // -Xbatch } else if (match_option(option, "-Xbatch")) { if (FLAG_SET_CMDLINE(BackgroundCompilation, false) != JVMFlag::SUCCESS) { return JNI_EINVAL; } @@ -3857,19 +3857,10 @@ LogConfiguration::configure_stdout(LogLevel::Info, !PrintGCDetails, LOG_TAGS(gc)); } return true; } -void Arguments::handle_extra_cms_flags(const char* msg) { - SpecialFlag flag; - const char *flag_name = "UseConcMarkSweepGC"; - if (lookup_special_flag(flag_name, flag)) { - handle_aliases_and_deprecation(flag_name, /* print warning */ true); - warning("%s", msg); - } -} - // Parse entry point called from JNI_CreateJavaVM jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) { assert(verify_special_jvm_flags(), "deprecated and obsolete flag table inconsistent"); diff a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp --- a/src/hotspot/share/runtime/arguments.hpp +++ b/src/hotspot/share/runtime/arguments.hpp @@ -423,12 +423,10 @@ static jint match_special_option_and_act(const JavaVMInitArgs* args, ScopedVMInitArgs* args_out); static bool handle_deprecated_print_gc_flags(); - static void handle_extra_cms_flags(const char* msg); - static jint parse_vm_init_args(const JavaVMInitArgs *java_tool_options_args, const JavaVMInitArgs *java_options_args, const JavaVMInitArgs *cmd_line_args); static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_mod_javabase, JVMFlag::Flags origin); static jint finalize_vm_init_args(bool patch_mod_javabase); diff a/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java b/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java --- a/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java +++ b/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java @@ -60,11 +60,11 @@ l = null; dummy = null; } public static void triggerUnloading() { - allocateMemory(16 * 1024); // yg size is 8m with cms[[keep?]], force young collection + allocateMemory(16 * 1024); // force young collection System.gc(); } /** * Creates a class loader that loads classes from {@code ${test.class.path}} diff a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java @@ -42,13 +42,13 @@ * JVMTI_VERBOSE_GC flag in Onload phase. * The test's script wrapper runs the 'gf08t001' class twice. * First time, with "setVerboseMode=yes" agent mode. Second * time, with "setVerboseMode=no" agent mode and with * "-verbose:gc" VM option. In both cases the output is - * searched for 'Full GC' string, unless ExplicitGCInvokesConcurrent - * is enabled and G1 is enbled. If ExplicitGCInvokesConcurrent and - * G1 is enbled the test searches for 'GC' string in output. + * searched for 'Pause Full' string, unless ExplicitGCInvokesConcurrent + * is enabled and G1 is enabled. If ExplicitGCInvokesConcurrent and + * G1 is enabled the test searches for 'GC' string in output. * The test fails if this string is not found in the output. * COMMENTS * * @library /vmTestbase * /test/lib diff a/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java b/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java --- a/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java +++ b/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java @@ -59,11 +59,11 @@ } ProcessBuilder pb = ProcessTools. createJavaProcessBuilder( "--add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED", - "-XX:+UseConcG1GC", // this will cause MaxNewSize to be FLAG_SET_ERGO + "-XX:+UseG1GC", // this will cause MaxNewSize to be FLAG_SET_ERGO "-XX:+UseCodeAging", "-XX:+UseCerealGC", // Should be ignored. "-XX:Flags=" + flagsFile.getAbsolutePath(), "-Djdk.attach.allowAttachSelf", "-cp", System.getProperty("test.class.path"), diff a/test/jdk/jdk/jfr/event/gc/collection/GCEventAll.java b/test/jdk/jdk/jfr/event/gc/collection/GCEventAll.java --- a/test/jdk/jdk/jfr/event/gc/collection/GCEventAll.java +++ b/test/jdk/jdk/jfr/event/gc/collection/GCEventAll.java @@ -239,11 +239,10 @@ verifyCollectionCount(oldCollector, eventCounts.collectionCountOld, beanCounts.collectionCountOld); } private void verifyCollectionCount(String collector, long eventCounts, long beanCounts) { if (GCHelper.gcG1Old.equals(oldCollector)) { - // ConcurrentMarkSweep mixes old and new collections. Not same values as in MXBean. // MXBean does not report old collections for G1Old, so we have nothing to compare with. return; } // JFR events and GarbageCollectorMXBean events are not updated at the same time. // This means that number of collections may diff.