comparison src/share/vm/code/codeCache.cpp @ 1363:ed4f78aa9282

6940520: CodeCache::scavenge_root_nmethods_do must fix oop relocations Summary: ScavengeRootsInCode can lead to unfixed code-embedded oops. Reviewed-by: kvn, never
author twisti
date Tue, 06 Apr 2010 13:39:52 +0200
parents 5f24d0319e54
children bfe29ec02863
comparison
equal deleted inserted replaced
1351:9bb91718aaf2 1363:ed4f78aa9282
1 /* 1 /*
2 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2010 Sun Microsystems, Inc. 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.
282 #ifndef PRODUCT 282 #ifndef PRODUCT
283 if (TraceScavenge) { 283 if (TraceScavenge) {
284 cur->print_on(tty, is_live ? "scavenge root" : "dead scavenge root"); tty->cr(); 284 cur->print_on(tty, is_live ? "scavenge root" : "dead scavenge root"); tty->cr();
285 } 285 }
286 #endif //PRODUCT 286 #endif //PRODUCT
287 if (is_live) 287 if (is_live) {
288 // Perform cur->oops_do(f), maybe just once per nmethod. 288 // Perform cur->oops_do(f), maybe just once per nmethod.
289 f->do_code_blob(cur); 289 f->do_code_blob(cur);
290 cur->fix_oop_relocations();
291 }
290 } 292 }
291 293
292 // Check for stray marks. 294 // Check for stray marks.
293 debug_only(verify_perm_nmethods(NULL)); 295 debug_only(verify_perm_nmethods(NULL));
294 } 296 }