src/share/vm/interpreter/interpreterRuntime.cpp

changeset 2328
9bc798875b2a
parent 2314
f95d63e2154a
child 2438
dd031b2226de
child 2462
8012aa3ccede
equal deleted inserted replaced
2327:cb2d0a362639 2328:9bc798875b2a
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;

mercurial