DocumentCode
3658656
Title
Complete Runtime Tracing for Device Drivers Based on LLVM
Author
Jia-Ju Bai;Hu-Qiu Liu;Yu-Ping Wang;Shi-Min Hu
Author_Institution
Nat. Lab. for Inf. Sci. &
Volume
2
fYear
2015
fDate
7/1/2015 12:00:00 AM
Firstpage
200
Lastpage
209
Abstract
Device drivers often suffer from much more bugs than the kernel, so testing device drivers becomes more and more important and necessary. In software testing, runtime tracing is an important technique to monitor real executing procedures of the program. Meanwhile, runtime information can also assist the programmer to make more accurate analysis of the program, like verifying the correctness of code execution and detecting bugs. However, due to kernel-mode execution and high complexity of kernel code, completely tracing drivers is hard, which causes real execution paths can not be clearly identified. In order to provide more powerful support for software testing of device drivers, we propose a method named Driver Trace, to do complete runtime tracing at the function level. Driver Trace utilizes instrumentation technique for runtime tracing, which is implemented based on LLVM compiler infrastructure. When the target driver works, Driver Trace records complete runtime information of function calls, like function names, return values and parameter pointers, and the information is recorded in a log file for future analysis. We have successfully implemented Driver Trace on 10 real device drivers in Linux 3.16.4 and made the evaluation as well. The experimental results show that Driver Trace provides an effective method of runtime tracing for device drivers with the modest overhead. Moreover, using an automated analysis of the runtime information recorded by Driver Trace, we also find 6 violations about resource usages in these 10 device drivers.
Keywords
"Runtime","Kernel","Instruments","Linux","Joints","Testing","Monitoring"
Publisher
ieee
Conference_Titel
Computer Software and Applications Conference (COMPSAC), 2015 IEEE 39th Annual
Electronic_ISBN
0730-3157
Type
conf
DOI
10.1109/COMPSAC.2015.24
Filename
7273619
Link To Document