透過您的圖書館登入
IP:3.139.234.66
  • 學位論文

A Profiling Mechanism to Enhance Android Dalvik JIT through Co-operating with Ahead of Time Compilation Framework

混合JIT提早編譯策略與提前式編譯架構的Android Dalvik效能強化分析機制

指導教授 : 石維寬
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


Immediately after Google launched the Android software platform, hardware and software developers around the world started investing in Android-based research development projects, hoping to take advantage of business opportunities relating to the new platform. The result has been a recent increase in Android-based smart phones, and it seems that these devices will become increasingly popular over time. However, one of the biggest drawbacks of the Android platform stems from its lackluster speed and performance. In response to this problem, Google has migrated a Just-in-Time compiler (JIT) to the latest version of the Android SDK (Software-Development-Kit). However, for a resource-limited embedded system like an Android smart phone, dynamic compilation will directly influence user-response time at startup, making deeper optimization levels unachievable. As a result, I propose a mechanism to speed up the Android application performance, which can serve as a complement to the Dalvik JIT and improve its performance. This mechanism sent Static-Time profiling information to Dalvik Virtual Machine,in order to reduce Just in Time Compiler (JIT) overhead of Profiling and Compilation in run-time. Then, appending an Ahead-of-Time compiler (AOTC): translate hot-spot code into native code to avoid VM`s Interpreter`s overhead in off-line. In addition, the Static-Time Profiling in this mechanism can base on the feature of Ahead-of-Time Compiler (AOTC) and Just in Time Compiler (JIT) to distinguish method categories. By combining the advantages of the two compilers, improve the Android application performance. In this paper, I describe the implementation of each section in the mechanism. On average, our cooperating mechanism improves performance by 1.16 times the original JIT-only Dalvik Virtual Machine. While plus AOTC can improve its performance on average 3.05 times.

並列摘要


Google在2007年釋出了Android開放手機平台,吸引許多硬體、軟體開發者去研究,至今學界、業界皆投入相當的資源在Android嵌入式產品的研發,國內廠商宏達電、華碩、宏碁等開發商亦推出了基於Android作業系統的智慧型手機與小型筆記型電腦且廣受國際市場歡迎;現在,平板電腦、電子書、甚至車用電子也皆以Android為作業系統的產品問世,不可否認,Android是個趨勢,也是國內在嵌入式軟體平台的一個機會。 目前Android平台的效能是被廣泛討論的議題,為了強調應用程式的高移植性,Google選擇了以Java作為其應用程式開發語言,並創造了名為Dalvik的虛擬機器(VM)和Run-Time Library來支援Java應用程式的運行;根據實驗比較,Dalvik VM的效能比其傳統Java VM在嵌入式系統上的表現,還有很多最佳化的空間;直至2009年11月,Google整合了Dalvik動態編譯器(JIT)至其最新的Code tree,來嘗試解決Dalvik效能低落的問題。 動態編譯器利用執行期間來做Profiling與Compilation的動作,除了有直接影響使用者反應時間的缺點外,因其在嵌入式平台的計算效能有限制,能產生code的quality以及執行Profiling的速度上也有瓶頸在;本論文提出一個完整機制來強化應用程式的執行效能,預先將Static-Time profiling資訊送給Dalvik Virtual Machine,以達成減少Just in Time Compiler(JIT)執行期間做Profiling與Compilation的overhead,並輔以一Ahead-of-Time Compiler(AOTC): 事先在off-line時將程式的熱門片段編譯成native code來避開VM直譯器的overhead;另外此機制的Static-Time Profiling能依Ahead-of-Time Compiler(AOTC)與Just in Time Compiler(JIT)的特性,將程式中的method分成適合AOTC或JIT兩種類,藉由結合兩個Compiler的優點,來提升整體Android應用程式的效能。 在這篇論文我們會詳細介紹各個部份的實作方式。數據方面,比起JIT-only的Android,加上輔助(無AOTC)能將其效能平均會提升16%。而加上AOTC的輔助能將其效能平均提升3.05倍。

參考文獻


[2] Systronix Practical Embedded Java BenchMarks, 2009.
[3] The World of Smalltalk,1999-2010
[5] The Perl Programming Language,2002-2010
[6] CLSP – An AnSI Common Lisp Implementation
[7] Common Lisp software repository

延伸閱讀