Lightweight control-flow instrumentation and postmortem analysis in support of debugging

Debugging is difficult and costly. As a programmer looks for a bug, it would be helpful to see a complete trace of events leading to the point of failure. Unfortunately, full tracing is simply too slow to use after deployment, and may even be impractical during testing. We aid post-deployment debugging by giving programmers additional information about program activity shortly before failure. We use latent information in post-failure memory dumps, augmented by low-overhead, tunable run-time tracing. Our results with a realistically-tuned tracing scheme show low enough overhead (0–5 %) to be used in production runs. We demonstrate several potential uses of this enhanced information, including a novel postmortem static slice restriction technique and a reduced view of potentially-executed code. Experimental evaluation shows our approach to be very effective. For example, our analyses shrink stack-sensitive interprocedural static slices by 53–78 % in larger applications.

[1]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984, SDE 1.

[2]  Janusz W. Laski,et al.  Dynamic Program Slicing , 1988, Inf. Process. Lett..

[3]  Janusz W. Laski,et al.  Dynamic slicing of computer programs , 1990, J. Syst. Softw..

[4]  G. A. Venkatesh,et al.  The semantic approach to program slicing , 1991, PLDI '91.

[5]  Eugene H. Spafford,et al.  Dynamic slicing in the presence of unconstrained pointers , 1991, TAV4.

[6]  Peter Fritzson,et al.  Three approaches to interprocedural dynamic slicing , 1993, Microprocess. Microprogramming.

[7]  James R. Larus,et al.  Efficient path profiling , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[8]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[9]  James R. Larus,et al.  Exploiting hardware performance counters with flow and context sensitive profiling , 1997, PLDI '97.

[10]  John Howard,et al.  Hybrid slicing: integrating dynamic information with static analysis , 1997, TSEM.

[11]  Thomas W. Reps,et al.  Interprocedural Path Profiling , 1999, CC.

[12]  Shinji Kusumoto,et al.  Call-mark slicing: an efficient and economical way of reducing slice , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[13]  Susan L. Graham,et al.  Non-Transparent Debugging of Optimized Code , 1999 .

[14]  Rajiv Gupta,et al.  FULLDOC: A Full Reporting Debugger for Optimized Code , 2000, SAS.

[15]  Alessandro Orso,et al.  Monitoring deployed software using software tomography , 2002, PASTE '02.

[16]  Katsuro Inoue,et al.  Dependence-cache slicing: a program slicing method using lightweight dynamic information , 2002, Proceedings 10th International Workshop on Program Comprehension.

[17]  Brent Hailpern,et al.  Software debugging, testing, and verification , 2002, IBM Syst. J..

[18]  Mary Jean Harrold,et al.  Selective path profiling , 2002, PASTE '02.

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

[20]  Alessandro Orso,et al.  Gamma system: continuous evolution of software after deployment , 2002, ISSTA '02.

[21]  Paul Anderson,et al.  Design and Implementation of a Fine-Grained Software Inspection Tool , 2003, IEEE Trans. Software Eng..

[22]  Manu Sridharan,et al.  PSE: explaining program failures via postmortem static analysis , 2004, SIGSOFT '04/FSE-12.

[23]  Jens Krinke Context-sensitivity matters, but context does not , 2004, Source Code Analysis and Manipulation, Fourth IEEE International Workshop on.

[24]  Xiangyu Zhang,et al.  Cost effective dynamic program slicing , 2004, PLDI '04.

[25]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1988, SIGP.

[26]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[27]  Gregg Rothermel,et al.  Supporting Controlled Experimentation with Testing Techniques: An Infrastructure and its Potential Impact , 2005, Empirical Software Engineering.

[28]  Mark Harman,et al.  A formalisation of the relationship between forms of program slicing , 2006, Sci. Comput. Program..

[29]  Michael D. Bond,et al.  Probabilistic calling context , 2007, OOPSLA.

[30]  Alessandro Orso,et al.  A Technique for Enabling and Supporting Debugging of Field Failures , 2007, 29th International Conference on Software Engineering (ICSE'07).

[31]  Mark Harman,et al.  An empirical study of static program slice size , 2007, TSEM.

[32]  Trishul M. Chilimbi,et al.  Preferential path profiling: compactly numbering interesting paths , 2007, POPL '07.

[33]  Ben Liblit,et al.  Effective Slicing : A Generalization of Full and Relevant Slicing ∗ , 2008 .

[34]  Jason Mars,et al.  Scenario Based Optimization: A Framework for Statically Enabling Online Optimizations , 2009, 2009 International Symposium on Code Generation and Optimization.

[35]  George Candea,et al.  Execution synthesis: a technique for automated software debugging , 2010, EuroSys '10.

[36]  Ben Liblit,et al.  Adaptive bug isolation , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[37]  Susan Horwitz,et al.  Better Debugging via Output Tracing and Callstack-Sensitive Slicing , 2010, IEEE Transactions on Software Engineering.

[38]  Ding Yuan,et al.  SherLog: error diagnosis by connecting clues from run-time logs , 2010, ASPLOS XV.

[39]  Xiangyu Zhang,et al.  Analyzing multicore dumps to facilitate concurrency bug reproduction , 2010, ASPLOS XV.

[40]  Ricardo Bianchini,et al.  Striking a new balance between program instrumentation and debugging time , 2011, EuroSys '11.

[41]  Ding Yuan,et al.  Improving Software Diagnosability via Log Enhancement , 2012, TOCS.

[42]  Alessandro Orso,et al.  BugRedux: Reproducing field failures for in-house debugging , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[43]  Xiaoguang Mao,et al.  Effective Statistical Fault Localization Using Program Slices , 2012, 2012 IEEE 36th Annual Computer Software and Applications Conference.

[44]  Xiangyu Zhang,et al.  Precise Calling Context Encoding , 2012, IEEE Trans. Software Eng..

[45]  Andreas Zeller,et al.  Reconstructing Core Dumps , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation.

[46]  Ben Liblit,et al.  Lightweight control-flow instrumentation and postmortem analysis in support of debugging , 2013, ASE.

[47]  Yu Cao,et al.  SymCrash: selective recording for reproducing crashes , 2014, ASE.