mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7028374: race in fix_oop_relocations for scavengeable nmethods
Reviewed-by: kvn
This commit is contained in:
parent
0317c7c485
commit
f5ef48f3b9
11 changed files with 115 additions and 13 deletions
|
@ -337,7 +337,6 @@ void CodeCache::scavenge_root_nmethods_do(CodeBlobClosure* f) {
|
|||
if (is_live) {
|
||||
// Perform cur->oops_do(f), maybe just once per nmethod.
|
||||
f->do_code_blob(cur);
|
||||
cur->fix_oop_relocations();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -552,6 +551,19 @@ void CodeCache::gc_epilogue() {
|
|||
}
|
||||
|
||||
|
||||
void CodeCache::verify_oops() {
|
||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
VerifyOopClosure voc;
|
||||
FOR_ALL_ALIVE_BLOBS(cb) {
|
||||
if (cb->is_nmethod()) {
|
||||
nmethod *nm = (nmethod*)cb;
|
||||
nm->oops_do(&voc);
|
||||
nm->verify_oop_relocations();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
address CodeCache::first_address() {
|
||||
assert_locked_or_safepoint(CodeCache_lock);
|
||||
return (address)_heap->begin();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue