| 研究生: |
羅仁杰 Lo, Ren-Jie |
|---|---|
| 論文名稱: |
提升 Java 直譯器效能之新的位元碼轉換技術 A New Approach to Bytecode Translation for Accelerating Java Interpreters |
| 指導教授: |
侯廷偉
Hou, Ting-Wei |
| 學位類別: |
碩士 Master |
| 系所名稱: |
工學院 - 工程科學系 Department of Engineering Science |
| 論文出版年: | 2005 |
| 畢業學年度: | 93 |
| 語文別: | 中文 |
| 論文頁數: | 52 |
| 中文關鍵詞: | 直譯器 、快速方法轉換 |
| 外文關鍵詞: | Interpreter, Threaded Code, Quick Method Translation, goto |
| 相關次數: | 點閱:103 下載:1 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
由於 Java 直譯器有著簡單實作、容易維護和移植的優點,所以如何提升 Java 直譯器的執行效率,而讓沒有Just-In-Time 的 Java 虛擬機器,執行速度能夠更為提升,且其應用範圍能夠更為廣泛,是ㄧ個很重要的議題。
本研究提出一個新穎並稱為快速方法轉換的技術,將原本 Java 類別檔方法裡所存的 bytecode 資訊,轉換成相對應的 bytecode 實作位址。藉由這轉換技術的實作,能讓直譯器在每次指令分發之間,能夠節省兩次的記憶體存參考時間,也因此能夠提升整體 Java 虛擬機器的執行速度。本研究將此法實作在開放原始碼的 JamVM 上,並使用 SPECjvm98 的效能測試程式,進行方法轉換技術的效能評估。經實驗證實,實作了本研究所提出的方法轉換技術,SPECjvm98 有 1.28 倍至 1.6 倍的效能提升。
Java Virtual Machines have interpreters and optional Just-In-Time compilers. Interpreters have advantages of easier implementation, easier maintenance, and better portability, as compared with Just-In-Time compilers. How to improve the performance of the Java Virtual Machine and make the overall performance acceptable without a Just-In-Time compiler has been an important issue.
In this thesis, we proposed a new Java Method Translation for Java Virtual Machines. The bytecode in the original Java method are translated into the addresses where bytecode were implemented. By this approach, a Java Virtual Machine saves 2 times memory accesses during each bytecode dispatching. So the performance is speeded up.
JamVM, an open source VM, is taken as the testing platform and SPECjvm98 benchmarks are used. The result of the measurements shows that the new JamVM with the proposed Java Method Translation implementation could improve the performance from 1.28 times up to 1.6 times on SPECjvm98 applications.
[1]Matthew Arnold, Stephen J. Fink, David Grove, Michael Hind, Peter F. Sweeney, “A Survey of Adaptive Optimization in
Virtual Machines,” IBM Research Division Thomas J. Waston Research Center, P.O. Box 704, Yorktown Heights, May 18, 2004.
[2]Brian Davis, John Waldron, “A Survey of Optimisations for the Java Virtual Machine,” Proceedings of the Principles and
practice of programming in Java, Kilkenny City, Ireland, p.181-183, June 2003.
[3]GNU Compiler Collection, http://gcc.gnu.org/.
[4]David Gregg, M. Anton Ertl and Andreas Krall, “A Fast Java Interpreter,” Proceedings of Java Optimization Strategies
for Embedded System Workshop at ETAPS’01, In Uwe Assmann, 2001.
[5]Jan Hoogerbrugge and Lex Augusteijn, “Pipelined Java Virtual Machine Interpreters,” Proceedings of the 9th International
Conference on Compiler Construction(CC’00),Springer LNCS, p.35-49, 2000.
[6]Dewar, R. B K., “Indirect Threaded Code,” Proceedings of Communications of the ACM, Volume 18 , Issue 6, p.330-331,
1975.
[7]Robert Lougher , JamVM. http://jamvm.sourceforge.net/.
[8]Bell, J. R., “Threaded Code,” Proceedings of Communications of the ACM, Volume 16 , Issue 6, p.370-372, 1973.
[9]Standard Performance Evaluation Corporation, http://www.spec.org/
[10]Lindholm, T. The Java(TM) Virtual Machine Specification. Addison-Wesley Professional, 1999.
[11]Wiki Web, http://c2.com/cgi/wiki?FirstClass/
[12]楊方瑜,應用於 x86 平台之 Java 及時編譯器的設計與實作,國立成功大學工程科學系碩士論文,1998.