8026253: New type profiling points: sparc support

C1 and interpreter support for new type profiling on sparc

Reviewed-by: kvn, twisti
This commit is contained in:
Roland Westrelin 2014-01-14 14:51:47 +01:00
parent bff5f5c875
commit b1c92a140b
8 changed files with 385 additions and 12 deletions

View file

@ -2942,12 +2942,12 @@ void TemplateTable::prepare_invoke(int byte_no,
void TemplateTable::generate_vtable_call(Register Rrecv, Register Rindex, Register Rret) {
Register Rtemp = G4_scratch;
Register Rcall = Rindex;
assert_different_registers(Rcall, G5_method, Gargs, Rret);
// get target Method* & entry point
__ lookup_virtual_method(Rrecv, Rindex, G5_method);
__ profile_arguments_type(G5_method, Rcall, Gargs, true);
__ call_from_interpreter(Rcall, Gargs, Rret);
}
@ -3022,6 +3022,7 @@ void TemplateTable::invokevfinal_helper(Register Rscratch, Register Rret) {
__ null_check(O0);
__ profile_final_call(O4);
__ profile_arguments_type(G5_method, Rscratch, Gargs, true);
// get return address
AddressLiteral table(Interpreter::invoke_return_entry_table());
@ -3051,6 +3052,7 @@ void TemplateTable::invokespecial(int byte_no) {
// do the call
__ profile_call(O4);
__ profile_arguments_type(G5_method, Rscratch, Gargs, false);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}
@ -3066,6 +3068,7 @@ void TemplateTable::invokestatic(int byte_no) {
// do the call
__ profile_call(O4);
__ profile_arguments_type(G5_method, Rscratch, Gargs, false);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}
@ -3091,6 +3094,7 @@ void TemplateTable::invokeinterface_object_method(Register RKlass,
// do the call - the index (f2) contains the Method*
assert_different_registers(G5_method, Gargs, Rcall);
__ mov(Rindex, G5_method);
__ profile_arguments_type(G5_method, Rcall, Gargs, true);
__ call_from_interpreter(Rcall, Gargs, Rret);
__ bind(notFinal);
@ -3197,6 +3201,7 @@ void TemplateTable::invokeinterface(int byte_no) {
Register Rcall = Rinterface;
assert_different_registers(Rcall, G5_method, Gargs, Rret);
__ profile_arguments_type(G5_method, Rcall, Gargs, true);
__ call_from_interpreter(Rcall, Gargs, Rret);
}
@ -3226,6 +3231,7 @@ void TemplateTable::invokehandle(int byte_no) {
// do the call
__ verify_oop(G4_mtype);
__ profile_final_call(O4); // FIXME: profile the LambdaForm also
__ profile_arguments_type(G5_method, Rscratch, Gargs, true);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}
@ -3262,6 +3268,7 @@ void TemplateTable::invokedynamic(int byte_no) {
// do the call
__ verify_oop(G4_callsite);
__ profile_arguments_type(G5_method, Rscratch, Gargs, false);
__ call_from_interpreter(Rscratch, Gargs, Rret);
}