equal
deleted
inserted
replaced
378 |
378 |
379 |
379 |
380 void nmethod::add_handler_for_exception_and_pc(Handle exception, address pc, address handler) { |
380 void nmethod::add_handler_for_exception_and_pc(Handle exception, address pc, address handler) { |
381 // There are potential race conditions during exception cache updates, so we |
381 // There are potential race conditions during exception cache updates, so we |
382 // must own the ExceptionCache_lock before doing ANY modifications. Because |
382 // must own the ExceptionCache_lock before doing ANY modifications. Because |
383 // we dont lock during reads, it is possible to have several threads attempt |
383 // we don't lock during reads, it is possible to have several threads attempt |
384 // to update the cache with the same data. We need to check for already inserted |
384 // to update the cache with the same data. We need to check for already inserted |
385 // copies of the current data before adding it. |
385 // copies of the current data before adding it. |
386 |
386 |
387 MutexLocker ml(ExceptionCache_lock); |
387 MutexLocker ml(ExceptionCache_lock); |
388 ExceptionCache* target_entry = exception_cache_entry_for_exception(exception); |
388 ExceptionCache* target_entry = exception_cache_entry_for_exception(exception); |