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

確保時脈正確之函式特性整理工具

A cycle-accurate profiling tool

指導教授 : 楊佳玲

摘要


在一般的Unix系統裡面,我們常使用GProf作為函式特性處理工具,觀察何種 函式為效能之瓶頸,並將該函式最佳化,以期達成程式效能之增進。 然而,在我們的ARM 模擬平台上,我們需要一個在確保時脈正確性之 函式特性整理工具,並且能夠產生每個函式執行時,所耗掉多少循環數。因 此,GProf的功能並不符合我們的需求,因為它只對執行中程式定時取樣,且在 ARM 模擬平台上使用GProf也不切實際。 為了要實現在ARM處理器平台上觀察函式之特性,我們改以Sim Power Analyzer為基礎,在ARM模擬平台上另建構一個函式特性的整理工具,在不更改 原使用者所提供的程式之情況下,作函式特性之整理,因為要在不能更動程式的 情況下作函式特性之整理,因此我們必需正確地判斷函式開始和結束的時間,以 確保結果之正確。另外,另附以使用者介面,將執行後所產生的資料加以整理, 方便使用者更容易觀察函式之特性。 發展這個工具,讓我們不僅可產生函式呼叫關係圖,以觀察各個函式之間呼叫 的關係,以及函式被呼叫之後所執行的cycles數並且可以觀察每個函式的總執行時 間以及其所佔的時間比例。如此一來,我們就可以將造成效能瓶頸的函式切割出 來作成硬體,以期獲得效能之改進,並降低功耗。

並列摘要


GProf is a common profiling tool which I usually used to observe the bottleneck within a program. I can improve a program’s performance after checking which routine dominates overall execution time. However, I need another profiling tool for simulated ARM platform, which does a cycle-accurate simulation. Also, I need the information of each routine’s execution cycles. Therefore, GProf does not meet our requirement. Because it only sample a running program for a period of time. It’s meaningless to have GProf runs on the simulation platform, too. Thus, in order to do functional profiling in the ARM platform, I develop a function profiling tool based on Sim Power Analyzer. I do profiling a program without modifying any part of its binary file. The challenge is to judge whether the subroutine starts or not. Besides, I provide graphical user interface to present profiling result to make observing these results easier. With our tool, I can not only generate call graph to inspect how much cycles are spent in each routine and it’s children, but also observe total execution cycles and percentage over total execution time of each routine. In this way, I can find out which routine is the bottleneck and implement it as hardware to gain performance improvement and lower energy consumption.

參考文獻


[1] ARM architecture reference manual 2rd edition, published by Addison-Wesley.
[2] GNU gprof, http://www.gnu.org/software/binutils/manual/gprof-
2.9.1/gprof.html
[3] SimpleScalar LLC, http://www.simplescalar.com/
[4] The SimpleScalar-Arm Power Modeling Project,

延伸閱讀