< prev index next >

src/cpu/ppc/vm/templateTable_ppc_64.cpp

Print this page
rev 7507 : 8066964: ppc64: argument and return type profiling, fix problem with popframe

*** 3233,3242 **** --- 3233,3244 ---- // Calc vtable addr scale the vtable index by 8. __ sldi(Rindex, Rindex, exact_log2(vtableEntry::size() * wordSize)); // Load target. __ addi(Rrecv_klass, Rrecv_klass, base + vtableEntry::method_offset_in_bytes()); __ ldx(Rtarget_method, Rindex, Rrecv_klass); + // Argument and return type profiling. + __ profile_arguments_type(Rtarget_method, Rrecv_klass /* scratch1 */, Rtemp /* scratch2 */, true); __ call_from_interpreter(Rtarget_method, Rret, Rrecv_klass /* scratch1 */, Rtemp /* scratch2 */); } // Virtual or final call. Final calls are rewritten on the fly to run through "fast_finalcall" next time. void TemplateTable::invokevirtual(int byte_no) {
*** 3316,3325 **** --- 3318,3329 ---- // Load receiver and receiver NULL check. __ load_receiver(Rnum_params, Rrecv); __ null_check_throw(Rrecv, -1, Rscratch1); __ profile_final_call(Rrecv, Rscratch1); + // Argument and return type profiling. + __ profile_arguments_type(Rmethod, Rscratch1, Rscratch2, true); // Do the call. __ call_from_interpreter(Rmethod, Rret_addr, Rscratch1, Rscratch2); }
*** 3337,3346 **** --- 3341,3352 ---- // Receiver NULL check. __ null_check_throw(Rreceiver, -1, R11_scratch1); __ profile_call(R11_scratch1, R12_scratch2); + // Argument and return type profiling. + __ profile_arguments_type(Rmethod, R11_scratch1, R12_scratch2, false); __ call_from_interpreter(Rmethod, Rret_addr, R11_scratch1, R12_scratch2); } void TemplateTable::invokestatic(int byte_no) { assert(byte_no == f1_byte, "use this argument");
*** 3351,3360 **** --- 3357,3368 ---- Rflags = R5_ARG3; prepare_invoke(byte_no, R19_method, Rret_addr, noreg, noreg, Rflags, R11_scratch1); __ profile_call(R11_scratch1, R12_scratch2); + // Argument and return type profiling. + __ profile_arguments_type(R19_method, R11_scratch1, R12_scratch2, false); __ call_from_interpreter(R19_method, Rret_addr, R11_scratch1, R12_scratch2); } void TemplateTable::invokeinterface_object_method(Register Rrecv_klass, Register Rret,
*** 3372,3381 **** --- 3380,3391 ---- Register Rscratch = Rflags; // Rflags is dead now. // Final call case. __ profile_final_call(Rtemp1, Rscratch); + // Argument and return type profiling. + __ profile_arguments_type(Rindex, Rscratch, Rrecv_klass /* scratch */, true); // Do the final call - the index (f2) contains the method. __ call_from_interpreter(Rindex, Rret, Rscratch, Rrecv_klass /* scratch */); // Non-final callc case. __ bind(LnotFinal);
*** 3423,3432 **** --- 3433,3444 ---- __ lookup_interface_method(Rrecv_klass, Rinterface_klass, Rindex, Rindex, Rscratch1, Rscratch2, Lthrow_icc); __ cmpdi(CCR0, Rindex, 0); __ beq(CCR0, Lthrow_ame); // Found entry. Jump off! + // Argument and return type profiling. + __ profile_arguments_type(Rindex, Rscratch1, Rscratch2, true); __ call_from_interpreter(Rindex, Rret_addr, Rscratch1, Rscratch2); // Vtable entry was NULL => Throw abstract method error. __ bind(Lthrow_ame); __ mr(Rrecv_klass, Rscratch4);
*** 3466,3475 **** --- 3478,3489 ---- // Off we go. With the new method handles, we don't jump to a method handle // entry any more. Instead, we pushed an "appendix" in prepare invoke, which happens // to be the callsite object the bootstrap method returned. This is passed to a // "link" method which does the dispatch (Most likely just grabs the MH stored // inside the callsite and does an invokehandle). + // Argument and return type profiling. + __ profile_arguments_type(Rmethod, Rscratch1, Rscratch2, false); __ call_from_interpreter(Rmethod, Rret_addr, Rscratch1 /* scratch1 */, Rscratch2 /* scratch2 */); } void TemplateTable::invokehandle(int byte_no) { transition(vtos, vtos);
*** 3486,3495 **** --- 3500,3511 ---- __ null_check_throw(Rrecv, -1, Rscratch2); __ profile_final_call(Rrecv, Rscratch1); // Still no call from handle => We call the method handle interpreter here. + // Argument and return type profiling. + __ profile_arguments_type(Rmethod, Rscratch1, Rscratch2, true); __ call_from_interpreter(Rmethod, Rret_addr, Rscratch1 /* scratch1 */, Rscratch2 /* scratch2 */); } // ============================================================================= // Allocation
< prev index next >