DEBUGGING OPTIMIZED CODE WITHOUT BEING MISLED

被引:15
|
作者
COPPERMAN, M
机构
[1] Univ. of California, Santa Cruz
关键词
PERFORMANCE; VERIFICATION;
D O I
10.1145/177492.177517
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Correct optimization can change the behavior of an incorrect program; therefore at times it is necessary to debug optimized code. However, optimizing compilers produce code that impedes source-level debugging. Optimization can cause an inconsistency between where the user expects a breakpoint to be located and the breakpoint's actual location. This article describes a mapping between statements and breakpoint locations that ameliorates this problem. The mapping enables debugger behavior on optimized code that approximates debugger behavior on unoptimized code sufficiently closely for the user to use traditional debugging strategies. Optimization can also cause the value of a variable to be noncurrent-to differ from the value that would be predicted by a close reading of the source code. This article presents a method of determining when this has occurred, and shows how a debugger can describe the relevant effects of optimization. The determination method is more general than previously published methods; it handles global optimization and many flow graph transformations, and it is not tightly coupled to optimizations performed by a particular compiler. Necessary compiler support is also described.
引用
收藏
页码:387 / 427
页数:41
相关论文
共 50 条
  • [1] SYMBOLIC DEBUGGING OF OPTIMIZED CODE
    HENNESSY, J
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1982, 4 (03): : 323 - 344
  • [2] DEBUGGING OPTIMIZED CODE WITH DYNAMIC DEOPTIMIZATION
    HOLZLE, U
    CHAMBERS, C
    UNGAR, D
    SIGPLAN NOTICES, 1992, 27 (07): : 32 - 43
  • [3] A NEW APPROACH TO DEBUGGING OPTIMIZED CODE
    BROOKS, G
    HANSEN, GJ
    SIMMONS, S
    SIGPLAN NOTICES, 1992, 27 (07): : 1 - 11
  • [4] Transparent Debugging of Dynamically Optimized Code
    Kumar, Naveen
    Childers, Bruce R.
    Soffa, Mary Lou
    CGO 2009: INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, PROCEEDINGS, 2009, : 275 - +
  • [5] SYMBOLIC DEBUGGING OF OPTIMIZED CODE - NOTE
    WALL, D
    SRIVASTAVA, A
    TEMPLIN, F
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1985, 7 (01): : 176 - 181
  • [6] A new framework for debugging globally optimized code
    Wu, LC
    Mirani, R
    Patil, H
    Olsen, B
    Hwu, WMW
    ACM SIGPLAN NOTICES, 1999, 34 (05) : 181 - 191
  • [7] SYMBOLIC DEBUGGING OF OPTIMIZED CODE - A FURTHER NOTE
    COPPERMAN, M
    MCDOWELL, CE
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1993, 15 (02): : 357 - 365
  • [8] Comparison checking: An approach to avoid debugging of optimized code
    Jaramillo, C
    Gupta, R
    Soffa, ML
    SOFTWARE ENGINEERING - ESEC/FSE '99, PROCEEDINGS, 1999, 1687 : 268 - 284
  • [10] Source-level debugging of scalar optimized code
    AdlTabatabai, AR
    Gross, T
    ACM SIGPLAN NOTICES, 1996, 31 (05) : 33 - 43