mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6539517: CR 6186200 should be extended to perm gen allocation to prevent spurious OOM's from perm gen
Reviewed-by: ysr, jmasa
This commit is contained in:
parent
6bfbc36dcd
commit
252a10cf1a
14 changed files with 165 additions and 80 deletions
|
@ -32,6 +32,12 @@ volatile bool GC_locker::_doing_gc = false;
|
|||
|
||||
void GC_locker::stall_until_clear() {
|
||||
assert(!JavaThread::current()->in_critical(), "Would deadlock");
|
||||
if (PrintJNIGCStalls && PrintGCDetails) {
|
||||
ResourceMark rm; // JavaThread::name() allocates to convert to UTF8
|
||||
gclog_or_tty->print_cr(
|
||||
"Allocation failed. Thread \"%s\" is stalled by JNI critical section.",
|
||||
JavaThread::current()->name());
|
||||
}
|
||||
MutexLocker ml(JNICritical_lock);
|
||||
// Wait for _needs_gc to be cleared
|
||||
while (GC_locker::needs_gc()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue