cHash: Detection of Redundant Compilations via AST Hashing

Publikation: Beitrag in Buch/Bericht/Sammelwerk/KonferenzbandAufsatz in KonferenzbandForschungPeer-Review

Autorschaft

  • Christian Dietrich
  • Valentin Rothberg
  • Ludwig Füracker
  • Andreas Ziegler
  • Daniel Lohmann

Externe Organisationen

  • Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU Erlangen-Nürnberg)
Forschungs-netzwerk anzeigen

Details

OriginalspracheEnglisch
Titel des SammelwerksProceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017
Seiten527-538
Seitenumfang12
ISBN (elektronisch)9781931971386
PublikationsstatusVeröffentlicht - 1 Jan. 2019
Veranstaltung2017 USENIX Annual Technical Conference, USENIX ATC 2017 - Santa Clara, USA / Vereinigte Staaten
Dauer: 12 Juli 201714 Juli 2017

Abstract

Software projects that use a compiled language are built hundreds of thousands of times during their lifespan. Hence, the compiler is invoked over and over again on an incrementally changing source base. As previous work has shown, up to 97 percent of these invocations are redundant and do not lead to an altered compilation result. In order to avoid such redundant builds, many developers use caching tools that are based on textual hashing of the source files. However, these tools fail in the presence of modifications that leave the compilation result unchanged. Especially for C projects, where module-interface definitions are imported textually with the C preprocessor, modifications to header files lead to many redundant compilations. In this paper, we present the cHash approach and compiler extension to quickly detect modifications on the language level that will not lead to a changed compilation result. By calculating a hash over the abstract syntax tree, we achieve a high precision at comparatively low costs. While cHash is light-weight and build system agnostic, it can cancel 80 percent of all compiler invocations early and reduce the build-time of incremental builds by up to 51 percent. In comparison to the state-of-the-art CCache tool, cHash is at least 30 percent more precise in detecting redundant compilations.

ASJC Scopus Sachgebiete

Zitieren

cHash: Detection of Redundant Compilations via AST Hashing. / Dietrich, Christian; Rothberg, Valentin; Füracker, Ludwig et al.
Proceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017. 2019. S. 527-538.

Publikation: Beitrag in Buch/Bericht/Sammelwerk/KonferenzbandAufsatz in KonferenzbandForschungPeer-Review

Dietrich, C, Rothberg, V, Füracker, L, Ziegler, A & Lohmann, D 2019, cHash: Detection of Redundant Compilations via AST Hashing. in Proceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017. S. 527-538, 2017 USENIX Annual Technical Conference, USENIX ATC 2017, Santa Clara, USA / Vereinigte Staaten, 12 Juli 2017. <https://www.usenix.org/system/files/conference/atc17/atc17-dietrich.pdf>
Dietrich, C., Rothberg, V., Füracker, L., Ziegler, A., & Lohmann, D. (2019). cHash: Detection of Redundant Compilations via AST Hashing. In Proceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017 (S. 527-538) https://www.usenix.org/system/files/conference/atc17/atc17-dietrich.pdf
Dietrich C, Rothberg V, Füracker L, Ziegler A, Lohmann D. cHash: Detection of Redundant Compilations via AST Hashing. in Proceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017. 2019. S. 527-538
Dietrich, Christian ; Rothberg, Valentin ; Füracker, Ludwig et al. / cHash : Detection of Redundant Compilations via AST Hashing. Proceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017. 2019. S. 527-538
Download
@inproceedings{7c458204df014ebf8135df8ada9cb792,
title = "cHash: Detection of Redundant Compilations via AST Hashing",
abstract = "Software projects that use a compiled language are built hundreds of thousands of times during their lifespan. Hence, the compiler is invoked over and over again on an incrementally changing source base. As previous work has shown, up to 97 percent of these invocations are redundant and do not lead to an altered compilation result. In order to avoid such redundant builds, many developers use caching tools that are based on textual hashing of the source files. However, these tools fail in the presence of modifications that leave the compilation result unchanged. Especially for C projects, where module-interface definitions are imported textually with the C preprocessor, modifications to header files lead to many redundant compilations. In this paper, we present the cHash approach and compiler extension to quickly detect modifications on the language level that will not lead to a changed compilation result. By calculating a hash over the abstract syntax tree, we achieve a high precision at comparatively low costs. While cHash is light-weight and build system agnostic, it can cancel 80 percent of all compiler invocations early and reduce the build-time of incremental builds by up to 51 percent. In comparison to the state-of-the-art CCache tool, cHash is at least 30 percent more precise in detecting redundant compilations.",
author = "Christian Dietrich and Valentin Rothberg and Ludwig F{\"u}racker and Andreas Ziegler and Daniel Lohmann",
note = "Funding information: The authors thank the anonymous reviewers and our shepherd Theodore Ts{\textquoteright}o for their feedback. This work has been supported by the German Research Foundation (DFG) under the grants no. LO 1719/3-1 and SFB/Tran-sregio 89 “Invasive Computing” (Project C1).; 2017 USENIX Annual Technical Conference, USENIX ATC 2017 ; Conference date: 12-07-2017 Through 14-07-2017",
year = "2019",
month = jan,
day = "1",
language = "English",
pages = "527--538",
booktitle = "Proceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017",

}

Download

TY - GEN

T1 - cHash

T2 - 2017 USENIX Annual Technical Conference, USENIX ATC 2017

AU - Dietrich, Christian

AU - Rothberg, Valentin

AU - Füracker, Ludwig

AU - Ziegler, Andreas

AU - Lohmann, Daniel

N1 - Funding information: The authors thank the anonymous reviewers and our shepherd Theodore Ts’o for their feedback. This work has been supported by the German Research Foundation (DFG) under the grants no. LO 1719/3-1 and SFB/Tran-sregio 89 “Invasive Computing” (Project C1).

PY - 2019/1/1

Y1 - 2019/1/1

N2 - Software projects that use a compiled language are built hundreds of thousands of times during their lifespan. Hence, the compiler is invoked over and over again on an incrementally changing source base. As previous work has shown, up to 97 percent of these invocations are redundant and do not lead to an altered compilation result. In order to avoid such redundant builds, many developers use caching tools that are based on textual hashing of the source files. However, these tools fail in the presence of modifications that leave the compilation result unchanged. Especially for C projects, where module-interface definitions are imported textually with the C preprocessor, modifications to header files lead to many redundant compilations. In this paper, we present the cHash approach and compiler extension to quickly detect modifications on the language level that will not lead to a changed compilation result. By calculating a hash over the abstract syntax tree, we achieve a high precision at comparatively low costs. While cHash is light-weight and build system agnostic, it can cancel 80 percent of all compiler invocations early and reduce the build-time of incremental builds by up to 51 percent. In comparison to the state-of-the-art CCache tool, cHash is at least 30 percent more precise in detecting redundant compilations.

AB - Software projects that use a compiled language are built hundreds of thousands of times during their lifespan. Hence, the compiler is invoked over and over again on an incrementally changing source base. As previous work has shown, up to 97 percent of these invocations are redundant and do not lead to an altered compilation result. In order to avoid such redundant builds, many developers use caching tools that are based on textual hashing of the source files. However, these tools fail in the presence of modifications that leave the compilation result unchanged. Especially for C projects, where module-interface definitions are imported textually with the C preprocessor, modifications to header files lead to many redundant compilations. In this paper, we present the cHash approach and compiler extension to quickly detect modifications on the language level that will not lead to a changed compilation result. By calculating a hash over the abstract syntax tree, we achieve a high precision at comparatively low costs. While cHash is light-weight and build system agnostic, it can cancel 80 percent of all compiler invocations early and reduce the build-time of incremental builds by up to 51 percent. In comparison to the state-of-the-art CCache tool, cHash is at least 30 percent more precise in detecting redundant compilations.

UR - http://www.scopus.com/inward/record.url?scp=85074838883&partnerID=8YFLogxK

M3 - Conference contribution

AN - SCOPUS:85074838883

SP - 527

EP - 538

BT - Proceedings of the 2017 USENIX Annual Technical Conference, USENIX ATC 2017

Y2 - 12 July 2017 through 14 July 2017

ER -