| 研究生: |
陳琬元 Wan-yuan Chen |
|---|---|
| 論文名稱: |
nono ThreadDebugger: Dynamic Concurrency Observation and Analysis tool based on Debugger Watch/Break Points |
| 指導教授: |
鄭永斌
Yung-pin Cheng |
| 口試委員: | |
| 學位類別: |
碩士 Master |
| 系所名稱: |
資訊電機學院 - 資訊工程學系在職專班 Executive Master of Computer Science & Information Engineering |
| 論文出版年: | 2014 |
| 畢業學年度: | 102 |
| 語文別: | 中文 |
| 論文頁數: | 45 |
| 中文關鍵詞: | 多執行緒 、除錯器 、記錄 、工具 |
| 外文關鍵詞: | debugger, concurrency errors |
| 相關次數: | 點閱:7 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
多執行緒程式的開發過程中,除錯一直都是程式開發人員能力的重大考驗。許多學術研究,往往只針對某種錯誤去做偵測,如dead lock或race condition這類的錯誤。但是大部分的開發人員,對多執行緒程式開發的知識較為薄弱,錯誤發生時,有時候他們根本不明白發生了什麼問題,自然也無從去找到適合的工具。因此,除錯過程中,往往曠日廢時,難以找出錯誤。一般的整合開發環境,有提供非常基本的多執行緒觀察的功能,但是這些的除錯的功能,使用者通常不知道如何去使用它,往往只有實力強且除錯能力技巧高段的工程師,才勉強知道有這樣的功能存在。
本論文利用Visual Studio SDK,開發出能夠協助程式設計師們找出concurrency errors的外掛程式。本工具利用除錯器的資料監控點、中斷點、call stack等功能,提供一組基本的工具,協助程式設計師們釐清concurrency error的蛛絲馬跡。工具會將過程記錄,程式設計師們可利用它記錄下來的內容進行分析除錯。
In multi-threaded program development process, debugging can be a difficult task for programmers. Many academic research often focus on some kind of concurrency errors, such as a race detector is designed to detect race condition only. In practice, programmers may not have enough multi-threading programming knowledge. When a program crashes, a programmer may not be aware of that it could be a concurrency error. So , applying a suitable tool could be hard in real cases.
A debugger typically provides some very basic features to allow programmers to observe the status of the threads. In this thesis, we use the Visual Studio SDK to develop a tool called ThreadDebugger. This tool can help programmers to record the important traces and clues so that programmers can find the concurrency errors eventually. We use the wacthpoint to track memory access, and the log critical traces along the executions of threads. ThreadDebugger logs information such as stack frame, time tick and local variables. Programmer can use the log messages to dig out the causes and clues of concurrency errors.
[1] C. Li, C. Ding, and K. Shen, "Quantifying the cost of context switch," presented at the Proceedings of the 2007 workshop on Experimental computer science, San Diego, California, 2007.
[2] L. Chew and D. Lie, "Kivati: fast detection and prevention of atomicity violations," presented at the Proceedings of the 5th European conference on Computer systems, Paris, France, 2010.
[3] R. Hastings and B. Joyce, Purify: fast detection of memory leaks and access errors, 1992.
[4] A. Srivastava and A. Eustace, "ATOM: a system for building customized program analysis tools," presented at the SIGPLAN Conference on Programming Language Design and Implementation, 1994.
[5] S. L. Graham, P. B. Kessler, and M. K. McKusick, "gprof: a Call Graph Execution Profiler," Sigplan Notices, pp. 120-126, 1982.
[6] J. Yang, D. Evans, D. Bhardwaj, T. Bhat, and M. Das, "Perracotta: mining temporal API rules from imperfect traces," presented at the International Conference on Software Engineering, 2006.
[7] J. Seward and N. Nethercote, "Using Valgrind to Detect Undefined Value Errors with Bit-Precision," presented at the USENIX Technical Conference, 2005.
[8] N. Nethercote and J. Seward, "Valgrind: A Program Supervision Framework," Electronic Notes in Theoretical Computer Science, vol. 89, pp. 44-66, 2003.
[9] J. W. Voung, R. Jhala, and S. Lerner, "RELAY: static race detection on millions of lines of code," presented at the Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, Dubrovnik, Croatia, 2007.
[10] S. H. Yong and S. Horwitz, "Using Static Analysis to Reduce Dynamic Analysis Overhead," Form. Methods Syst. Des., vol. 27, pp. 313-334, 2005.
[11] Helgrind: a data-race detector, 2005.
[12] S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson, "Eraser: a dynamic data race detector for multithreaded programs," ACM Transactions on Computer Systems, vol. 15, pp. 391-411, 1997.
[13] R. Chern and K. D. Volder, "Debugging with control-flow breakpoints," presented at the Proceedings of the 6th international conference on Aspect-oriented software development, Vancouver, British Columbia, Canada, 2007.
[14] J. B. Rosenberg, How debuggers work: algorithms, data structures, and architecture: John Wiley Sons, Inc., 1996.
[15] N. Jalbert and K. Sen, "A trace simplification technique for effective debugging of concurrent programs," presented at the Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering, Santa Fe, New Mexico, USA, 2010.
[16] R. D. Blumofe and C. E. Leiserson, "Scheduling multithreaded computations by work stealing," J. ACM, vol. 46, pp. 720-748, 1999.
[17] R. S. Engelschall, "Portable multithreading: the signal stack trick for user-space thread creation," presented at the Proceedings of the annual conference on USENIX Annual Technical Conference, San Diego, California, 2000.
[18] D. Ciabrini, "Stack virtualization for source level debugging," Softw. Pract. Exper., vol. 37, pp. 693-725, 2007.