標題: 嵌入式即時編譯器中方法展開之設計與實作
Design and Implementation of Method Inlining in Embedded Just-In-Time Compiler
作者: 唐心磊
Shin-Lei Tang
單智君
資訊科學與工程研究所
關鍵字: 爪哇;虛擬機器;即時編譯器;嵌入式;方法展開;展開;Java;JVM;JIT;Embedded;Method Inlining;Inlining
公開日期: 2006
摘要: 近來有越來越多將 Java應用於嵌入式系統上的趨勢,例如應用於手機和個人數位助理(PDA)等。而隨者這些智慧型裝置中使用 Java 應用程式的普及,效能就成為很重要的議題。為了達到更佳的執行速度,嵌入式 Java 虛擬機器使用了輕量化的即時編譯器,稱為嵌入式即時編譯器。嵌入式即時編譯器只編譯了簡單的位元組碼,而複雜的運算例如: 方法呼叫等,則交由直譯器執行。而此設計方式導致執行方法呼叫的效能低落。本論文中,我們設計並實作一方法展開的機制,來提高程式執行效能,且讓程式空間的的擴張在一個合理的範圍內。 我們的方法展開機制除了可以展開傳統的靜態方法外,也結合了在高效能即時編譯器中的方法展開機制使得虛擬方法也可以被展開,以利用虛擬方法中單型的特性來提高效能。此外,在單型的假設被動態類別載入破壞時,我們的回覆機制也使得後續的執行還有機會重新利用展開過的方法。整體而言,我們的方法展開機制使程式執行效能增進了1.43倍,而只增加少量的系統動態記憶體使用空間。
Recently there has been a growing interest in using Java on embedded portable devices such as cellular phones and PDAs. With the popularization of deploying Java applications on these devices increases, performance will become an important issue. To achieve higher performance, embedded JVMs are usually enhanced with a lightweight just-in-time (JIT) compiler, embedded JIT compiler, instead of incorporating a full-fledged JIT compiler as high performance JVM. For fast compilation and low code size expansion, an embedded JIT compiler usually compiles simple bytecode instructions and lets interpreter handle method calls, but it results in poor performance on method calls. In this thesis, we design and implement a method inlining mechanism that is suitable for embedded JIT compiler to improve speed performance while keeping the code size expansion in a reasonable size. In addition to inlining conventional static methods, our method inlining mechanism can also inline virtual methods and make use of monomorphic property to further improve performance. Even when this monomorphic property is violated by dynamic class loading, the inlined code can still have chances to be executed by our recovery mechanism. As a whole, our method inlining mechanism demonstrates 1.43 speedup with only about 3% code size expansion (if 512Kbytes memory).
URI: http://140.113.39.130/cdrfb3/record/nctu/#GT009317590
http://hdl.handle.net/11536/78800
Appears in Collections:Thesis


Files in This Item:

  1. 759001.pdf

If it is a zip file, please download the file and unzip it, then open index.html in a browser to view the full text content.