# HG changeset patch # User minqi # Date 1364456655 25200 # Node ID d7adf726b18a0b45e95a2ca504989dd4227758bc # Parent f044c45bee68205bb5e4b437a4aa94c2527c9d44# Parent 1b90c7607451b1e80ce75500178fa832927f253f Merge diff -r f044c45bee68 -r d7adf726b18a src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Wed Mar 27 22:05:21 2013 -0700 +++ b/src/share/vm/runtime/arguments.cpp Thu Mar 28 00:44:15 2013 -0700 @@ -3325,6 +3325,13 @@ } check_deprecated_gcs(); check_deprecated_gc_flags(); + if (AssumeMP && !UseSerialGC) { + if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) { + warning("If the number of processors is expected to increase from one, then" + " you should configure the number of parallel GC threads appropriately" + " using -XX:ParallelGCThreads=N"); + } + } #else // INCLUDE_ALL_GCS assert(verify_serial_gc_flags(), "SerialGC unset"); #endif // INCLUDE_ALL_GCS diff -r f044c45bee68 -r d7adf726b18a src/share/vm/runtime/globals.hpp --- a/src/share/vm/runtime/globals.hpp Wed Mar 27 22:05:21 2013 -0700 +++ b/src/share/vm/runtime/globals.hpp Thu Mar 28 00:44:15 2013 -0700 @@ -457,6 +457,9 @@ lp64_product(intx, ObjectAlignmentInBytes, 8, \ "Default object alignment in bytes, 8 is minimum") \ \ + product(bool, AssumeMP, false, \ + "Instruct the VM to assume multiple processors are available") \ + \ /* UseMembar is theoretically a temp flag used for memory barrier \ * removal testing. It was supposed to be removed before FCS but has \ * been re-added (see 6401008) */ \ diff -r f044c45bee68 -r d7adf726b18a src/share/vm/runtime/os.hpp --- a/src/share/vm/runtime/os.hpp Wed Mar 27 22:05:21 2013 -0700 +++ b/src/share/vm/runtime/os.hpp Thu Mar 28 00:44:15 2013 -0700 @@ -180,7 +180,7 @@ // Interface for detecting multiprocessor system static inline bool is_MP() { assert(_processor_count > 0, "invalid processor count"); - return _processor_count > 1; + return _processor_count > 1 || AssumeMP; } static julong available_memory(); static julong physical_memory();