跳到主要內容

臺灣博碩士論文加值系統

(18.97.14.86) 您好!臺灣時間:2025/02/07 19:07
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:梁睿珊
研究生(外文):Liang, Jui-Shan
論文名稱:兩階段式線上記憶體洩漏偵測
論文名稱(外文):Two-Phase Online Memory Leak Detection
指導教授:林一平林一平引用關係蔡孟勳蔡孟勳引用關係
指導教授(外文):Lin, Yi-BingTsai, Meng-Hsun
學位類別:碩士
校院名稱:國立交通大學
系所名稱:網路工程研究所
學門:教育學門
學類:教育科技學類
論文種類:學術論文
論文出版年:2012
畢業學年度:100
語文別:英文
論文頁數:48
中文關鍵詞:記憶體洩漏線上偵測離線分析記憶體堆疊
外文關鍵詞:memory leakonline monitoringoffline analysisheapJava
相關次數:
  • 被引用被引用:0
  • 點閱點閱:527
  • 評分評分:
  • 下載下載:21
  • 收藏至我的研究室書目清單書目收藏:0
程式執行過程中若有記憶體洩漏之現象發生,會導致記憶體資源的浪費,降低系統運行的效能,甚至導致整個系統當機。記憶體洩漏的問題往往不易在開發階段立即發現並修復,因此需要線上記憶體洩漏偵測之技術。
本論文提出以兩階段的方式線上偵測Java程式之記憶體洩漏。在第一階段(離線分析),使用者執行所要監控之程式一段時間,並使用我們所提出之代理程式分析其記憶體堆疊(heap)。代理程式接著離線計算記憶體堆疊中各資料結構的總佔用位元數(total occupied bytes),以便使用者依據此計算結果選擇可能造成記憶體洩漏之物件類別。在第二階段(線上監看),為了減少程式運行時額外增加的時間與空間,代理程式僅監看使用者所選擇的類別之物件,而非監看記憶體堆疊中的所有物件。本方法會回報被監看物件最後被存取之時間與位置(包含原始碼檔名以及行號),以利使用者參考並修改程式。
Memory leaks generated by a running program may exhaust memory resources and degrade system performance. In worst case memory leaks eventually crash the whole system. They threaten long-running systems such as customer service systems in telecom operations. It is hard to reproduce these kinds of leaks, let alone to identify and fix them early in the development phase. Thus online memory leak detection is required.
In this paper we propose a two-phase approach to the online memory leak detection problem for Java programs. In phase one (offline analysis), the user executes the investigated program for a while and analyzes its heap with the proposed agent. The agent then summarizes the total occupied bytes of data structures in the heap offline, and the user is then able to select classes whose object instances seem to be potential leaks by examining the total occupied bytes summary. In phase two (online monitoring), to reduce the space and time overhead at runtime, the agent monitors online the objects of selected classes instead of monitoring all objects in the heap. The approach reports the last accessed time and location (including the source file name and the line number) of each leak candidate, with which the user can identify and fix leaks in the program.
摘要 I
Abstract II
Acknowledgements III
Contents IV
List of Figures VII
List of Tables VIII
1 Introduction 1
2 Related Work 3
3 Concept of Referencing Among Objects 5
3.1 Total Occupied Bytes .............................. 5
3.2 Reference Paths and Reference Rules ..................... 8
4 Design and Implementation of Two-Phase Online Memory Leak Detection 12
4.1 Overview .................................... 12
4.1.1 Structure Diagram ........................... 13
4.1.2 Phase One: Offline Analysis ...................... 13
4.1.3 Phase Two: Online Monitoring .................... 14
4.2 User Interface Module ............................. 15
4.2.1 Phase One Dialog Component ..................... 15
4.2.2 Phase Two Dialog Components .................... 18
4.3 Core Module .................................. 20
4.3.1 Heap Snapshot Component ...................... 20
4.3.2 Dominator Tree Component ...................... 21
4.3.3 Object Monitor Component ...................... 21
4.3.4 Record Component ........................... 22
4.3.5 Reporter Component .......................... 23
5 Performance Evaluation 24
5.1 Locating Memory Leak in Eclipse 3.1.2 .................... 24
5.2 Space Overhead Analysis ............................ 25
5.2.1 Phase One (Offline Analysis) ..................... 25
5.2.2 Phase Two (Online Monitoring) .................... 27
5.3 Time Overhead Analysis ............................ 28
6 Conclusions 31
Bibliography 32
A The MyProgram Program 34
B The RuntimeExp Program 44
[1] R. Jones and R. Lins, Garbage collection: algorithms for automatic dynamic memory management. Wiley, 1996.
[2] E. K. Maxwell, G. Back, and N. Ramakrishnan, "Diagnosing memory leaks using graph mining on heap dumps," in Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining, ser. KDD ’10. New York, NY, USA: ACM, 2010, pp. 115–124.
[3] Jprobe. Quest Software. [Online]. Available: http://www.quest.com/jprobe/
[4] M. D. Bond and K. S. McKinley, "Bell: bit-encoding online memory leak detection," SIGPLAN Not., vol. 41, pp. 61–72, October 2006.
[5] M. Jump and K. S. McKinley, "Detecting memory leaks in managed languages with cork," Software: Practice and Experience, vol. 40, no. 1, pp. 1–22, 2010. [Online]. Available: http://dx.doi.org/10.1002/spe.945
[6] Jrockit mission control. Oracle. [Online]. Available: http://www.oracle.com/technetwork/middleware/jrockit/overview/index-090630.html
[7] Jikes rvm. The Jikes RVM Project. [Online]. Available: http://jikesrvm.org/
[8] Oracle jrockit jvm. Oracle Corporation. [Online]. Available: http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html
[9] Java se hotspot. Oracle Corporation. [Online]. Available: http://www.oracle.com/technetwork/java/javase/tech/hotspot-138757.html
[10] Jvm tool interface version 1.2. Oracle. [Online]. Available: http://docs.oracle.com/javase/7/docs/platform/jvmti/jvmti.html
[11] K. D. Cooper, T. J. Harvey, and K. Kennedy, "A simple, fast dominance algorithm," 2001. [Online]. Available: http://www.hipersoft.rice.edu/grads/publications/dom14.pdf
[12] Eclipse bug 115789 - memory leak. The Eclipse Foundation. [Online]. Available: https://bugs.eclipse.org/bugs/show_bug.cgi?id=115789
連結至畢業學校之論文網頁點我開啟連結
註: 此連結為研究生畢業學校所提供,不一定有電子全文可供下載,若連結有誤,請點選上方之〝勘誤回報〞功能,我們會盡快修正,謝謝!
QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top