Compiler optimizations may lead to loss of debug information, hampering developer productivity and techniques that rely on binary-to-source mappings, such as sampling-based feedback-directed optimization. While recent endeavors exposed debug information correctness and completeness bugs in compiler transformations, understanding where a complex optimizing pipeline ``loses'' debug information is an understudied problem. In this paper, we first rectify accuracy issues in methods for measuring the availability of debug information, and show that the synthetic programs evaluated so far lead to metric values that differ from those we observe for real-world programs. Building on this, we present DebugTuner, a framework for systematically analyzing the impact of individual compiler optimization passes on debug information, and assemble a test suite of programs for collecting more realistic metrics. Using DebugTuner and the test suite, we identify transformations in gcc and clang that cause more debug information loss, and construct modified optimization levels that improve debuggability while retaining competitive performance. We obtain levels that outperform gcc's Og for both debuggability and performance, and make recommendations for constructing an Og level for clang. Finally, we present a case study on AutoFDO where, by disabling selected passes in the profiling stage, the final optimized binary is more performant due to the improved quality of the binary-to-source mapping.

Towards Threading the Needle of Debuggable Optimized Binaries / Assaiante, Cristian; Biasio, Simone Di; Kumar, Snehasish; Di Luna, Giuseppe Antonio; Cono D'Elia, Daniele; Querzoni, Leonardo. - (2026), pp. 711-725. ( CGO Sydney; Australia ) [10.1109/cgo68049.2026.11395216].

Towards Threading the Needle of Debuggable Optimized Binaries

Assaiante, Cristian
;
Di Luna, Giuseppe Antonio;Cono D'Elia, Daniele;Querzoni, Leonardo
2026

Abstract

Compiler optimizations may lead to loss of debug information, hampering developer productivity and techniques that rely on binary-to-source mappings, such as sampling-based feedback-directed optimization. While recent endeavors exposed debug information correctness and completeness bugs in compiler transformations, understanding where a complex optimizing pipeline ``loses'' debug information is an understudied problem. In this paper, we first rectify accuracy issues in methods for measuring the availability of debug information, and show that the synthetic programs evaluated so far lead to metric values that differ from those we observe for real-world programs. Building on this, we present DebugTuner, a framework for systematically analyzing the impact of individual compiler optimization passes on debug information, and assemble a test suite of programs for collecting more realistic metrics. Using DebugTuner and the test suite, we identify transformations in gcc and clang that cause more debug information loss, and construct modified optimization levels that improve debuggability while retaining competitive performance. We obtain levels that outperform gcc's Og for both debuggability and performance, and make recommendations for constructing an Og level for clang. Finally, we present a case study on AutoFDO where, by disabling selected passes in the profiling stage, the final optimized binary is more performant due to the improved quality of the binary-to-source mapping.
2026
CGO
Debugging; Optimizing compilers; Profiling
04 Pubblicazione in atti di convegno::04b Atto di convegno in volume
Towards Threading the Needle of Debuggable Optimized Binaries / Assaiante, Cristian; Biasio, Simone Di; Kumar, Snehasish; Di Luna, Giuseppe Antonio; Cono D'Elia, Daniele; Querzoni, Leonardo. - (2026), pp. 711-725. ( CGO Sydney; Australia ) [10.1109/cgo68049.2026.11395216].
File allegati a questo prodotto
File Dimensione Formato  
Assaiante_Towards_2026.pdf

accesso aperto

Note: DOI: 10.1109/CGO68049.2026.11395216
Tipologia: Versione editoriale (versione pubblicata con il layout dell'editore)
Licenza: Tutti i diritti riservati (All rights reserved)
Dimensione 621.83 kB
Formato Adobe PDF
621.83 kB Adobe PDF
Assaiante_Towards_2026.pdf

accesso aperto

Note: DOI: 10.1109/CGO68049.2026.11395216
Tipologia: Versione editoriale (versione pubblicata con il layout dell'editore)
Licenza: Creative commons
Dimensione 1.34 MB
Formato Adobe PDF
1.34 MB Adobe PDF

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11573/1761308
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact