mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8134493: Cleaning inline caches of unloaded nmethods should be done in sweeper
Clean ICs of unloaded nmethods in sweeper to avoid impact on safepoint duration. Reviewed-by: kvn, mdoerr
This commit is contained in:
parent
9dcbe322e0
commit
7b6480cfa4
6 changed files with 20 additions and 14 deletions
|
@ -745,13 +745,12 @@ void CodeCache::gc_prologue() {
|
|||
|
||||
void CodeCache::gc_epilogue() {
|
||||
assert_locked_or_safepoint(CodeCache_lock);
|
||||
NMethodIterator iter;
|
||||
while(iter.next()) {
|
||||
nmethod* nm = iter.method();
|
||||
if (!nm->is_zombie()) {
|
||||
if (needs_cache_clean()) {
|
||||
// Clean ICs of unloaded nmethods as well because they may reference other
|
||||
// unloaded nmethods that may be flushed earlier in the sweeper cycle.
|
||||
NOT_DEBUG(if (needs_cache_clean())) {
|
||||
NMethodIterator iter;
|
||||
while(iter.next_alive()) {
|
||||
nmethod* nm = iter.method();
|
||||
assert(!nm->is_unloaded(), "Tautology");
|
||||
DEBUG_ONLY(if (needs_cache_clean())) {
|
||||
nm->cleanup_inline_caches();
|
||||
}
|
||||
DEBUG_ONLY(nm->verify());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue