Top


定義場所(file name)

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

名前(function name)

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

本体部(body)

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

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

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

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

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

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

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

      assert( is_simm13( delta ), " delta too large.");

      // Add the delta to the invocation counter and store the result
      add( Rtmp, delta, Rtmp );

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

      // Store value
      st( Rtmp, inv_counter);

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

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

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