帳號:guest(18.191.86.163)          離開系統
字體大小: 字級放大   字級縮小   預設字形  

詳目顯示

以作者查詢圖書館館藏以作者查詢臺灣博碩士論文系統以作者查詢全國書目
作者(中文):陳建霖
作者(外文):Chen, Jian-Lin
論文名稱(中文):在 LLVM 上之大型軟體基於有權重的Call Graph之Function reordering最佳化
論文名稱(外文):Function reordering optimization based on weighted call graph for Large-scale software in LLVM
指導教授(中文):李哲榮
指導教授(外文):LEE, CHE-RUNG
口試委員(中文):鍾葉青
徐慰中
口試委員(外文):CHUNG, YEH-CHING
Hsu, Wei-Chung
學位類別:碩士
校院名稱:國立清華大學
系所名稱:資訊工程學系所
學號:104062573
出版年(民國):106
畢業學年度:105
語文別:英文
論文頁數:28
中文關鍵詞:編譯器函式重排序程式分析最佳化
外文關鍵詞:CompileroptimizationLLVMFunction-reorderingprofiling
相關次數:
  • 推薦推薦:0
  • 點閱點閱:342
  • 評分評分:*****
  • 下載下載:15
  • 收藏收藏:0
Function reordering最佳化是一種編譯器最佳化方法,主要藉由重新排序各個函式之間在執行檔中的記憶體位置,用來減少執行時期的I-Cache miss,相當於提升Cache Locality。
本論文針對大型軟體,使用資料量較大的資料蒐集,像是LLVM提供之metadata與Perf 提供的sampling資料分析。隨後分析資料,取得Call graph之中點與邊的權重,並且運用LLVM之特性,來做更精準的最佳化。相較於傳統編譯器之最佳化方法,傳統編譯器使用於最佳化的資訊,相對較少,所以我們利用更多的資訊進一步在效能上更加提升。我們採用的函式重排序演算法利用建好的圖去決定如何最有效的重排函式;此外此演算法也相對簡單易懂。
本文的實驗建構於X86環境下。最後結果可提升相對於O0約10%時間上的效能提升,相對於O3約5%的效能提升。
Function reordering optimization is a way how compiler optimizes a program. It reorders memory address of every function in executable file, in order to decrease I-Cache miss when running a program and it’s equal to improve cache locality.
In this paper, we aim at large-scale software, and collect larger data such as metadata provide by LLVM and sampling profile provide by Perf. After data analysis, we can get the weight of nodes and edges of call graph, and optimize more precise by property of LLVM. Relative to traditional compiler, it data for optimization is relative few, so we can utilize more information to improve process performance. Our reordering algorithm makes use of the graph to decide how to reorder a function; in addition, it’s also simple and easy to understand.
Experimental environment mentioned in this paper builds in X86. The final result can improve 10% in time performance relative to O0 and 5% to O3.
1. Introduction 5
2. Related Work 7
3. Data Collection 9
3.1 Kind Of Data 9
3.1.1 Function Metadata 9
3.1.2 Function Count 10
3.1.2 Call Graph 10
3.2 Profiling 11
3.2.1 Instrument 11
3.2.2 Sampling 11
3.2.3 Profiling For Function Reordering 12
3.3 Profiling By Perf 12
3.4 Profiling By QEMU 14
4. Function Reordering 16
4.1 Algorithm 17
4.2 Input Data For Reordering 21
4.3 Optimization Steps 22
5. Experiment 24
6. Conclusions and Future work 27
7. Reference 28

[1] Spark - a fast and general engine for large-scale data processing, https://spark.apache.org/
[2] Hadoop - distributed processing of large data sets across clusters, http://hadoop.apache.org/
[3] LLVM - reusable compiler and toolchain, http://llvm.org/
[4] Youfeng Wu. “Ordering functions for improving memory reference locality in a shared memory multiprocessor system”, MICRO 25 Proceedings of the 25th annual international symposium on Microarchitecture, 1992.
[5] P. Berube and J.N. Amaral, “Aestimo: a feedback-directed optimization evaluation tool”, Performance Analysis of Systems and Software, IEEE, 2006.
[6] Dehao, David Xinliang Li and Tipp Moseley, “AutoFDO: Automatic Feedback-Directed Optimization for Warehouse-Scale Applications”, CGO '16 Proceedings of the 2016 International Symposium on Code Generation and Optimization, 2016
[7] QEMU – a open source machine emulator and virtualizer, http://www.qemu.org/
[8] Scott McFarling, ”Program Optimization for Instruction Caches”, ACM, 1989
[9] IBM, “Profile-directed restructuring of operating system code”, IBM Systems Journal, 1998
[10] LTO – Link time optimization, https://gcc.gnu.org/wiki/LinkTimeOptimization
 
 
 
 
第一頁 上一頁 下一頁 最後一頁 top
* *