mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
7112413: JVM Crash, possibly GC-related
Disable UseAdaptiveSizePolicy with the CMS and ParNew Reviewed-by: johnc, brutisso
This commit is contained in:
parent
802519ea53
commit
3eb017ee50
1 changed files with 15 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1040,6 +1040,16 @@ void Arguments::set_tiered_flags() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef KERNEL
|
#ifndef KERNEL
|
||||||
|
static void disable_adaptive_size_policy(const char* collector_name) {
|
||||||
|
if (UseAdaptiveSizePolicy) {
|
||||||
|
if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
|
||||||
|
warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
|
||||||
|
collector_name);
|
||||||
|
}
|
||||||
|
FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the user has chosen ParallelGCThreads > 0, we set UseParNewGC
|
// If the user has chosen ParallelGCThreads > 0, we set UseParNewGC
|
||||||
// if it's not explictly set or unset. If the user has chosen
|
// if it's not explictly set or unset. If the user has chosen
|
||||||
// UseParNewGC and not explicitly set ParallelGCThreads we
|
// UseParNewGC and not explicitly set ParallelGCThreads we
|
||||||
|
@ -1049,11 +1059,8 @@ void Arguments::set_parnew_gc_flags() {
|
||||||
"control point invariant");
|
"control point invariant");
|
||||||
assert(UseParNewGC, "Error");
|
assert(UseParNewGC, "Error");
|
||||||
|
|
||||||
// Turn off AdaptiveSizePolicy by default for parnew until it is
|
// Turn off AdaptiveSizePolicy for parnew until it is complete.
|
||||||
// complete.
|
disable_adaptive_size_policy("UseParNewGC");
|
||||||
if (FLAG_IS_DEFAULT(UseAdaptiveSizePolicy)) {
|
|
||||||
FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ParallelGCThreads == 0) {
|
if (ParallelGCThreads == 0) {
|
||||||
FLAG_SET_DEFAULT(ParallelGCThreads,
|
FLAG_SET_DEFAULT(ParallelGCThreads,
|
||||||
|
@ -1110,11 +1117,8 @@ void Arguments::set_cms_and_parnew_gc_flags() {
|
||||||
FLAG_SET_ERGO(bool, UseParNewGC, true);
|
FLAG_SET_ERGO(bool, UseParNewGC, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Turn off AdaptiveSizePolicy by default for cms until it is
|
// Turn off AdaptiveSizePolicy for CMS until it is complete.
|
||||||
// complete.
|
disable_adaptive_size_policy("UseConcMarkSweepGC");
|
||||||
if (FLAG_IS_DEFAULT(UseAdaptiveSizePolicy)) {
|
|
||||||
FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// In either case, adjust ParallelGCThreads and/or UseParNewGC
|
// In either case, adjust ParallelGCThreads and/or UseParNewGC
|
||||||
// as needed.
|
// as needed.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue