コード書換えによる動的メソッド呼び出しの直接devirtualization  [in Japanese] A Direct Devirtualization Technique with the Code Patching Mechanism  [in Japanese]

Access this Article

Search this Article

Author(s)

Abstract

本論文では,Java等の動的クラスローディングをともなう言語において,実装が容易な動的メソッド呼び出しの直接devirtualization手法を提案する.本手法では,動的メソッド呼び出しに対して直接devirtualizationされたコードと,メソッドがオーバライドされた場合に実行する動的メソッド呼び出しの2種類のコードをコンパイル時に生成する.最初は前者を実行し,メソッドのオーバライドが起きたときにコードを書き換えて後者を実行する.本手法では,コード書換えによって直接devirtualizationされたコードを無効化するので,脱最適化のような再コンパイルのための複雑な実装が不要である.一方,再コンパイルを不要にするためにコンパイル時に2種類のコードを用意するため,制御フロー上に合流点が生成される.一般に制御フローの合流点はコンパイラの最適化を妨げるが,本論文では合流点が存在しても十分な最適化を可能にする手法を示す.また本手法と他のdevirtualization手法を組み合わせてJavaのJust-In-Timeコンパイラに実装し評価を示す.その結果,devirtualizationを行わない場合に比べ,SPECjvm98とSPECjbb2000において0?181%(平均24%)性能を改善できることを示す.This paper presents a direct devirtualization technique for a language such as Java with dynamic class loading.The implemetation of this technique is easy. For a given dynamic method call, a compiler generates the inlined code of the method, together with the code of making the dynamic call. Only the inlined code is actually executed until our assumption about the devirtualization becomes invalidated, at which time the compiler performs code patching to make the code of dynamic call executed subsequently. This technique does not require complicated implementations such as deoptimization to recompile the method that is active on the stack. Since this technique prevents some optimizations across the merge point between the inlined code and the dynamic call, we have furthermore proposed optimization techniques effectively. We made some experiments to understand the effectiveness and characteristics of the devirtualization techniques in our Java Just-In-Time compiler. To summarize our result, we improved the execution performance of SPECjvm98 and SPECjbb2000 ranging from 0% to 181% (with the geometric mean of 24%).

This paper presents a direct devirtualization technique for a language such as Java with dynamic class loading. The implemetation of this technique is easy. For a given dynamic method call, a compiler generates the inlined code of the method, together with the code of making the dynamic call. Only the inlined code is actually executed until our assumption about the devirtualization becomes invalidated, at which time the compiler performs code patching to make the code of dynamic call executed subsequently. This technique does not require complicated implementations such as deoptimization to recompile the method that is active on the stack. Since this technique prevents some optimizations across the merge point between the inlined code and the dynamic call, we have furthermore proposed optimization techniques effectively. We made some experiments to understand the effectiveness and characteristics of the devirtualization techniques in our Java Just-In-Time compiler. To summarize our result, we improved the execution performance of SPECjvm98 and SPECjbb2000 ranging from 0% to 181%(with the geometric mean of 24%).

Journal

  • Transactions of Information Processing Society of Japan

    Transactions of Information Processing Society of Japan 43(1), 124-136, 2002-01-15

    Information Processing Society of Japan (IPSJ)

References:  13

Cited by:  1

Codes

  • NII Article ID (NAID)
    110002726228
  • NII NACSIS-CAT ID (NCID)
    AN00116647
  • Text Lang
    JPN
  • Article Type
    Journal Article
  • ISSN
    1882-7764
  • NDL Article ID
    6041021
  • NDL Source Classification
    ZM13(科学技術--科学技術一般--データ処理・計算機)
  • NDL Call No.
    Z14-741
  • Data Source
    CJP  CJPref  NDL  NII-ELS  IPSJ 
Page Top