< prev index next >

src/cpu/ppc/vm/interp_masm_ppc_64.cpp

Print this page
rev 8734 : 8132242: LogTouchedMethods (8025692) asserts if TieredCompilation is off.


2170 
2171 void InterpreterMacroAssembler::get_method_counters(Register method,
2172                                                     Register Rcounters,
2173                                                     Label& skip) {
2174   BLOCK_COMMENT("Load and ev. allocate counter object {");
2175   Label has_counters;
2176   ld(Rcounters, in_bytes(Method::method_counters_offset()), method);
2177   cmpdi(CCR0, Rcounters, 0);
2178   bne(CCR0, has_counters);
2179   call_VM(noreg, CAST_FROM_FN_PTR(address,
2180                                   InterpreterRuntime::build_method_counters), method, false);
2181   ld(Rcounters, in_bytes(Method::method_counters_offset()), method);
2182   cmpdi(CCR0, Rcounters, 0);
2183   beq(CCR0, skip); // No MethodCounters, OutOfMemory.
2184   BLOCK_COMMENT("} Load and ev. allocate counter object");
2185 
2186   bind(has_counters);
2187 }
2188 
2189 void InterpreterMacroAssembler::increment_invocation_counter(Register Rcounters, Register iv_be_count, Register Rtmp_r0) {
2190   assert(UseCompiler, "incrementing must be useful");
2191   Register invocation_count = iv_be_count;
2192   Register backedge_count   = Rtmp_r0;
2193   int delta = InvocationCounter::count_increment;
2194 
2195   // Load each counter in a register.
2196   //  ld(inv_counter, Rtmp);
2197   //  ld(be_counter, Rtmp2);
2198   int inv_counter_offset = in_bytes(MethodCounters::invocation_counter_offset() +
2199                                     InvocationCounter::counter_offset());
2200   int be_counter_offset  = in_bytes(MethodCounters::backedge_counter_offset() +
2201                                     InvocationCounter::counter_offset());
2202 
2203   BLOCK_COMMENT("Increment profiling counters {");
2204 
2205   // Load the backedge counter.
2206   lwz(backedge_count, be_counter_offset, Rcounters); // is unsigned int
2207   // Mask the backedge counter.
2208   Register tmp = invocation_count;
2209   li(tmp, InvocationCounter::count_mask_value);
2210   andr(backedge_count, tmp, backedge_count); // Cannot use andi, need sign extension of count_mask_value.




2170 
2171 void InterpreterMacroAssembler::get_method_counters(Register method,
2172                                                     Register Rcounters,
2173                                                     Label& skip) {
2174   BLOCK_COMMENT("Load and ev. allocate counter object {");
2175   Label has_counters;
2176   ld(Rcounters, in_bytes(Method::method_counters_offset()), method);
2177   cmpdi(CCR0, Rcounters, 0);
2178   bne(CCR0, has_counters);
2179   call_VM(noreg, CAST_FROM_FN_PTR(address,
2180                                   InterpreterRuntime::build_method_counters), method, false);
2181   ld(Rcounters, in_bytes(Method::method_counters_offset()), method);
2182   cmpdi(CCR0, Rcounters, 0);
2183   beq(CCR0, skip); // No MethodCounters, OutOfMemory.
2184   BLOCK_COMMENT("} Load and ev. allocate counter object");
2185 
2186   bind(has_counters);
2187 }
2188 
2189 void InterpreterMacroAssembler::increment_invocation_counter(Register Rcounters, Register iv_be_count, Register Rtmp_r0) {
2190   assert(UseCompiler || LogTouchedMethods, "incrementing must be useful");
2191   Register invocation_count = iv_be_count;
2192   Register backedge_count   = Rtmp_r0;
2193   int delta = InvocationCounter::count_increment;
2194 
2195   // Load each counter in a register.
2196   //  ld(inv_counter, Rtmp);
2197   //  ld(be_counter, Rtmp2);
2198   int inv_counter_offset = in_bytes(MethodCounters::invocation_counter_offset() +
2199                                     InvocationCounter::counter_offset());
2200   int be_counter_offset  = in_bytes(MethodCounters::backedge_counter_offset() +
2201                                     InvocationCounter::counter_offset());
2202 
2203   BLOCK_COMMENT("Increment profiling counters {");
2204 
2205   // Load the backedge counter.
2206   lwz(backedge_count, be_counter_offset, Rcounters); // is unsigned int
2207   // Mask the backedge counter.
2208   Register tmp = invocation_count;
2209   li(tmp, InvocationCounter::count_mask_value);
2210   andr(backedge_count, tmp, backedge_count); // Cannot use andi, need sign extension of count_mask_value.


< prev index next >