< prev index next >
src/share/vm/code/nmethod.cpp
Print this page
rev 10557 : 8153267: nmethod's exception cache not multi-thread safe
Reviewed-by:
*** 439,452 ****
void nmethod::add_exception_cache_entry(ExceptionCache* new_entry) {
assert(ExceptionCache_lock->owned_by_self(),"Must hold the ExceptionCache_lock");
assert(new_entry != NULL,"Must be non null");
assert(new_entry->next() == NULL, "Must be null");
! if (exception_cache() != NULL) {
! new_entry->set_next(exception_cache());
}
! set_exception_cache(new_entry);
}
void nmethod::clean_exception_cache(BoolObjectClosure* is_alive) {
ExceptionCache* prev = NULL;
ExceptionCache* curr = exception_cache();
--- 439,453 ----
void nmethod::add_exception_cache_entry(ExceptionCache* new_entry) {
assert(ExceptionCache_lock->owned_by_self(),"Must hold the ExceptionCache_lock");
assert(new_entry != NULL,"Must be non null");
assert(new_entry->next() == NULL, "Must be null");
! ExceptionCache *ec = exception_cache();
! if (ec != NULL) {
! new_entry->set_next(ec);
}
! release_set_exception_cache(new_entry);
}
void nmethod::clean_exception_cache(BoolObjectClosure* is_alive) {
ExceptionCache* prev = NULL;
ExceptionCache* curr = exception_cache();
< prev index next >