13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #include "precompiled.hpp"
27 #include "gc/cms/cmsArguments.hpp"
28 #include "gc/cms/cmsCollectorPolicy.hpp"
29 #include "gc/cms/cmsHeap.hpp"
30 #include "gc/cms/compactibleFreeListSpace.hpp"
31 #include "gc/shared/gcArguments.inline.hpp"
32 #include "gc/shared/genCollectedHeap.hpp"
33 #include "runtime/arguments.hpp"
34 #include "runtime/globals.hpp"
35 #include "runtime/globals_extension.hpp"
36 #include "runtime/vm_version.hpp"
37 #include "utilities/defaultStream.hpp"
38
39 size_t CMSArguments::conservative_max_heap_alignment() {
40 return GenCollectedHeap::conservative_max_heap_alignment();
41 }
42
43 void CMSArguments::set_parnew_gc_flags() {
44 assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC && !UseG1GC,
45 "control point invariant");
46 assert(UseConcMarkSweepGC, "CMS is expected to be on here");
47
48 if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
49 FLAG_SET_DEFAULT(ParallelGCThreads, VM_Version::parallel_worker_threads());
50 assert(ParallelGCThreads > 0, "We should always have at least one thread by default");
51 } else if (ParallelGCThreads == 0) {
52 jio_fprintf(defaultStream::error_stream(),
53 "The ParNew GC can not be combined with -XX:ParallelGCThreads=0\n");
54 vm_exit(1);
55 }
56
57 // By default YoungPLABSize and OldPLABSize are set to 4096 and 1024 respectively,
58 // these settings are default for Parallel Scavenger. For ParNew+Tenured configuration
59 // we set them to 1024 and 1024.
60 // See CR 6362902.
61 if (FLAG_IS_DEFAULT(YoungPLABSize)) {
62 FLAG_SET_DEFAULT(YoungPLABSize, (intx)1024);
63 }
64 if (FLAG_IS_DEFAULT(OldPLABSize)) {
65 FLAG_SET_DEFAULT(OldPLABSize, (intx)1024);
66 }
67
68 // When using compressed oops, we use local overflow stacks,
69 // rather than using a global overflow list chained through
|
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #include "precompiled.hpp"
27 #include "gc/cms/cmsArguments.hpp"
28 #include "gc/cms/cmsCollectorPolicy.hpp"
29 #include "gc/cms/cmsHeap.hpp"
30 #include "gc/cms/compactibleFreeListSpace.hpp"
31 #include "gc/shared/gcArguments.inline.hpp"
32 #include "gc/shared/genCollectedHeap.hpp"
33 #include "gc/shared/workerPolicy.hpp"
34 #include "runtime/arguments.hpp"
35 #include "runtime/globals.hpp"
36 #include "runtime/globals_extension.hpp"
37 #include "utilities/defaultStream.hpp"
38
39 size_t CMSArguments::conservative_max_heap_alignment() {
40 return GenCollectedHeap::conservative_max_heap_alignment();
41 }
42
43 void CMSArguments::set_parnew_gc_flags() {
44 assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC && !UseG1GC,
45 "control point invariant");
46 assert(UseConcMarkSweepGC, "CMS is expected to be on here");
47
48 if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
49 FLAG_SET_DEFAULT(ParallelGCThreads, WorkerPolicy::parallel_worker_threads());
50 assert(ParallelGCThreads > 0, "We should always have at least one thread by default");
51 } else if (ParallelGCThreads == 0) {
52 jio_fprintf(defaultStream::error_stream(),
53 "The ParNew GC can not be combined with -XX:ParallelGCThreads=0\n");
54 vm_exit(1);
55 }
56
57 // By default YoungPLABSize and OldPLABSize are set to 4096 and 1024 respectively,
58 // these settings are default for Parallel Scavenger. For ParNew+Tenured configuration
59 // we set them to 1024 and 1024.
60 // See CR 6362902.
61 if (FLAG_IS_DEFAULT(YoungPLABSize)) {
62 FLAG_SET_DEFAULT(YoungPLABSize, (intx)1024);
63 }
64 if (FLAG_IS_DEFAULT(OldPLABSize)) {
65 FLAG_SET_DEFAULT(OldPLABSize, (intx)1024);
66 }
67
68 // When using compressed oops, we use local overflow stacks,
69 // rather than using a global overflow list chained through
|