FULLDOC: A Full Reporting Debugger for Optimized Code
As compilers increasingly rely on optimizations to achieve high performance, the effectiveness of source level debuggers for optimized code continues to falter. Even if values of source variables are computed in the execution of the optimized code, source level debuggers of optimized code are unable to always report the expected values of source variables at breakpoints.
In this paper, we present FULLDOC, a debugger that can report all of the expected values of source variables that are computed in the optimized code. FULLDOC uses statically computed information to guide the gathering of dynamic information that enables full reporting. FULLDOC can report expected values at breakpoints when reportability is affected because values have been overwritten early, due to code hoisting or register reuse, or written late, due to code sinking. Our debugger can also report values that are path sensitive in that a value may be computed only along one path or the location of the value may be different along different paths. We implemented FULLDOC for C programs, and experimentally evaluated the effectiveness of reporting expected values. Our experimental results indicate that FULLDOC can report 31% more values than are reportable using only statically computed information. We also show improvements of at least 26% over existing schemes that use limited dynamic information.
KeywordsLoop Iteration Optimize Code Execution Path Source Program Program Point
Unable to display preview. Download preview PDF.
- 1.Adl-Tabatabai, A., Gross, T.: Source-Level Debugging of Scalar Optimized Code. In: Proceedings ACM SIGPLAN 1996 Conf. on Programming Languages Design and Implementation, May 1996, pp. 33–43 (1996)Google Scholar
- 2.Brooks, G., Hansen, G.J., Simmons, S.: A New Approach to Debugging Optimized Code. In: Proceedings ACM SIGPLAN 1992 Conf. on Programming Languages Design and Implementation, June 1992, pp. 1–11 (1992)Google Scholar
- 4.Coutant, D.S., Meloy, S., Ruscetta, M.: DOC: A Practical Approach to Source-Level Debugging of Globally Optimized Code. In: Proceedings ACM SIGPLAN 1988 Conf. on Programming Languages Design and Implementation, June 1988, pp. 125–134 (1988)Google Scholar
- 6.Fraser, C., Hanson, D.: A Retargetable C Compiler: Design and Implementation. Benjamin/Cummings, Redwood city (1995)Google Scholar
- 7.Gupta, R.: Debugging Code Reorganized by a Trace Scheduling Compiler. Structured Programming 11(3), 141–150 (1990)Google Scholar
- 9.Holzle, U., Chambers, C., Ungar, D.: Debugging Optimized Code with Dynamic Deoptimization. In: Proceedings ACM SIGPLAN 1992 Conf. on Programming Languages Design and Implementation, pp. 32–43 (June 1992)Google Scholar
- 10.Jaramillo, C., Gupta, R., Soffa, M.L.: Comparison Checking: An Approach to Avoid Debugging of Optimized Code. In: ACM SIGSOFT Symposium on Foundations of Software Engineering and European Software Engineering Conference, September 1999, pp. 268–284 (1999)Google Scholar
- 11.Kessler, P.: Fast Breakpoints: Design and Implementation. In: Proceedings ACM SIGPLAN 1990 Conf. on Programming Languages Design and Implementation, June 1990, pp. 78–84 (1990)Google Scholar
- 12.Pineo, P.P., Soffa, M.L.: Debugging Parallelized Code using Code Liberation Techniques. In: Proceedings of ACM/ONR SIGPLAN Workshop on Parallel and Distributed Debugging, vol. 26(4), pp. 103–114 (May 1991)Google Scholar
- 13.Pollock, L.L., Soffa, M.L.: High-Level Debugging with the Aid of an Incremental Optimizer. In: 21st Annual Hawaii International Conference on System Sciences, vol. 2, pp. 524–531 (January 1988)Google Scholar
- 14.Tice, C.: Non-Transparent Debugging of Optimized Code. PhD dissertation, University of California, Berkeley, Technical Report UCB-CSD-99-1077 (1999)Google Scholar
- 15.Wismueller, R.: Debugging of Globally Optimized Programs Using Data Flow Analysis. In: Proceedings ACM SIGPLAN 1994 Conf. on Programming Languages Design and Implementation, pp. 278–289 (June 1994)Google Scholar
- 16.Wu, L., Mirani, R., Patil, H., Olsen, B., Hwu, W.W.: A New Framework for Debugging Globally Optimized Code. In: Proceedings ACM SIGPLAN 1999 Conf. on Programming Languages Design and Implementation, pp. 181–191 (May 1999)Google Scholar
- 17.Zellweger, P.T.: An Interactive High-Level Debugger for Control-Flow Optimized Programs. In: Proceedings ACM SIGSOFT/SIGPLAN Software Engineering Symposium on High-Level Debugging, pp. 159–171 (1983)Google Scholar