# HG changeset patch # User johnc # Date 1348094882 25200 # Node ID bc675e55b48c7c2eb5ebae646e9201379e788c1b # Parent 8fbf05030e24f518eaf79a108a7b90fbfb7548d5 7193946: Move warnings associated with UseMemSetInBOT flag Summary: The warnings associated with the UseMemSetInBOT flag are duplicated in CMS and G1. The separate warnings have been removed and single instance of the warning has been placed in a common location. Reviewed-by: brutisso, ysr diff -r 8fbf05030e24 -r bc675e55b48c src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Sep 19 08:48:10 2012 -0700 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Sep 19 15:48:02 2012 -0700 @@ -789,14 +789,6 @@ _gc_counters = new CollectorCounters("CMS", 1); _completed_initialization = true; _inter_sweep_timer.start(); // start of time -#ifdef SPARC - // Issue a stern warning, but allow use for experimentation and debugging. - if (VM_Version::is_sun4v() && UseMemSetInBOT) { - assert(!FLAG_IS_DEFAULT(UseMemSetInBOT), "Error"); - warning("Experimental flag -XX:+UseMemSetInBOT is known to cause instability" - " on sun4v; please understand that you are using at your own risk!"); - } -#endif } const char* ConcurrentMarkSweepGeneration::name() const { diff -r 8fbf05030e24 -r bc675e55b48c src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Sep 19 08:48:10 2012 -0700 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Sep 19 15:48:02 2012 -0700 @@ -1954,14 +1954,6 @@ NOT_PRODUCT(reset_evacuation_should_fail();) guarantee(_task_queues != NULL, "task_queues allocation failure."); -#ifdef SPARC - // Issue a stern warning, but allow use for experimentation and debugging. - if (VM_Version::is_sun4v() && UseMemSetInBOT) { - assert(!FLAG_IS_DEFAULT(UseMemSetInBOT), "Error"); - warning("Experimental flag -XX:+UseMemSetInBOT is known to cause instability" - " on sun4v; please understand that you are using at your own risk!"); - } -#endif } jint G1CollectedHeap::initialize() { diff -r 8fbf05030e24 -r bc675e55b48c src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Wed Sep 19 08:48:10 2012 -0700 +++ b/src/share/vm/runtime/arguments.cpp Wed Sep 19 15:48:02 2012 -0700 @@ -1978,6 +1978,19 @@ status = status && verify_min_value(ClassMetaspaceSize, 1*M, "ClassMetaspaceSize"); +#ifdef SPARC + if (UseConcMarkSweepGC || UseG1GC) { + // Issue a stern warning if the user has explicitly set + // UseMemSetInBOT (it is known to cause issues), but allow + // use for experimentation and debugging. + if (VM_Version::is_sun4v() && UseMemSetInBOT) { + assert(!FLAG_IS_DEFAULT(UseMemSetInBOT), "Error"); + warning("Experimental flag -XX:+UseMemSetInBOT is known to cause instability" + " on sun4v; please understand that you are using at your own risk!"); + } + } +#endif // SPARC + return status; }