< prev index next >

src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp

Print this page
rev 9593 : 8144582: AArch64 does not generate correct branch profile data
Reviewed-by: kvn


 375     __ ldrw(r1, invocation_counter);
 376     __ ldrw(r0, backedge_counter);
 377 
 378     __ addw(r1, r1, InvocationCounter::count_increment);
 379     __ andw(r0, r0, InvocationCounter::count_mask_value);
 380 
 381     __ strw(r1, invocation_counter);
 382     __ addw(r0, r0, r1);                // add both counters
 383 
 384     // profile_method is non-null only for interpreted method so
 385     // profile_method != NULL == !native_call
 386 
 387     if (ProfileInterpreter && profile_method != NULL) {
 388       // Test to see if we should create a method data oop
 389       __ ldr(rscratch2, Address(rmethod, Method::method_counters_offset()));
 390       __ ldrw(rscratch2, Address(rscratch2, in_bytes(MethodCounters::interpreter_profile_limit_offset())));
 391       __ cmpw(r0, rscratch2);
 392       __ br(Assembler::LT, *profile_method_continue);
 393 
 394       // if no method data exists, go to profile_method
 395       __ test_method_data_pointer(r0, *profile_method);
 396     }
 397 
 398     {
 399       __ ldr(rscratch2, Address(rmethod, Method::method_counters_offset()));
 400       __ ldrw(rscratch2, Address(rscratch2, in_bytes(MethodCounters::interpreter_invocation_limit_offset())));
 401       __ cmpw(r0, rscratch2);
 402       __ br(Assembler::HS, *overflow);
 403     }
 404     __ bind(done);
 405   }
 406 }
 407 
 408 void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
 409 
 410   // Asm interpreter on entry
 411   // On return (i.e. jump to entry_point) [ back to invocation of interpreter ]
 412   // Everything as it was on entry
 413 
 414   // InterpreterRuntime::frequency_counter_overflow takes two
 415   // arguments, the first (thread) is passed by call_VM, the second




 375     __ ldrw(r1, invocation_counter);
 376     __ ldrw(r0, backedge_counter);
 377 
 378     __ addw(r1, r1, InvocationCounter::count_increment);
 379     __ andw(r0, r0, InvocationCounter::count_mask_value);
 380 
 381     __ strw(r1, invocation_counter);
 382     __ addw(r0, r0, r1);                // add both counters
 383 
 384     // profile_method is non-null only for interpreted method so
 385     // profile_method != NULL == !native_call
 386 
 387     if (ProfileInterpreter && profile_method != NULL) {
 388       // Test to see if we should create a method data oop
 389       __ ldr(rscratch2, Address(rmethod, Method::method_counters_offset()));
 390       __ ldrw(rscratch2, Address(rscratch2, in_bytes(MethodCounters::interpreter_profile_limit_offset())));
 391       __ cmpw(r0, rscratch2);
 392       __ br(Assembler::LT, *profile_method_continue);
 393 
 394       // if no method data exists, go to profile_method
 395       __ test_method_data_pointer(rscratch2, *profile_method);
 396     }
 397 
 398     {
 399       __ ldr(rscratch2, Address(rmethod, Method::method_counters_offset()));
 400       __ ldrw(rscratch2, Address(rscratch2, in_bytes(MethodCounters::interpreter_invocation_limit_offset())));
 401       __ cmpw(r0, rscratch2);
 402       __ br(Assembler::HS, *overflow);
 403     }
 404     __ bind(done);
 405   }
 406 }
 407 
 408 void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
 409 
 410   // Asm interpreter on entry
 411   // On return (i.e. jump to entry_point) [ back to invocation of interpreter ]
 412   // Everything as it was on entry
 413 
 414   // InterpreterRuntime::frequency_counter_overflow takes two
 415   // arguments, the first (thread) is passed by call_VM, the second


< prev index next >