comparison src/cpu/x86/vm/templateTable_x86_32.cpp @ 12875:d13d7aba8c12

8023657: New type profiling points: arguments to call Summary: x86 interpreter and c1 type profiling for arguments at calls Reviewed-by: kvn, twisti
author roland
date Wed, 09 Oct 2013 16:32:21 +0200
parents aeaca88565e6
children bd3237e0e18d ea79ab313e98
comparison
equal deleted inserted replaced
12874:46ef27bcacb3 12875:d13d7aba8c12
2968 // It's final, need a null check here! 2968 // It's final, need a null check here!
2969 __ null_check(recv); 2969 __ null_check(recv);
2970 2970
2971 // profile this call 2971 // profile this call
2972 __ profile_final_call(rax); 2972 __ profile_final_call(rax);
2973 __ profile_arguments_type(rax, method, rsi, true);
2973 2974
2974 __ jump_from_interpreted(method, rax); 2975 __ jump_from_interpreted(method, rax);
2975 2976
2976 __ bind(notFinal); 2977 __ bind(notFinal);
2977 2978
2982 // profile this call 2983 // profile this call
2983 __ profile_virtual_call(rax, rdi, rdx); 2984 __ profile_virtual_call(rax, rdi, rdx);
2984 2985
2985 // get target Method* & entry point 2986 // get target Method* & entry point
2986 __ lookup_virtual_method(rax, index, method); 2987 __ lookup_virtual_method(rax, index, method);
2988 __ profile_arguments_type(rdx, method, rsi, true);
2987 __ jump_from_interpreted(method, rdx); 2989 __ jump_from_interpreted(method, rdx);
2988 } 2990 }
2989 2991
2990 2992
2991 void TemplateTable::invokevirtual(int byte_no) { 2993 void TemplateTable::invokevirtual(int byte_no) {
3011 rcx); // get receiver also for null check 3013 rcx); // get receiver also for null check
3012 __ verify_oop(rcx); 3014 __ verify_oop(rcx);
3013 __ null_check(rcx); 3015 __ null_check(rcx);
3014 // do the call 3016 // do the call
3015 __ profile_call(rax); 3017 __ profile_call(rax);
3018 __ profile_arguments_type(rax, rbx, rsi, false);
3016 __ jump_from_interpreted(rbx, rax); 3019 __ jump_from_interpreted(rbx, rax);
3017 } 3020 }
3018 3021
3019 3022
3020 void TemplateTable::invokestatic(int byte_no) { 3023 void TemplateTable::invokestatic(int byte_no) {
3021 transition(vtos, vtos); 3024 transition(vtos, vtos);
3022 assert(byte_no == f1_byte, "use this argument"); 3025 assert(byte_no == f1_byte, "use this argument");
3023 prepare_invoke(byte_no, rbx); // get f1 Method* 3026 prepare_invoke(byte_no, rbx); // get f1 Method*
3024 // do the call 3027 // do the call
3025 __ profile_call(rax); 3028 __ profile_call(rax);
3029 __ profile_arguments_type(rax, rbx, rsi, false);
3026 __ jump_from_interpreted(rbx, rax); 3030 __ jump_from_interpreted(rbx, rax);
3027 } 3031 }
3028 3032
3029 3033
3030 void TemplateTable::fast_invokevfinal(int byte_no) { 3034 void TemplateTable::fast_invokevfinal(int byte_no) {
3079 // Note: This should be done more efficiently via a throw_abstract_method_error 3083 // Note: This should be done more efficiently via a throw_abstract_method_error
3080 // interpreter entry point and a conditional jump to it in case of a null 3084 // interpreter entry point and a conditional jump to it in case of a null
3081 // method. 3085 // method.
3082 __ testptr(rbx, rbx); 3086 __ testptr(rbx, rbx);
3083 __ jcc(Assembler::zero, no_such_method); 3087 __ jcc(Assembler::zero, no_such_method);
3088
3089 __ profile_arguments_type(rdx, rbx, rsi, true);
3084 3090
3085 // do the call 3091 // do the call
3086 // rcx: receiver 3092 // rcx: receiver
3087 // rbx,: Method* 3093 // rbx,: Method*
3088 __ jump_from_interpreted(rbx, rdx); 3094 __ jump_from_interpreted(rbx, rdx);
3136 3142
3137 // Note: rax_mtype is already pushed (if necessary) by prepare_invoke 3143 // Note: rax_mtype is already pushed (if necessary) by prepare_invoke
3138 3144
3139 // FIXME: profile the LambdaForm also 3145 // FIXME: profile the LambdaForm also
3140 __ profile_final_call(rax); 3146 __ profile_final_call(rax);
3147 __ profile_arguments_type(rdx, rbx_method, rsi, true);
3141 3148
3142 __ jump_from_interpreted(rbx_method, rdx); 3149 __ jump_from_interpreted(rbx_method, rdx);
3143 } 3150 }
3144 3151
3145 3152
3169 // Note: rax_callsite is already pushed by prepare_invoke 3176 // Note: rax_callsite is already pushed by prepare_invoke
3170 3177
3171 // %%% should make a type profile for any invokedynamic that takes a ref argument 3178 // %%% should make a type profile for any invokedynamic that takes a ref argument
3172 // profile this call 3179 // profile this call
3173 __ profile_call(rsi); 3180 __ profile_call(rsi);
3181 __ profile_arguments_type(rdx, rbx, rsi, false);
3174 3182
3175 __ verify_oop(rax_callsite); 3183 __ verify_oop(rax_callsite);
3176 3184
3177 __ jump_from_interpreted(rbx_method, rdx); 3185 __ jump_from_interpreted(rbx_method, rdx);
3178 } 3186 }