hotspot/src/share/vm/code/nmethod.cpp
changeset 2131 98f9cef66a34
parent 1406 e5e2b519fc11
child 3696 9e5d9b5e1049
child 3686 69c1b5228547
equal deleted inserted replaced
2130:f935aa562118 2131:98f9cef66a34
   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);