Top


定義場所(file name)

hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp

名前(function name)

void InterpreterMacroAssembler::increment_backedge_counter( Register Rtmp, Register Rtmp2 ) {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(UseCompiler, "incrementing must be useful");

  {- -------------------------------------------
  (1) (変数宣言など)
      ---------------------------------------- -}

    #ifdef CC_INTERP
      Address be_counter (G5_method, methodOopDesc::backedge_counter_offset() +
                                     InvocationCounter::counter_offset());
      Address inv_counter(G5_method, methodOopDesc::invocation_counter_offset() +
                                     InvocationCounter::counter_offset());
    #else
      Address be_counter (Lmethod, methodOopDesc::backedge_counter_offset() +
                                   InvocationCounter::counter_offset());
      Address inv_counter(Lmethod, methodOopDesc::invocation_counter_offset() +
                                   InvocationCounter::counter_offset());
    #endif /* CC_INTERP */
      int delta = InvocationCounter::count_increment;

  {- -------------------------------------------
  (1) 実行メソッドの methodOopDesc 内にある _backedge_counter(InvocationCounterオブジェクト) のカウンタ値を
      InvocationCounter::count_increment 分だけ増加させる.

      その後, 引数の Rtmp で指定されたレジスタに, 実行メソッドの methodOopDesc 内にある
      「_backedge_counter と _invocation_counter (どちらもInvocationCounterオブジェクト)のカウンタ値の合計」をセットする.
      ---------------------------------------- -}

      // Load each counter in a register
      ld( be_counter, Rtmp );
      ld( inv_counter, Rtmp2 );

      // Add the delta to the backedge counter
      add( Rtmp, delta, Rtmp );

      // Mask the invocation counter, add to backedge counter
      and3( Rtmp2, InvocationCounter::count_mask_value, Rtmp2 );

      // and store the result to memory
      st( Rtmp, be_counter );

      // Add backedge + invocation counter
      add( Rtmp, Rtmp2, Rtmp );

      // Note that this macro must leave backedge_count + invocation_count in Rtmp!
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.