摘要
在软件演化过程中,代码的调试是不可或缺的重要环节。对于多线程程序,线程的交错和调度是非确定的,不同的线程调度会产生不同的结果,程序员较难调试多线程程序。为此,对实际项目中多线程程序出现的错误进行分析,提出一种新的多线程调试工具,并给出顺序点概念。设计用于调试的线程调度语言,在字节码层面对测试程序进行插桩,使线程按照期望的顺序调度。在此基础上实现一个Eclipse上的调试插件。实验结果表明,与现有工具IMunit相比,该调试工具减少了程序员的工作量,并拓展了两类程序的调试场景,具有较好的实用性。
During the evolution of software,the debugging of programs is an important and necessary process.For multithreaded programs,the interleaving and scheduling are non-deterministic.Different scheduling can give different results,so it is difficult for developers to debug a multithreaded program.Therefore,this paper analyzes the concurrency bugs in real projects,presents a new multithreaded debugging tool,and proposes the concept of sequence point.It designs the scheduling language for debugging,instruments the test programs in bytecode level,and makes threads schedule in a desired sequence.It implements a debugging plugin in Eclipse.Experimental results show that compared with existing tool IMunit,the tool reduces developers’workload and enhances two debugging scenarios.It has better availability.
出处
《计算机工程》
CAS
CSCD
北大核心
2016年第11期83-88,共6页
Computer Engineering
基金
国家自然科学基金(61572313)
关键词
多线程
调试
字节码
插桩
领域特定语言
插件
multithreading
debugging
bytecode
instrumentation
domain-specific language
plugin