src/share/vm/runtime/sharedRuntime.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/sharedRuntime.cpp

Print this page




2405       if (VerifyAdapterSharing) {
2406         if (shared_entry != NULL) {
2407           assert(shared_entry->compare_code(buf->code_begin(), buffer.insts_size()), "code must match");
2408           // Release the one just created and return the original
2409           _adapters->free_entry(entry);
2410           return shared_entry;
2411         } else  {
2412           entry->save_code(buf->code_begin(), buffer.insts_size());
2413         }
2414       }
2415 #endif
2416 
2417       new_adapter = AdapterBlob::create(&buffer);
2418       NOT_PRODUCT(insts_size = buffer.insts_size());
2419     }
2420     if (new_adapter == NULL) {
2421       // CodeCache is full, disable compilation
2422       // Ought to log this but compile log is only per compile thread
2423       // and we're some non descript Java thread.
2424       MutexUnlocker mu(AdapterHandlerLibrary_lock);
2425       CompileBroker::handle_full_code_cache(CodeBlobType::NonMethod);
2426       return NULL; // Out of CodeCache space
2427     }
2428     entry->relocate(new_adapter->content_begin());
2429 #ifndef PRODUCT
2430     // debugging suppport
2431     if (PrintAdapterHandlers || PrintStubCode) {
2432       ttyLocker ttyl;
2433       entry->print_adapter_on(tty);
2434       tty->print_cr("i2c argument handler #%d for: %s %s %s (%d bytes generated)",
2435                     _adapters->number_of_entries(), (method->is_static() ? "static" : "receiver"),
2436                     method->signature()->as_C_string(), fingerprint->as_string(), insts_size);
2437       tty->print_cr("c2i argument handler starts at %p", entry->get_c2i_entry());
2438       if (Verbose || PrintStubCode) {
2439         address first_pc = entry->base_address();
2440         if (first_pc != NULL) {
2441           Disassembler::decode(first_pc, first_pc + insts_size);
2442           tty->cr();
2443         }
2444       }
2445     }




2405       if (VerifyAdapterSharing) {
2406         if (shared_entry != NULL) {
2407           assert(shared_entry->compare_code(buf->code_begin(), buffer.insts_size()), "code must match");
2408           // Release the one just created and return the original
2409           _adapters->free_entry(entry);
2410           return shared_entry;
2411         } else  {
2412           entry->save_code(buf->code_begin(), buffer.insts_size());
2413         }
2414       }
2415 #endif
2416 
2417       new_adapter = AdapterBlob::create(&buffer);
2418       NOT_PRODUCT(insts_size = buffer.insts_size());
2419     }
2420     if (new_adapter == NULL) {
2421       // CodeCache is full, disable compilation
2422       // Ought to log this but compile log is only per compile thread
2423       // and we're some non descript Java thread.
2424       MutexUnlocker mu(AdapterHandlerLibrary_lock);
2425       CompileBroker::handle_full_code_cache(CodeBlobType::NonNMethod);
2426       return NULL; // Out of CodeCache space
2427     }
2428     entry->relocate(new_adapter->content_begin());
2429 #ifndef PRODUCT
2430     // debugging suppport
2431     if (PrintAdapterHandlers || PrintStubCode) {
2432       ttyLocker ttyl;
2433       entry->print_adapter_on(tty);
2434       tty->print_cr("i2c argument handler #%d for: %s %s %s (%d bytes generated)",
2435                     _adapters->number_of_entries(), (method->is_static() ? "static" : "receiver"),
2436                     method->signature()->as_C_string(), fingerprint->as_string(), insts_size);
2437       tty->print_cr("c2i argument handler starts at %p", entry->get_c2i_entry());
2438       if (Verbose || PrintStubCode) {
2439         address first_pc = entry->base_address();
2440         if (first_pc != NULL) {
2441           Disassembler::decode(first_pc, first_pc + insts_size);
2442           tty->cr();
2443         }
2444       }
2445     }


src/share/vm/runtime/sharedRuntime.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File