Tracing interrupts in embedded software

During the system development, developers often must correct wrong behavior in the software---an activity colloquially called program debugging. Debugging is a complex activity, especially in real-time embedded systems because such systems interact with the physical world and make heavy use of interrupts for timing and driving I/O devices. Debugging interrupts is difficult, because they cause non-linear control flow in programs which is hard to reproduce in software. Record/replay mechanisms have proven their use to debugging embedded systems, because they provide means to recreate control flows offline where they can be debugged. In this work, we present the data tracing part of the record/replay mechanism that is specifically targeted to record interrupt behavior. To tune our tracing mechanism, we use the observed principle of return address clustering and a formal model for quantitative reasoning about the tracing mechanism. The presented heuristic and mechanisms show surprisingly good results---up to an 800 percent speedup on the selector function and a 300 percent reduction on duplicates for non-optimal selector functions---considering the leanness of the approach.

[1]  Thomas J. LeBlanc,et al.  A software instruction counter , 1989, ASPLOS III.

[2]  Edward A. Fox,et al.  Practical minimal perfect hash functions for large databases , 1992, CACM.

[3]  Gregory Tassey,et al.  Prepared for what , 2007 .

[4]  William A. Orme Debug and Trace for Multicore SoCs How to build an efficient and effective debug and trace system for complex , multicore SoCs , 2008 .

[5]  Andrew Tanenbaum MODERN OPERATING SYSTEMS, THIRD EDITION , 2009 .

[6]  J. Baginski,et al.  Interaktives Trace- und Debugging- System ALGOL KIEL X 8 , 1974, Fachtagung über Programmiersprachen.

[7]  Donald E. Knuth,et al.  The art of computer programming. Vol.2: Seminumerical algorithms , 1981 .

[8]  Chinya V. Ravishankar,et al.  Monitoring and debugging distributed realtime programs , 1992, Softw. Pract. Exp..

[9]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[10]  Koen De Bosschere,et al.  RecPlay: a fully integrated practical record/replay system , 1999, TOCS.

[11]  Daniel Sundmark,et al.  Pinpointing interrupts in embedded real-time systems using context checksums , 2008, 2008 IEEE International Conference on Emerging Technologies and Factory Automation.

[12]  Henrik Thane,et al.  Monitoring, Testing and Debugging of Distributed Real-Time Systems , 2000 .

[13]  Mahesh Viswanathan,et al.  Java-MaC: A Run-Time Assurance Approach for Java Programs , 2004, Formal Methods Syst. Des..

[14]  Jeffrey J. P. Tsai,et al.  A Noninterference Monitoring and Replay Mechanism for Real-Time Software Testing and Debugging , 1990, IEEE Trans. Software Eng..

[15]  John Kacur Mastering Algorithms with C , 2000 .

[16]  Thomas A. Cargill,et al.  Cheap hardware support for software debugging and profiling , 1987, ASPLOS.

[17]  Antônio Augusto Fröhlich,et al.  Application oriented operating systems , 2001 .

[18]  Joseph Sifakis,et al.  Tools for Verification and Validation , 2005 .

[19]  Linda J. Moore,et al.  Non-intrusive debug technique for embedded programming , 2003, 14th International Symposium on Software Reliability Engineering, 2003. ISSRE 2003..

[20]  Daniel Sundmark,et al.  Replay Debugging of Complex Real-Time Systems: Experiences from Two Industrial Case Studies , 2003, ArXiv.

[21]  Joseph Sifakis,et al.  Embedded Systems Design: The ARTIST Roadmap for Research and Development , 2005, Lecture Notes in Computer Science.

[22]  Koen De Bosschere,et al.  Record/replay for nondeterministic program executions , 2003, CACM.

[23]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[24]  Gerhard Fohler Embedded Systems Design - The ARTIST Roadmap for Research and Development , 2005 .

[25]  Jens Palsberg,et al.  Avrora: scalable sensor network simulation with precise timing , 2005, IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005..

[26]  Larry L. Wear,et al.  Instruction tracing via microprogramming , 1974, MICRO 7.