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
rev 9032 : 8137167: JEP165: Compiler Control: Implementation task
Summary: Compiler Control JEP
Reviewed-by: roland, twisti


2595       SignatureStream ss(method->signature());
2596       for (; !ss.at_return_type(); ss.next()) {
2597         sig_bt[i++] = ss.type();  // Collect remaining bits of signature
2598         if (ss.type() == T_LONG || ss.type() == T_DOUBLE)
2599           sig_bt[i++] = T_VOID;   // Longs & doubles take 2 Java slots
2600       }
2601       assert(i == total_args_passed, "");
2602       BasicType ret_type = ss.type();
2603 
2604       // Now get the compiled-Java layout as input (or output) arguments.
2605       // NOTE: Stubs for compiled entry points of method handle intrinsics
2606       // are just trampolines so the argument registers must be outgoing ones.
2607       const bool is_outgoing = method->is_method_handle_intrinsic();
2608       int comp_args_on_stack = SharedRuntime::java_calling_convention(sig_bt, regs, total_args_passed, is_outgoing);
2609 
2610       // Generate the compiled-to-native wrapper code
2611       nm = SharedRuntime::generate_native_wrapper(&_masm, method, compile_id, sig_bt, regs, ret_type);
2612 
2613       if (nm != NULL) {
2614         method->set_code(method, nm);






2615       }
2616     }
2617   } // Unlock AdapterHandlerLibrary_lock
2618 
2619 
2620   // Install the generated code.
2621   if (nm != NULL) {
2622     if (PrintCompilation) {
2623       ttyLocker ttyl;
2624       CompileTask::print(tty, nm, method->is_static() ? "(static)" : "");
2625     }
2626     nm->post_compiled_method_load_event();
2627   }
2628 }
2629 
2630 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* thread))
2631   assert(thread == JavaThread::current(), "must be");
2632   // The code is about to enter a JNI lazy critical native method and
2633   // _needs_gc is true, so if this thread is already in a critical
2634   // section then just return, otherwise this thread should block




2595       SignatureStream ss(method->signature());
2596       for (; !ss.at_return_type(); ss.next()) {
2597         sig_bt[i++] = ss.type();  // Collect remaining bits of signature
2598         if (ss.type() == T_LONG || ss.type() == T_DOUBLE)
2599           sig_bt[i++] = T_VOID;   // Longs & doubles take 2 Java slots
2600       }
2601       assert(i == total_args_passed, "");
2602       BasicType ret_type = ss.type();
2603 
2604       // Now get the compiled-Java layout as input (or output) arguments.
2605       // NOTE: Stubs for compiled entry points of method handle intrinsics
2606       // are just trampolines so the argument registers must be outgoing ones.
2607       const bool is_outgoing = method->is_method_handle_intrinsic();
2608       int comp_args_on_stack = SharedRuntime::java_calling_convention(sig_bt, regs, total_args_passed, is_outgoing);
2609 
2610       // Generate the compiled-to-native wrapper code
2611       nm = SharedRuntime::generate_native_wrapper(&_masm, method, compile_id, sig_bt, regs, ret_type);
2612 
2613       if (nm != NULL) {
2614         method->set_code(method, nm);
2615 
2616         DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, CompileBroker::compiler(CompLevel_simple));
2617         if (directive->PrintAssemblyOption) {
2618           Disassembler::decode(nm, tty);
2619         }
2620         DirectivesStack::release(directive);
2621       }
2622     }
2623   } // Unlock AdapterHandlerLibrary_lock
2624 
2625 
2626   // Install the generated code.
2627   if (nm != NULL) {
2628     if (PrintCompilation) {
2629       ttyLocker ttyl;
2630       CompileTask::print(tty, nm, method->is_static() ? "(static)" : "");
2631     }
2632     nm->post_compiled_method_load_event();
2633   }
2634 }
2635 
2636 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* thread))
2637   assert(thread == JavaThread::current(), "must be");
2638   // The code is about to enter a JNI lazy critical native method and
2639   // _needs_gc is true, so if this thread is already in a critical
2640   // section then just return, otherwise this thread should block


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