Tracing and recording 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-with higher fingerprint widths 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. Using an equal portion for the fingerprint and for the return address lead to the best results in our experiments.

[1]  Luk Levrouw,et al.  Interrupt replay: a debugging method for parallel programs with interrupts , 1994, Microprocess. Microsystems.

[2]  Daniel Sundmark,et al.  Pinpointing Interrupts in Embedded Real-Time Systems Using Hashed Execution Contexts , 2009, IEEE Transactions on Industrial Informatics.

[3]  Yuanyuan Zhou,et al.  PRES: probabilistic replay with execution sketching on multiprocessors , 2009, SOSP '09.

[4]  Tony Givargis,et al.  FlashBox: a system for logging non-deterministic events in deployed embedded systems , 2009, SAC '09.

[5]  Kalyanmoy Deb,et al.  Multi-objective optimization using evolutionary algorithms , 2001, Wiley-Interscience series in systems and optimization.

[6]  Mark Harman,et al.  A multiple hill climbing approach to software module clustering , 2003, International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings..

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

[8]  Minsoo Ryu,et al.  RT-replayer: a record-replay architecture for embedded real-time software debugging , 2009, SAC '09.

[9]  Kyle London Mastering algorithms with C , 1999 .

[10]  Thomas J. LeBlanc,et al.  Debugging Parallel Programs with Instant Replay , 1987, IEEE Transactions on Computers.

[11]  Nicholas Nethercote,et al.  Valgrind: a framework for heavyweight dynamic binary instrumentation , 2007, PLDI '07.

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

[13]  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..

[14]  Sebastian Fischmeister,et al.  Time-Aware Instrumentation of Embedded Software , 2010, IEEE Transactions on Industrial Informatics.

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

[16]  Ion Stoica,et al.  ODR: output-deterministic replay for multicore debugging , 2009, SOSP '09.

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

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

[19]  A. Gambier,et al.  Real-time control systems: a tutorial , 2004, 2004 5th Asian Control Conference (IEEE Cat. No.04EX904).

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

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

[22]  Donald E. Knuth,et al.  An empirical study of FORTRAN programs , 1971, Softw. Pract. Exp..

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

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

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

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

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

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

[29]  Satish Narayanasamy,et al.  Respec: Efficient Online Multiprocessor Replay via Speculation and External Determinism , 2010, ASPLOS 2010.