hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
changeset 7411 afcfb75ccae1
parent 7397 5b173b4ca846
child 7913 dd096a83bdbb
child 7889 02144432d0e1
equal deleted inserted replaced
7410:f5b282e7a7a6 7411:afcfb75ccae1
  1191     } else {
  1191     } else {
  1192       // set handler
  1192       // set handler
  1193       method->set_signature_handler(_handlers->at(handler_index));
  1193       method->set_signature_handler(_handlers->at(handler_index));
  1194     }
  1194     }
  1195   }
  1195   }
       
  1196 #ifdef ASSERT
       
  1197   int handler_index, fingerprint_index;
       
  1198   {
       
  1199     // '_handlers' and '_fingerprints' are 'GrowableArray's and are NOT synchronized
       
  1200     // in any way if accessed from multiple threads. To avoid races with another
       
  1201     // thread which may change the arrays in the above, mutex protected block, we
       
  1202     // have to protect this read access here with the same mutex as well!
       
  1203     MutexLocker mu(SignatureHandlerLibrary_lock);
       
  1204     handler_index = _handlers->find(method->signature_handler());
       
  1205     fingerprint_index = _fingerprints->find(Fingerprinter(method).fingerprint());
       
  1206   }
  1196   assert(method->signature_handler() == Interpreter::slow_signature_handler() ||
  1207   assert(method->signature_handler() == Interpreter::slow_signature_handler() ||
  1197          _handlers->find(method->signature_handler()) == _fingerprints->find(Fingerprinter(method).fingerprint()),
  1208          handler_index == fingerprint_index, "sanity check");
  1198          "sanity check");
  1209 #endif
  1199 }
  1210 }
  1200 
  1211 
  1201 
  1212 
  1202 BufferBlob*              SignatureHandlerLibrary::_handler_blob = NULL;
  1213 BufferBlob*              SignatureHandlerLibrary::_handler_blob = NULL;
  1203 address                  SignatureHandlerLibrary::_handler      = NULL;
  1214 address                  SignatureHandlerLibrary::_handler      = NULL;