Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp @ 1839:e41cd7fd68a6
6794422: Perm gen expansion policy for concurrent collectors
Summary: 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
author | ysr |
---|---|
date | Fri, 01 Oct 2010 16:12:54 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1838:8f6f7587d292 | 1839:e41cd7fd68a6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
48 } else { | 48 } else { |
49 return mem_allocate_in_gen(size, _gen); | 49 return mem_allocate_in_gen(size, _gen); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 HeapWord* CMSPermGen::request_expand_and_allocate(Generation* gen, | |
54 size_t size, | |
55 GCCause::Cause prev_cause /* ignored */) { | |
56 HeapWord* obj = gen->expand_and_allocate(size, false); | |
57 if (gen->capacity() >= _capacity_expansion_limit) { | |
58 set_capacity_expansion_limit(gen->capacity() + MaxPermHeapExpansion); | |
59 assert(((ConcurrentMarkSweepGeneration*)gen)->should_concurrent_collect(), | |
60 "Should kick off a collection if one not in progress"); | |
61 } | |
62 return obj; | |
63 } | |
64 | |
53 void CMSPermGen::compute_new_size() { | 65 void CMSPermGen::compute_new_size() { |
54 _gen->compute_new_size(); | 66 _gen->compute_new_size(); |
55 } | 67 } |
56 | 68 |
57 void CMSPermGenGen::initialize_performance_counters() { | 69 void CMSPermGenGen::initialize_performance_counters() { |