コード書換えによる動的メソッド呼び出しの直接Devirtualization

書誌事項

タイトル別名
  • A Direct Devirtualization Technique with the Code Patching Mechanism

この論文をさがす

抄録

本発表では,Java などの動的クラスロードをともなう言語において,実装が容易な動的メソッド呼び出しの直接devirtualization 手法を提案する.本手法では,コンパイル時に動的メソッド呼び出しに対して直接devirtualization されたコードとメソッドがオーバライドされた場合に実行する動的メソッド呼び出し,の2 種類のコードを生成する.最初は前者を実行し,オーバライドが起きたときにコードを書き換えて後者を実行する.本手法では,コード書換えによって直接devirtualization されたコードを無効化するので,脱最適化のような再コンパイルのための複雑な実装が不要である.一方,再コンパイルを不要にするためにコンパイル時に2 種類のコードを用意するので,制御フロー上に合流点が生成される.一般に制御フローの合流点はコンパイラの最適化を妨げるが,本発表では合流点が存在しても十分な最適化を可能にする手法を示す.さらに,本手法と他のdevirtualization 手法を組み合わせてJava のJust-In-Time コンパイラに実装し,評価を行った.その結果,devirtualizationを行わない場合に比べ,SPECjvm98 とSPECjbb2000 において0 ?181%(平均24%)性能を改善できることを示す.

This presentation presents a direct devirtualization technique for a language such as Java with dynamic class loading.The implementation 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 devirtualizationbecomes invalidated,at which time the compiler performs code patching to make the code of dynamic call executed subsequently.This technique does not require the complicated implementation such as deoptimization to recompile the method that is active on stack.Since this technique prevents some optimizations across the merge point between the inlined code and the dynamic call,we have further more 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.In summary, we improved the execution performance of SPECjvm98 and SPECjbb2000 by ranging from 0%to 181%(with the geometric mean of 24%).

収録刊行物

キーワード

詳細情報 詳細情報について

  • CRID
    1050282812867295360
  • NII論文ID
    110002726556
  • NII書誌ID
    AA11464814
  • ISSN
    18827802
  • Web Site
    http://id.nii.ac.jp/1001/00016779/
  • 本文言語コード
    ja
  • 資料種別
    article
  • データソース種別
    • IRDB
    • CiNii Articles

問題の指摘

ページトップへ