針對Google Android平台的提前式編譯優化架構

碩士 === 國立清華大學 === 資訊工程學系 === 99 === The execution environment of Android system is based on a virtual machine called Dalvik virtual machine (DVM) in which the execution of an application program is in interpret-mode. To reduce the interpretation overhead of DVM, Google has included a trace-based ju...

Full description

Bibliographic Details
Main Authors: Wang, Chih-Sheng, 王誌陞
Other Authors: Chung, Yeh-Ching
Format: Others
Language:zh-TW
Published: 2011
Online Access:http://ndltd.ncl.edu.tw/handle/64799758197821529212
id ndltd-TW-099NTHU5392068
record_format oai_dc
spelling ndltd-TW-099NTHU53920682015-10-13T20:23:01Z http://ndltd.ncl.edu.tw/handle/64799758197821529212 針對Google Android平台的提前式編譯優化架構 An Ahead-of-Time compilation and optimization framework based on LLVM for Google Android Wang, Chih-Sheng 王誌陞 碩士 國立清華大學 資訊工程學系 99 The execution environment of Android system is based on a virtual machine called Dalvik virtual machine (DVM) in which the execution of an application program is in interpret-mode. To reduce the interpretation overhead of DVM, Google has included a trace-based just-in-time compiler (JITC) in the latest version of Android. Due to limited resources and the requirement for reasonable response time, the JITC is unable to apply deep optimizations to generate high quality code. In this paper, we propose a method-based ahead-of-time compiler (AOTC) based on LLVM[27], to speed up the execution of Android applications without the modification of any components of Android framework. The main idea is to convert the hot methods of an application program from DEX code to C code and uses the GCC compiler to translate the C code to the corresponding native code. With the Java Native Interface (JNI) library, the translated native code can be called by DVM. Both AOTC and JITC have their strength and weakness. In order to combine the strength and avoid the weakness of AOTC and JITC, we have proposed a cost model to determine whether a method should be handled by AOTC or JITC during profiling. To evaluate the performance, three benchmarks used by Google JITC are used as test cases. The performance results show that, with AOTC, the execution time of an application is 3.6 to 5.7 times faster than that without JITC, and -0.4% to 58.4% faster than that with JITC. Chung, Yeh-Ching 鍾葉青 2011 學位論文 ; thesis 32 zh-TW
collection NDLTD
language zh-TW
format Others
sources NDLTD
description 碩士 === 國立清華大學 === 資訊工程學系 === 99 === The execution environment of Android system is based on a virtual machine called Dalvik virtual machine (DVM) in which the execution of an application program is in interpret-mode. To reduce the interpretation overhead of DVM, Google has included a trace-based just-in-time compiler (JITC) in the latest version of Android. Due to limited resources and the requirement for reasonable response time, the JITC is unable to apply deep optimizations to generate high quality code. In this paper, we propose a method-based ahead-of-time compiler (AOTC) based on LLVM[27], to speed up the execution of Android applications without the modification of any components of Android framework. The main idea is to convert the hot methods of an application program from DEX code to C code and uses the GCC compiler to translate the C code to the corresponding native code. With the Java Native Interface (JNI) library, the translated native code can be called by DVM. Both AOTC and JITC have their strength and weakness. In order to combine the strength and avoid the weakness of AOTC and JITC, we have proposed a cost model to determine whether a method should be handled by AOTC or JITC during profiling. To evaluate the performance, three benchmarks used by Google JITC are used as test cases. The performance results show that, with AOTC, the execution time of an application is 3.6 to 5.7 times faster than that without JITC, and -0.4% to 58.4% faster than that with JITC.
author2 Chung, Yeh-Ching
author_facet Chung, Yeh-Ching
Wang, Chih-Sheng
王誌陞
author Wang, Chih-Sheng
王誌陞
spellingShingle Wang, Chih-Sheng
王誌陞
針對Google Android平台的提前式編譯優化架構
author_sort Wang, Chih-Sheng
title 針對Google Android平台的提前式編譯優化架構
title_short 針對Google Android平台的提前式編譯優化架構
title_full 針對Google Android平台的提前式編譯優化架構
title_fullStr 針對Google Android平台的提前式編譯優化架構
title_full_unstemmed 針對Google Android平台的提前式編譯優化架構
title_sort 針對google android平台的提前式編譯優化架構
publishDate 2011
url http://ndltd.ncl.edu.tw/handle/64799758197821529212
work_keys_str_mv AT wangchihsheng zhēnduìgoogleandroidpíngtáidetíqiánshìbiānyìyōuhuàjiàgòu
AT wángzhìshēng zhēnduìgoogleandroidpíngtáidetíqiánshìbiānyìyōuhuàjiàgòu
AT wangchihsheng anaheadoftimecompilationandoptimizationframeworkbasedonllvmforgoogleandroid
AT wángzhìshēng anaheadoftimecompilationandoptimizationframeworkbasedonllvmforgoogleandroid
_version_ 1718047063694901248