請用此 Handle URI 來引用此文件:
http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/6851
完整後設資料紀錄
DC 欄位 | 值 | 語言 |
---|---|---|
dc.contributor.advisor | 廖世偉(Shih-Wei Liao) | |
dc.contributor.author | Wen-Han Ku | en |
dc.contributor.author | 谷汶翰 | zh_TW |
dc.date.accessioned | 2021-05-17T09:19:30Z | - |
dc.date.available | 2015-07-20 | |
dc.date.available | 2021-05-17T09:19:30Z | - |
dc.date.copyright | 2012-07-20 | |
dc.date.issued | 2012 | |
dc.date.submitted | 2012-06-27 | |
dc.identifier.citation | [1] Android NDK, http://developer.android.com/sdk/ndk/index.html
[2] Lee, S. and Jeon, J.W., Evaluating performance of Android platform using native C for embedded systems, Control Automation and Systems (ICCAS), IEEE, pp. 1160-1163, 2010 [3] The LLVM compiler infrastructure, http://llvm.org [4] LLVM Assembly Language Reference Manual, http://llvm.org/docs/LangRef.html [5] Clang: a C language family frontend of LLVM, http://clang.llvm.org/ [6] AOT compiler, http://en.wikipedia.org/wiki/AOT_compiler [7] Lin, C.M., Lin, J.H., Dow, C.R. and Wen, C.M., Benchmark Dalvik and Native Code for Android System, Innovations in Bio-inspired Computing and Applications, IEEE, pp. 320-323, 2011 [8] Ratabouil, S., Android Ndk Beginner’s Guide, Packt Publishing, 2011 [9] Daniel Ionescu, Angry Birds Devs Angry At Android Fragmentation, http://www.pcworld.com/article/211152/angry_birds_devs_angry_at_android_fragmentation.html, 2010 [10] Oliver, Build error (include search path?) on ndk r5, https://groups.google.com/forum/?fromgroups#!topic/android-ndk/FO124L4Y85E, 2010 [11] Richard L. Sites, Anton Chernoff, Matthew B. Kirk, Maurice P. Marks, and Scott G. Robinson, Binary translation, Communications of the ACM, vol 36, pp. 69-81, 1993 [12] Mark Probst, Dynamic Binary Translation, UKUUG Linux Developer’s Conference, 2002 [13] Moore Ryan W., Baiocchi Jose A., Childer Bruce R., Davidson Jack W. and Hiser Jason D., Addressing the challenges of DBT for the ARM architecture, SIGPLAN Not., vol. 44, num. 7, pp. 147-156, 2009 [14] Chernoff A., Herdeg M., Hookway R., Reeve C., Rubin, N., Tye T., Yadavalli S.B. and Yates J., A profile-directed binary translator, IEEE Micro, vol. 18, pp. 56-64, 1998 [15] Chen J.Y., Yang W., Hung T.H., Su H.M., and Hsu W.C., A static binary translator for efficient migration of ARM-based applications, ODES-6: 6th Workshop on Optimizations for DSP and Embedded Systems, 2008 [16] Vikram Adve, Chris Lattner, Michael Brukman, Anand Shukla, and Brian Gaeke, LLVA: A Low-level Virtual Instruction Set Architecture, Proceeding of the 36th annual ACM/IEEE International Symposium on Microarchitecture, 2003 [17] Chris Lattner and Vikram Adve, LLVM: A Compilation Framework for Lifelong Program Analysis and Transformations, Proceeding of the International Symposium on Code Generation and Optimization, 2004 [18] Dan Gohman, LLVM IR is a compiler IR, http://comments.gmane.org/gmane.comp.compilers.llvm.devel/43769, 2011 [19] Can I compile C or C++ code to platform-independent LLVM bitcode? http://llvm.org/docs/FAQ.html#can-i-compile-c-or-c-code-to-platform-independent-llvm-bitcode, LLVM FAQ [20] Christopher Guntli, Architecture of clang, HSR – University of Applied Science in Rapperswil, 2011 [21] Komatineni S., MacLean D. and Hashimi S.Y., Programming 3D Graphics with OpenGL, Pro Android 3, Springer, pp. 623-691, 2011. [22] MCLinker: LLVM Linker for Mobile Computing, http://code.google.com/p/mclinker/ [23] Galaxy Nexus, http://en.wikipedia.org/wiki/Galaxy_Nexus [24] Yee B., Sehr D., Dardyk G., Chen J.B., Muth R., Ormandy T., Okasaka S., Narula N., and Fullagar N., Native client: A sandbox for portable, untrusted x86 native code, Security and Privacy, 30th IEEE Symposium on, pp. 79-93, 2009 [25] Just-in-time compilation, http://en.wikipedia.org/wiki/Just-in-time_compilation [26] Muller, G., Moura, B., Bellard, F. and Consel, C., Harissa: A flexible and efficient Java environment mixing bytecode and compiled code, Proceedings of the 3rd Conference on Object-Oriented Technologies and Systems, vol. 16, num 20, pp. 1-20, 1997 [27] Chih-Sheng Wang, Guillermo Perez, Yeh-Ching Chung, Wei-Chung Hsu, Wei-Kuan Shih and Hong-Rong Hsu, A method-based ahead-of-time compiler for android applications, Proceeding of the 14th International conference on Compilers, architectures and synthesis for embedded systems, 2011 [28] Bornstein, D., Dalvik vm internals, Google I/O Developer Conference, vol. 23, pp. 17-30, 2008 [29] Smali: An assembler/dissembler for Android’s dex format, http://code.google.com/p/smali/ [30] COINS Compiler Insfrastructure, http://www.coins-project.org/international/ | |
dc.identifier.uri | http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/6851 | - |
dc.description.abstract | Android作業系統近年來在智慧型手機及平板電腦上大放異彩,使用者開發的應用程式數量也愈來愈多。開發者可以選擇單純使用 Java語言,或額外選用與機器相關的原生語言,例如C/C++,透過NDK開發套件,與前者在程式運行時互相合作。由於原生語言與機器高度相關,因此在開發者本機端就必須先決定好要運行在哪一種裝置上,並且將產生出來的動態連結庫放入APK裡面。此作法不只限制了可以運行的裝置種類,也讓開發流程變得有不可移植性。
在本篇論文中,我們透過LLVM這個編譯器基礎設施的中間表示式,位元碼 (bitcode),作為一種可移植的發布格式。在開發者本機端,我們透過工具將原生語言轉換為 bitcode,包進APK裡面,待下載到裝置後,利用LLVM的元件編譯連結成原生的動態連結庫,這個動作是在運行之前做完的,不影響執行時的效率。目前已經將NDK現有的範例程式,例如Hello-jni、Bitmap-plasma、Native-plasma 等,以及其他較複雜龐大的範例,例如 Quake、Quake 2、Quake 3等第三方的程式,成功運行在現有Android裝置上不同的平台,例如X86、ARM上面。藉由這個實驗,我們對於傳統的編譯流程有了創新,並且也讓Android因為NDK編譯機制而造成的碎片化問題得到了解決。 | zh_TW |
dc.description.abstract | Android operating system is more popular on mobile phones and tablets in these years. Correspondingly, developer’s applications are more and more. Developers can choose Java language, or native language, like C/C++, which can be embedded into Android packge (APK) by NDK, cooperating with the former. Since native language is highly machine-dependent, developers need to decide which targets they want to ship, and put the compiled DSO into APK. This approach limits the number of kinds of devices, and makes the development process not portable.
In this paper, we exploit the intermediate representation of LLVM infrastructure, bitcode, as a portable public format. On the host side, we compile native language source codes to a LLVM bitcode and put it into APK. On the target side, we use LLVM components to compile the bitcode into a DSO, which is done before runtime without affecting runtime performance. Currently we have successfully run the existing samples of NDK, like Hello-jni, Bitmap-plasma, and other third-party samples, like Quake, Quake 2, Quake 3, on the existing various Android platforms, like X86 and ARM. Through this experiment, we innovate on the traditional compilation flow, and solve the fragmentation problem caused by NDK compilation mechanism on Android. | en |
dc.description.provenance | Made available in DSpace on 2021-05-17T09:19:30Z (GMT). No. of bitstreams: 1 ntu-101-R99922105-1.pdf: 582664 bytes, checksum: 1d4a1b34083a3aa41a1493cc7c67a1f8 (MD5) Previous issue date: 2012 | en |
dc.description.tableofcontents | Acknowledgements i
中文摘要 ii Abstract iii Contents iv List of Figures vi List of Tables vii Chapter 1 Introduction 1 Chapter 2 Reviews of Android NDK 4 2.1 Compilation Process 4 2.2 Binary Translation 6 2.2.1 Target-Specific Problems 7 Chapter 3 Portable NDK 8 3.1 Android Bitcode 9 3.2 Portable Support Library 10 3.3 Host End 11 3.4 Device End 11 3.5 Experimental Result 12 Chapter 4 Related Works 14 4.1 Google Native Client 14 4.2 Method-Based AOT on DEX File 14 4.3 Debugging Support 15 4.3.1 NDK Debugging Mechanism 15 4.3.2 Portable-NDK Debugging Mechanism 16 4.4 Compilation Time Speedup 16 4.4.1 Option Tweaking 17 4.4.2 Divide and Conquer 18 4.4.3 Change Code Generation Policy 19 Chapter 5 Future Work 22 Chapter 6 Conclusion 24 References 25 | |
dc.language.iso | zh-TW | |
dc.title | 使用LLVM實作Ahead-of-Time編譯技術於Android NDK | zh_TW |
dc.title | Implement Ahead-of-Time Compilation via LLVM on Android NDK | en |
dc.type | Thesis | |
dc.date.schoolyear | 100-2 | |
dc.description.degree | 碩士 | |
dc.contributor.oralexamcommittee | 陳呈瑋(Cheng-Wei Chen),陳官辰(Koan-Sin Tan),梁伯嵩(Bor-Sung Liang) | |
dc.subject.keyword | 動態連結庫,可移植性,碎片化, | zh_TW |
dc.subject.keyword | Android,NDK,DSO,LLVM,Portability,Fragmentation, | en |
dc.relation.page | 27 | |
dc.rights.note | 同意授權(全球公開) | |
dc.date.accepted | 2012-06-28 | |
dc.contributor.author-college | 電機資訊學院 | zh_TW |
dc.contributor.author-dept | 資訊工程學研究所 | zh_TW |
顯示於系所單位: | 資訊工程學系 |
文件中的檔案:
檔案 | 大小 | 格式 | |
---|---|---|---|
ntu-101-1.pdf | 569.01 kB | Adobe PDF | 檢視/開啟 |
系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。