Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/301618.301663acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

A new framework for debugging globally optimized code

Published: 01 May 1999 Publication History

Abstract

With an increasing number of executable binaries generated by optimizing compilers today, providing a clear and correct source-level debugger for programmers to debug optimized code has become a necessity. In this paper, a new framework for debugging globally optimized code is proposed. This framework consists of a new code location mapping scheme, a data location tracking scheme, and an emulation-based forward recovery model. By taking over the control early and emulating instructions selectively, the debugger can preserve and gather the required program state for the recovery of expected variable values at source breakpoints. The framework has been prototyped in the IMPACT compiler and GDB-4.16. Preliminary experiments conducted on several SPEC95 integer programs have yielded encouraging results. The extra time needed for the debugger to calculate the limits of the emulated region and to emulate instructions is hardly noticeable, while the increase in executable file size due to the extra debug information is on average 76% of that of the executable file with no debug information.

References

[1]
P. T. Zellweger, Interactive Source-Level Debugging of Optimized Programs. PhD thesis, Electrical Engineering and Computer Sciences, University of California, Berkeley, CA 94720, 1984.
[2]
P. T. Zellweger, "An interactive high-level debugger for control-flow optimized programs," SIGPLAN Notices, vol. 18, pp. 159-171, August 1983.
[3]
R. Gupta, "Debugging code reorganized by a trace scheduling compiler," Structured Programming, vol. 11, pp. 141- 150, July 1990.
[4]
U. Holzle, C. Chambers, and D. Ungax, "Debugging optimized code with dynamic deoptimization," in Proceedings of the A CM SIGPLAN '92 Conference on Programming Language Design and Implementation, pp. 32-43, June 1992.
[5]
J. Hennessy, "Symbolic debugging of optimized code," A CM Transactions on Programming Languages and Systems, vol. 4, pp. 323-344, July 1982.
[6]
D. Wall, A. Srivastava, and F. Templin, "A note on Hennessy's "Symbolic debugging of optimized code"," A CM Transactions on Programming Languages and Systems, vol. 7, pp. 176-181, January 1985.
[7]
D. Coutant, S. Meloy, and M. Ruscetta, "DOC: A practical approach to source-level debugging of globally optimized code," in Proceedings of the ACM SIGPLAN '88 Conference on Programming Language Design and Implementation, pp. 125-134, June 1988.
[8]
M. Copperman, Debugging Optimized Code Without Being Misled. PhD thesis, Computer and Information Sciences, University of California, Santa Cruz, CA 95064, 1993.
[9]
M. Copperman, "Debugging optimized code without being misled," A CM Transactions on Programming Languages and Systems, vol. 16, pp. 387-427, May 1994.
[10]
R. Wismuller, "Debugging of globally optimized programs using data flow analysis," in Proceedings of the A CM SIG- PLAN '9~ Con/erence on Programming Language Design and Implementation, pp. 278-289, June 1994.
[11]
A. Adl-Tabatabai and T. Gross, "Evicted variables and the interaction of global register allocation and symbolic debugging,'' in Conference Record of the 20th Annual A CM Symposium on Principles of Programming Languages, pp. 371- 383, January 1993.
[12]
A. Adl-Tabatabai and T. Gross, "Detection and recovery of endangered variables caused by instruction scheduling," in Proceedings of the A CM SIGPLAN '93 Conference on Programming Language Design and Implementation, pp. 13- 25, June 1993.
[13]
A. Adl-Tabatabai and T. Gross, "Source-level debugging of scalar optimized code," in Proceedings of the A CM SiG- PLAN '96 Conference on Programming Language Design and Implementation, pp. 33-43, May 1996.
[14]
A. Adl-Tabatabai, Source-Level Debugging of Globally Optimized Code. PhD thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA 15213, 1996.
[15]
L.-C. Wu and W. W. Hwu, "A new data-location tracking scheme for the recovery of expected variable values," Tech. Rep.IMPACT-98-07 ( ftp: / / ftp. crhc. uiuc.edu / pub/IMPACT / report / im pact- 98- 07.dataloc.ps), IMPACT, University of Illinois, Urbana, IL, September 1998.
[16]
A. Aho, R. Sethi, and J. Ullman, Compilers: Principles, Techniques, and Tools. Reading, MA: Addison-Wesley, 1986.
[17]
P. P. Chang, S. A. Mahlke, W. Y. Chen, N. J. Warter, and W. W. Hwu, "IMPACT: An architectural framework for multiple-instruction-issue processors," in Proceedings o! the 18th International Symposium on Computer Architecture, pp. 266-275, May 1991.
[18]
C. Tice and S. L. Graham, "OPTVIEW: A new approach for examining optimized code," in Proceedings of the 1998 Workshop on Program Analysis for Software Tools and Engineering, June 1998.

Cited By

View all
  • (2023)Where Did My Variable Go? Poking Holes in Incomplete Debug InformationProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3575693.3575720(935-947)Online publication date: 27-Jan-2023
  • (2018)On-stack replacement, distilledACM SIGPLAN Notices10.1145/3296979.319239653:4(166-180)Online publication date: 11-Jun-2018
  • (2018)On-stack replacement, distilledProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3192366.3192396(166-180)Online publication date: 11-Jun-2018
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '99: Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation
May 1999
304 pages
ISBN:1581130945
DOI:10.1145/301618
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 May 1999

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

PLDI99

Acceptance Rates

PLDI '99 Paper Acceptance Rate 26 of 130 submissions, 20%;
Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)98
  • Downloads (Last 6 weeks)21
Reflects downloads up to 25 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Where Did My Variable Go? Poking Holes in Incomplete Debug InformationProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3575693.3575720(935-947)Online publication date: 27-Jan-2023
  • (2018)On-stack replacement, distilledACM SIGPLAN Notices10.1145/3296979.319239653:4(166-180)Online publication date: 11-Jun-2018
  • (2018)On-stack replacement, distilledProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3192366.3192396(166-180)Online publication date: 11-Jun-2018
  • (2009)Transparent Debugging of Dynamically Optimized CodeProceedings of the 7th annual IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO.2009.28(275-286)Online publication date: 22-Mar-2009
  • (2007)Non-transparent debugging for software-pipelined loopsProceedings of the 2007 international conference on Compilers, architecture, and synthesis for embedded systems10.1145/1289881.1289887(23-32)Online publication date: 30-Sep-2007
  • (2003)Issues in debugging highly parallel FPGA-based applications derived from source codeProceedings of the 2003 Asia and South Pacific Design Automation Conference10.1145/1119772.1119871(483-488)Online publication date: 21-Jan-2003
  • (2003)Issues in debugging highly parallel FPGA-based applications derived from source codeProceedings of the ASP-DAC Asia and South Pacific Design Automation Conference, 2003.10.1109/ASPDAC.2003.1195064(483-488)Online publication date: 2003
  • (2002)Debugging and Testing Optimizers through Comparison CheckingElectronic Notes in Theoretical Computer Science10.1016/S1571-0661(04)80398-065:2(83-99)Online publication date: Apr-2002
  • (2001)Code reordering and speculation support for dynamic optimization systemsProceedings 2001 International Conference on Parallel Architectures and Compilation Techniques10.1109/PACT.2001.953297(163-174)Online publication date: 2001
  • (2000)FULLDOC: A Full Reporting Debugger for Optimized CodeStatic Analysis10.1007/978-3-540-45099-3_13(240-259)Online publication date: 2000
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media