标题: | 嵌入式即时编译器中方法展开之设计与实作 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 |
显示于类别: | Thesis |
文件中的档案:
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.