comparison src/share/vm/prims/methodHandles.cpp @ 3905:c26de9aef2ed

7071307: MethodHandle bimorphic inlining should consider the frequency Reviewed-by: twisti, roland, kvn, iveresov
author never
date Fri, 02 Sep 2011 20:58:21 -0700
parents 43f9d800f276
children b0efc7ee3b31
comparison
equal deleted inserted replaced
3902:11a4af030e4b 3905:c26de9aef2ed
155 "adapter_fold/1/ref", 155 "adapter_fold/1/ref",
156 "adapter_fold/2/ref", 156 "adapter_fold/2/ref",
157 "adapter_fold/3/ref", 157 "adapter_fold/3/ref",
158 "adapter_fold/4/ref", 158 "adapter_fold/4/ref",
159 "adapter_fold/5/ref", 159 "adapter_fold/5/ref",
160
161 "adapter_opt_profiling",
160 162
161 NULL 163 NULL
162 }; 164 };
163 165
164 // Adapters. 166 // Adapters.
2651 jint new_conversion = adapter_conversion(conv_op, src, dest, stack_move, vminfo); 2653 jint new_conversion = adapter_conversion(conv_op, src, dest, stack_move, vminfo);
2652 2654
2653 // Finalize the conversion field. (Note that it is final to Java code.) 2655 // Finalize the conversion field. (Note that it is final to Java code.)
2654 java_lang_invoke_AdapterMethodHandle::set_conversion(mh(), new_conversion); 2656 java_lang_invoke_AdapterMethodHandle::set_conversion(mh(), new_conversion);
2655 2657
2658 if (java_lang_invoke_CountingMethodHandle::is_instance(mh())) {
2659 assert(ek_orig == _adapter_retype_only, "only one handled");
2660 ek_opt = _adapter_opt_profiling;
2661 }
2662
2656 // Done! 2663 // Done!
2657 java_lang_invoke_MethodHandle::set_vmentry(mh(), entry(ek_opt)); 2664 java_lang_invoke_MethodHandle::set_vmentry(mh(), entry(ek_opt));
2658 2665
2659 // There should be enough memory barriers on exit from native methods 2666 // There should be enough memory barriers on exit from native methods
2660 // to ensure that the MH is fully initialized to all threads before 2667 // to ensure that the MH is fully initialized to all threads before
2903 case MethodHandles::GC_JVM_STACK_MOVE_UNIT: 2910 case MethodHandles::GC_JVM_STACK_MOVE_UNIT:
2904 // return number of words per slot, signed according to stack direction 2911 // return number of words per slot, signed according to stack direction
2905 return MethodHandles::stack_move_unit(); 2912 return MethodHandles::stack_move_unit();
2906 case MethodHandles::GC_CONV_OP_IMPLEMENTED_MASK: 2913 case MethodHandles::GC_CONV_OP_IMPLEMENTED_MASK:
2907 return MethodHandles::adapter_conversion_ops_supported_mask(); 2914 return MethodHandles::adapter_conversion_ops_supported_mask();
2908 case MethodHandles::GC_OP_ROT_ARGS_DOWN_LIMIT_BIAS: 2915 case MethodHandles::GC_COUNT_GWT:
2909 return MethodHandles::OP_ROT_ARGS_DOWN_LIMIT_BIAS; 2916 #ifdef COMPILER2
2917 return true;
2918 #else
2919 return false;
2920 #endif
2910 } 2921 }
2911 return 0; 2922 return 0;
2912 } 2923 }
2913 JVM_END 2924 JVM_END
2914 2925