簡易檢索 / 詳目顯示

研究生: 張 筠
Chang, Yun
論文名稱: 根據時間標記法的高效平行程式除錯方法
An Effective Parallel Program Debugging Approach Based on Timing Annotation
指導教授: 蔡仁松
Tsay, Ren-Song
口試委員: 黃稚存
Huang, Chih-Tsun
李哲榮
Lee, Che-Rung
學位類別: 碩士
Master
系所名稱:
論文出版年: 2018
畢業學年度: 106
語文別: 英文
論文頁數: 30
中文關鍵詞: 平行程式除錯時間標記確定性
外文關鍵詞: parallel programs, debugging, timing annotation, determinism
相關次數: 點閱:2下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 我們根據時間標記法 (timing annotation technique) 提出了一個有效的平行程式除錯方式。隨著多核心系統逐漸普及,平行程式也成為了一個能夠完全利用電腦計算能力的手法。然而,平行程式特有的不確定性 (non-determinism)、以及因應而生的並行錯誤 (concurrency bugs),卻讓開發者在開發過程中困難重重。為了解決這個問題,我們從確定性多核心指令集模擬器 (deterministic Multi-Core Instruction Set Simulator) 的技術中萃取了讓它確定性 (deterministic) 的部分,也就是時間標記法,來設計出一個有效的平行程式除錯方法。我們構築了一個能讓平行程式除錯的確定性執行環境,並且設計了一些有效、獨特、好用的平行程式除錯功能。我們選擇改動QEMU以及GDB來做為一個演示這個概念的平台。我們的除錯器 (debugger) 用法跟現有的GDB除錯器十分相似,因此可讓使用者能夠流暢的使用這套工具。


    We propose an effective parallel program debugging approach based on the timing annotation technique. With prevalent multi-core platforms, parallel programming is required to fully utilize the computing power. However, the non-determinism property and the associated concurrency bugs are notorious and remain to be great challenge to designers. We hence propose an effective program debugging approach using the timing annotation technique derived from the deterministic Multi-Core Instruction Set Simulation (MCISS) technology. We hence construct a deterministic execution environment for parallel program debugging and devise a few unique, effective and easy-to-use parallel debugging functions. We modify QEMU and GDB to implement and demonstrate our proposed idea. The usage of our debugger is almost identical to the conventional GDB debugger. Therefore, users may learn how to use the tool seamlessly.

    Abstract 3 Contents 4 I. Introduction 6 II. Related work 9 III. Timing Annotation Technique 11 IV. Building a Deterministic Environment 14 A. Identify Sync Points 14 B. Perform Timing Annotation 14 C. Perform Synchronization 16 V. Designing Debugging Functions 17 A. Adapt Traditional Cyclic Debugging Functions 17 1. Breakpoint 17 2. Step Function 19 3. Runtime State Modification 21 B. New Features for the Proposed Debugger 22 1. Sync-Step Function 22 2. Runtime Interleaving Modification 23 VI. Implementation and Testing 25 A. Modify QEMU 25 B. Testing Setup and Results 25 1. Determinism 26 VII. Conclusion 27 References 28

    [1] LEE, Edward A. The problem with threads. Computer, 2006, 39.5: 33-42.
    [2] Sara Abbaspour Asadollah, Daniel Sundmark, Sigrid Eldh, Hans Hansson, Wasif Afzal, 10 Years of research on debugging concurrent and multicore software: a systematic mapping study, Software Qual J (2017) 25: 49. https://doi.org/10.1007/s11219-015-9301-7
    [3] STALLMAN, Richard M.; PESCH, Roland H. Using GDB: A guide to the GNU source-level debugger. Free software foundation, 1991
    [4] CHEN, Shu-Yung; CHEN, Chien-Hao; TSAY, Ren-Song. An activity-sensitive contention delay model for highly efficient deterministic full-system simulations. In: Design, Automation, and Test in Europe Conference and Exhibition (DATE), 2014. IEEE, 2014. p. 1-6.
    [5] WU, Meng-Huan, et al. A high-parallelism distributed scheduling mechanism for multi-core instruction-set simulation. In: Proceedings of the 48th Design Automation Conference. ACM, 2011. p. 339-344.
    [6] WU, Meng-Huan, et al. An effective synchronization approach for fast and accurate multi-core instruction-set simulation. In: Proceedings of the seventh ACM international conference on Embedded software. ACM, 2009. p. 197-204.
    [7] YU, Fan-Wei, et al. A critical-section-level timing synchronization approach for deterministic multi-core instruction set simulations. In: Proceedings of the Conference on Design, Automation, and Test in Europe. EDA Consortium, 2013. p. 643-648.
    [8] ZENG, Bo-Han; TSAY, Ren-Song; WANG, Ting-Chi. An efficient hybrid synchronization technique for scalable multi-core instruction set simulations. In: Design Automation Conference (ASP-DAC), 2013 18th Asia and South Pacific. IEEE, 2013. p. 588-593.
    [9] BELLARD, Fabrice. QEMU, a Fast and Portable Dynamic Translator. In: USENIX Annual Technical Conference, FREENIX Track. 2005. p. 41-46.
    [10] TAN, M. A Minimal GDB Stub for Embedded Remote Debugging, 2002.Columbia University.
    [11] ZAMFIR, Cristian, et al. Debug determinism: the sweet spot for replay-based debugging. In: Workshop on Hot Topics in Operating Systems. 2011.
    [12] WANG, Yan, et al. DrDebug: Deterministic Replay based Cyclic Debugging with Dynamic Slicing. In: Proceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization. ACM, 2014. p. 98.
    [13] GOTTSCHLICH, Justin E., et al. Concurrent predicates: A debugging technique for every parallel programmer. In: Proceedings of the 22nd international conference on Parallel architectures and compilation techniques. IEEE Press, 2013. p. 331-340.
    [14] HUANG, Jeff; ZHANG, Charles; DOLBY, Julian. CLAP: recording local executions to reproduce concurrency failures. In: ACM SIGPLAN Notices. ACM, 2013. p. 141-152.
    [15] VIENNOT, Nicolas; NAIR, Siddharth; NIEH, Jason. Transparent mutable replay for multicore debugging and patch validation. In: ACM SIGARCH computer architecture news. ACM, 2013. p. 127-138.
    [16] WEERATUNGE, Dasarath; ZHANG, Xiangyu; JAGANNATHAN, Suresh. Analyzing multicore dumps to facilitate concurrency bug reproduction. ACM Sigplan Notices, 2010, 45.3: 155-166.
    [17] OHMANN, Peter; LIBLIT, Ben. Lightweight control-flow instrumentation and postmortem analysis in support of debugging. Automated Software Engineering, 2017, 24.4: 865-904.
    [18] MARK, D. Hill and Min Xu. Racey: A stress test for determinis tic execution. In http://www.cs.wisc.edu/~markhill/racey.html

    QR CODE