標題: 在嵌入式混合模式爪哇虛擬機器中使用多重載入/儲存指令之實驗
Experiment on Using Load/Store Multiple Instruction in Embedded Mixed-Mode JVM
作者: 黃俊諭
Jun-Yu Huang
鍾崇斌
Chung-Ping Chung
資訊科學與工程研究所
關鍵字: 多重載入指令;多重儲存指令;嵌入式爪哇虛擬機器;混合模式;即時編譯器;Load Multiple Instruction;Store Multiple Instruction;Embedded JVM;Mixed-Mode;JIT Compiler
公開日期: 2005
摘要: 在記憶體受限的嵌入式爪哇執行環境中為了達到加速,在直譯器之外加入一個輕型的即時編譯器(JIT compiler)來動態編譯經常被執行的程式片段是一種常見的設計。然而這種混合模式(mixed-mode)的爪哇虛擬機器於執行過程中,會經常在直譯器與動態編譯產生的程式碼之間做切換,造成動態產生的程式碼中,出現大量對區域變數(local variable)與運算元堆疊(operand stack)的載入/儲存(Load/Store)指令,約佔所有動態產生程式碼的三分之一。 在本篇研究中,便是針對此一現象設計優化動作,嘗試將這些載入/儲存指令以多重載入/儲存(Load/Store Multiple)指令來取代,並且藉由調整區域變數的順序與修改暫存器配置(register allocation)等方式,使得更多載入/儲存指令能夠符合被取代的條件,以達到減少程式碼及增加執行速度的目的。根據實驗結果顯示,在一個執行於ARM7的嵌入式混合模式爪哇虛擬機器中使用多重載入/儲存指令,可使動態產生的程式碼平均加速可達3.3%,程式碼減少達6%。
Mixed-mode execution that combines an interpreter with a light-weight JIT compiler is well suited to an embedded JVM that demands for speed performance and has limited memory budget. However, the mode switch between interpreter and JIT compiled code occurs frequently, and a great deal of load/store instructions are generated by JIT compiler to synchronize the local variable array and operand stack at each compiled code entry and exit point. These load/store instructions that access to local variable array and operand stack occupy about one-third of JIT compiled code. In this research, the optimization to utilize Load-Store-Multiple instruction to efficiently replace these load/store instructions is implemented for JIT compiled code size reduction and speedup. In addition, the approaches of adjusting the local variable placement and modifying register allocator to make more load/store replaceable are also adopted. Experimental results show that an average JIT compiled code speedup of 3.3% and code size reduction of 6% are achieved.
URI: http://140.113.39.130/cdrfb3/record/nctu/#GT009217566
http://hdl.handle.net/11536/73680
顯示於類別:畢業論文


文件中的檔案:

  1. 756601.pdf

若為 zip 檔案,請下載檔案解壓縮後,用瀏覽器開啟資料夾中的 index.html 瀏覽全文。