< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

Print this page
rev 50906 : JDK-8206075: Cdd an assertion stmt for Assembler's Label

Check all labels and catch unbound labels. Fix a problem for x86.


2209                rcx);
2210     __ pop(rcx);
2211     __ pop(rdx);
2212     __ movptr(rax, Address(rcx, Method::method_counters_offset()));
2213     __ testptr(rax, rax);
2214     __ jcc(Assembler::zero, dispatch);
2215     __ bind(has_counters);
2216 
2217     if (TieredCompilation) {
2218       Label no_mdo;
2219       int increment = InvocationCounter::count_increment;
2220       if (ProfileInterpreter) {
2221         // Are we profiling?
2222         __ movptr(rbx, Address(rcx, in_bytes(Method::method_data_offset())));
2223         __ testptr(rbx, rbx);
2224         __ jccb(Assembler::zero, no_mdo);
2225         // Increment the MDO backedge counter
2226         const Address mdo_backedge_counter(rbx, in_bytes(MethodData::backedge_counter_offset()) +
2227                                            in_bytes(InvocationCounter::counter_offset()));
2228         const Address mask(rbx, in_bytes(MethodData::backedge_mask_offset()));
2229         __ increment_mask_and_jump(mdo_backedge_counter, increment, mask,
2230                                    rax, false, Assembler::zero, &backedge_counter_overflow);
2231         __ jmp(dispatch);
2232       }
2233       __ bind(no_mdo);
2234       // Increment backedge counter in MethodCounters*
2235       __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
2236       const Address mask(rcx, in_bytes(MethodCounters::backedge_mask_offset()));
2237       __ increment_mask_and_jump(Address(rcx, be_offset), increment, mask,
2238                                  rax, false, Assembler::zero, &backedge_counter_overflow);

2239     } else { // not TieredCompilation
2240       // increment counter
2241       __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
2242       __ movl(rax, Address(rcx, be_offset));        // load backedge counter
2243       __ incrementl(rax, InvocationCounter::count_increment); // increment counter
2244       __ movl(Address(rcx, be_offset), rax);        // store counter
2245 
2246       __ movl(rax, Address(rcx, inv_offset));    // load invocation counter
2247 
2248       __ andl(rax, InvocationCounter::count_mask_value); // and the status bits
2249       __ addl(rax, Address(rcx, be_offset));        // add both counters
2250 
2251       if (ProfileInterpreter) {
2252         // Test to see if we should create a method data oop
2253         __ cmp32(rax, Address(rcx, in_bytes(MethodCounters::interpreter_profile_limit_offset())));
2254         __ jcc(Assembler::less, dispatch);
2255 
2256         // if no method data exists, go to profile method
2257         __ test_method_data_pointer(rax, profile_method);
2258 




2209                rcx);
2210     __ pop(rcx);
2211     __ pop(rdx);
2212     __ movptr(rax, Address(rcx, Method::method_counters_offset()));
2213     __ testptr(rax, rax);
2214     __ jcc(Assembler::zero, dispatch);
2215     __ bind(has_counters);
2216 
2217     if (TieredCompilation) {
2218       Label no_mdo;
2219       int increment = InvocationCounter::count_increment;
2220       if (ProfileInterpreter) {
2221         // Are we profiling?
2222         __ movptr(rbx, Address(rcx, in_bytes(Method::method_data_offset())));
2223         __ testptr(rbx, rbx);
2224         __ jccb(Assembler::zero, no_mdo);
2225         // Increment the MDO backedge counter
2226         const Address mdo_backedge_counter(rbx, in_bytes(MethodData::backedge_counter_offset()) +
2227                                            in_bytes(InvocationCounter::counter_offset()));
2228         const Address mask(rbx, in_bytes(MethodData::backedge_mask_offset()));
2229         __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, rax, false, Assembler::zero,
2230                                    UseOnStackReplacement ? &backedge_counter_overflow : &dispatch);
2231         __ jmp(dispatch);
2232       }
2233       __ bind(no_mdo);
2234       // Increment backedge counter in MethodCounters*
2235       __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
2236       const Address mask(rcx, in_bytes(MethodCounters::backedge_mask_offset()));
2237       __ increment_mask_and_jump(Address(rcx, be_offset), increment, mask,
2238                                  rax, false, Assembler::zero,
2239                                  UseOnStackReplacement ? &backedge_counter_overflow : &dispatch);
2240     } else { // not TieredCompilation
2241       // increment counter
2242       __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
2243       __ movl(rax, Address(rcx, be_offset));        // load backedge counter
2244       __ incrementl(rax, InvocationCounter::count_increment); // increment counter
2245       __ movl(Address(rcx, be_offset), rax);        // store counter
2246 
2247       __ movl(rax, Address(rcx, inv_offset));    // load invocation counter
2248 
2249       __ andl(rax, InvocationCounter::count_mask_value); // and the status bits
2250       __ addl(rax, Address(rcx, be_offset));        // add both counters
2251 
2252       if (ProfileInterpreter) {
2253         // Test to see if we should create a method data oop
2254         __ cmp32(rax, Address(rcx, in_bytes(MethodCounters::interpreter_profile_limit_offset())));
2255         __ jcc(Assembler::less, dispatch);
2256 
2257         // if no method data exists, go to profile method
2258         __ test_method_data_pointer(rax, profile_method);
2259 


< prev index next >