src/share/vm/code/compiledIC.cpp

changeset 8075
be740540f60c
parent 8074
c1950f51ed60
child 8604
04d83ba48607
child 8997
f8a45a60bc6b
equal deleted inserted replaced
8074:c1950f51ed60 8075:be740540f60c
285 CodeBlob* caller = CodeCache::find_blob_unsafe(instruction_address()); 285 CodeBlob* caller = CodeCache::find_blob_unsafe(instruction_address());
286 bool is_c1_method = caller->is_compiled_by_c1(); 286 bool is_c1_method = caller->is_compiled_by_c1();
287 assert( is_c1_method || 287 assert( is_c1_method ||
288 !is_monomorphic || 288 !is_monomorphic ||
289 is_optimized() || 289 is_optimized() ||
290 !caller->is_alive() ||
290 (cached_metadata() != NULL && cached_metadata()->is_klass()), "sanity check"); 291 (cached_metadata() != NULL && cached_metadata()->is_klass()), "sanity check");
291 #endif // ASSERT 292 #endif // ASSERT
292 return is_monomorphic; 293 return is_monomorphic;
293 } 294 }
294 295
319 } 320 }
320 return is_call_to_interpreted; 321 return is_call_to_interpreted;
321 } 322 }
322 323
323 324
324 void CompiledIC::set_to_clean() { 325 void CompiledIC::set_to_clean(bool in_use) {
325 assert(SafepointSynchronize::is_at_safepoint() || CompiledIC_lock->is_locked() , "MT-unsafe call"); 326 assert(SafepointSynchronize::is_at_safepoint() || CompiledIC_lock->is_locked() , "MT-unsafe call");
326 if (TraceInlineCacheClearing || TraceICs) { 327 if (TraceInlineCacheClearing || TraceICs) {
327 tty->print_cr("IC@" INTPTR_FORMAT ": set to clean", p2i(instruction_address())); 328 tty->print_cr("IC@" INTPTR_FORMAT ": set to clean", p2i(instruction_address()));
328 print(); 329 print();
329 } 330 }
335 entry = SharedRuntime::get_resolve_virtual_call_stub(); 336 entry = SharedRuntime::get_resolve_virtual_call_stub();
336 } 337 }
337 338
338 // A zombie transition will always be safe, since the metadata has already been set to NULL, so 339 // A zombie transition will always be safe, since the metadata has already been set to NULL, so
339 // we only need to patch the destination 340 // we only need to patch the destination
340 bool safe_transition = is_optimized() || SafepointSynchronize::is_at_safepoint(); 341 bool safe_transition = !in_use || is_optimized() || SafepointSynchronize::is_at_safepoint();
341 342
342 if (safe_transition) { 343 if (safe_transition) {
343 // Kill any leftover stub we might have too 344 // Kill any leftover stub we might have too
344 clear_ic_stub(); 345 clear_ic_stub();
345 if (is_optimized()) { 346 if (is_optimized()) {

mercurial