著者
石崎 一明
出版者
Waseda University
巻号頁・発行日
2002-12

制度:新 ; 文部省報告番号:乙1739号 ; 学位の種類:博士(情報科学) ; 授与年月日:2002/12/19 ; 早大学位記番号:新3444 ; 理工学図書館請求番号:2742
著者
石崎 一明 川人 基弘 今野 和浩 安江 俊明 竹内 幹雄 小笠原 武史 菅沼 俊夫 小野寺 民也 小松 秀昭
出版者
一般社団法人電子情報通信学会
雑誌
電子情報通信学会技術研究報告. CPSY, コンピュータシステム (ISSN:09135685)
巻号頁・発行日
vol.99, no.252, pp.17-24, 1999-08-05
被引用文献数
1

Javaはプログラムの安全性のために、例外チェックやポインタを排除したオブジェクトへのアクセスなど、他の言語より大きなオーバヘッドを持つ。またプログラムの柔軟性を提供するために、型検査、動的なクラスリンク、オブジェクトを伴ったインスタンスメソッド呼び出し、を提供している。これらの特徴を失うことなくプログラムの性能を改善するためには、実行時にバイトコードからネイティブコードへコンパイルを行うJust-In-Time (JIT)コンパイラが必須である。本稿では、JITコンパイラへ実装した以下の最適化、定数伝搬、不要コードの除去、例外チェックの除去、共通部分式の除去、型検査の単純化、メソッド呼び出しのインライン展開、メソッド呼び出しの一意決定、について述べる。さらに、9つのプログラムの実行結果より、これらの最適化が効果的であることを示す。
著者
石崎 一明 安江 俊明 川人 基弘 小松 秀昭
出版者
一般社団法人情報処理学会
雑誌
情報処理学会論文誌プログラミング(PRO) (ISSN:18827802)
巻号頁・発行日
vol.43, no.8, pp.110, 2002-09-15

本発表では,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%).
著者
石崎 一明 安江 俊明 川人 基弘 小松 秀昭
出版者
一般社団法人情報処理学会
雑誌
情報処理学会論文誌 (ISSN:18827764)
巻号頁・発行日
vol.43, no.1, pp.124-136, 2002-01-15
参考文献数
13
被引用文献数
1

本論文では,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%).