| 研究生: |
陳鉅秉 Chen,Ju-Bing |
|---|---|
| 論文名稱: |
利用剖面織入技術偵測Java程式中的記憶體漏失 Aspect-Based Instrumentation for Locating |
| 指導教授: |
陳恭
Chen,Kung |
| 學位類別: |
碩士
Master |
| 系所名稱: |
理學院 - 資訊科學系 |
| 論文出版年: | 2007 |
| 畢業學年度: | 95 |
| 語文別: | 英文 |
| 論文頁數: | 41 |
| 中文關鍵詞: | 記憶體漏失 、垃圾回收器 、程式織入 、剖面導向程式設計 |
| 外文關鍵詞: | memory leak, garbage collection, code instrumentation |
| 相關次數: | 點閱:82 下載:38 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
Despite the built-in garbage collector, Java programs can still suffer the memory leak problem resulted from the unhealthy programming style of retaining unwanted references. This paper presents an aspect-based tool for assisting programmers in locating such references to fix the problem. This tool, FindLeaks, utilizes an aspect to collect memory consumption statistics and object references created during a program’s execution and analyzes them for detecting memory leaks. The distinctive feature of FindLeaks is that it reports not only suspected classes of leaked objects but also where in the source the unwanted references were created. Besides, this paper also reports our experience with FindLeaks on three open source Java programs and how we enhanced it to lower its overhead.
1. Introduction 5
2. Related Work 9
3. Technical Background: AOP and AspectJ 11
4. Design and Implementation of FindLeaks 14
4.1.Motivation and Overview 14
4.2.Profiling Aspect 16
4.2.1. Pointcut Design 16
4.2.2. Advice and Information Organization 20
4.2.3. Analysis Module: Identifying Leaks and Locating Unwanted References 23
5. Evaluation 29
5.1.Locating Memory Leaks 29
5.1.1. The first case: AgroUML 30
5.1.2. The second case: Azureus 31
5.1.3. The third case: RSSOwl 31
5.2.Overhead Results and Improvements 34
6. Conclusion and Future Work 38
7. References 40
[1] AgroUML, http://argouml.tigris.org/
[2] AgroUML bug 2352, http://argouml.tigris.org/issues/show_bug.cgi?id=2352
[3] Azureus, http://azureus.sourceforge.net/
[4] D. J. Pearce, M. Webster, R. Berry, P. H. Kelly, “Profiling with AspectJ,” Software: Practice and Experience 2006
[5] G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W.G. Griswold, “Getting Started with AspectJ”, Communications of ACM, vol. 44, no. 10, pp 59-65, Oct. 2001. AspectJ website: http://www.eclipse.org/aspectj/
[6] Jikes RVM, http://jikesrvm.org/
[7] K. Chen and C. H. Chien, “Extending the Field Access Pointcuts of AspectJ to Arrays”, Proc. International Computer Symposium, Taipei, Taiwan, Dec. 2006.
[8] L. Slipp, “Loitering Objects and Java Framework Design,” JavaReport, Vol. 6, No. 1, 2001.
[9] M. Bond and K. S. McKinley, “Bell: Bit-Encoding Online Memory Leak Detection,” in Proceedings of The Twelfth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2006, pp. 61–72.
[10] M. Jump and K. S. McKinl, “Cork: dynamic memory leak detection for garbage-collected languages “, in Proceedings of the POPL Conference, 2007, pp. 31-38.
[11] N. Mitchell and G. Sevitsky, “LeakBot: An Automated and Lightweight Tool for Diagnosing Memory Leaks in Large Java Application ,” in Proceedings of European Conference on Object-Oriented Programming (ECOOP), 2003, LNCS 2743, pp. 351-377.
[12] NIST/SEMATECH e-Handbook of Statistical Methods, http://www.itl.nist.gov/div898/handbook/
[13] O. Agesen and A. Garthwaite, “Efficient Object Sampling Via Weak References”, ACM SIGPLAN Notices, 2001.
[14] P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhot’ak, O. Lhot’ak, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. “abc: An extensible AspectJ compiler”, Procs. of the 4th International conference on Aspect-Oriented Software Development (AOSD 2005), Chicago, USA, pp. 87-98, 2005.
[15] ReferenceIdentityMap, http://sourceforge.net/projects/collections/
[16] RSSOwl: a Java RSS/RDF/Atom Newsreader, http://www.rssowl.org/
[17] W. D. Pauw and G. Sevitsky, “Visualizing Reference Patterns for Solving Memory Leaks in Java,” Concurrency: Practice and Experience, Volume 12, Issue 14, 2000, pp. 1431–1454.
[18] WeakReferences, http://java.sun.com/javase/6/docs/api/java/lang/ref/WeakReference.html