mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
6794422: Perm gen expansion policy for concurrent collectors
Concurrent collectors should expand the perm gen without a full STW GC, but possibly by triggering a concurrent collection. Temporary band-aid for G1 where no concurrent collection is kicked off since the perm gen is not collected concurrently. Reviewed-by: johnc
This commit is contained in:
parent
603e50f355
commit
8fbdf5c7f0
5 changed files with 52 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -50,6 +50,18 @@ HeapWord* CMSPermGen::mem_allocate(size_t size) {
|
|||
}
|
||||
}
|
||||
|
||||
HeapWord* CMSPermGen::request_expand_and_allocate(Generation* gen,
|
||||
size_t size,
|
||||
GCCause::Cause prev_cause /* ignored */) {
|
||||
HeapWord* obj = gen->expand_and_allocate(size, false);
|
||||
if (gen->capacity() >= _capacity_expansion_limit) {
|
||||
set_capacity_expansion_limit(gen->capacity() + MaxPermHeapExpansion);
|
||||
assert(((ConcurrentMarkSweepGeneration*)gen)->should_concurrent_collect(),
|
||||
"Should kick off a collection if one not in progress");
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
void CMSPermGen::compute_new_size() {
|
||||
_gen->compute_new_size();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue