Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3642921.3642924acmotherconferencesArticle/Chapter ViewAbstractPublication PagesrapidoConference Proceedingsconference-collections
research-article

NQC²: A Non-Intrusive QEMU Code Coverage Plugin

Published: 06 March 2024 Publication History

Abstract

Code coverage analysis has become a standard approach in software development, facilitating the assessment of test suite effectiveness, the identification of under-tested code segments, and the discovery of performance bottlenecks. When code coverage of software for embedded systems needs to be measured, conventional approaches quickly meet their limits. A commonly used approach involves instrumenting the source files with added code that collects and dumps coverage information during runtime. This inserted code usually relies on the existence of an operating and a file system to dump the collected data. These features are not available for bare-metal programs that are executed on embedded systems.
To overcome this issue, we present NQC², a plugin for QEMU. NQC² extracts coverage information from QEMU during runtime and stores them into a file on the host machine. This approach is even compatible with modified QEMU versions and does not require target-software instrumentation. NQC² outperforms a comparable approach from Xilinx by up to 8.5 x.

References

[1]
Fabrice Bellard. 2005. QEMU, a fast and portable dynamic translator. In USENIX annual technical conference, FREENIX Track, Vol. 41. Califor-nia, USA, 10–5555.
[2]
M. Ammar Ben Khadra, Dominik Stoffel, and Wolfgang Kunz. 2020. Efficient binary-level coverage analysis. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering(ESEC/FSE 2020). https://doi.org/10.1145/3368089.3409694
[3]
Holger Blasum, Frank Görgen, and Jürgen Urban. 2007. Gcov on an embedded system. (2007).
[4]
Nils Bosbach, Lukas Jünger, Rebecca Pelke, Niko Zurstraßen, and Rainer Leupers. 2023. Entropy-Based Analysis of Benchmarks for Instruction Set Simulators. In Proceedings of the DroneSE and RAPIDO: System Engineering for constrained embedded systems(RAPIDO ’23). https://doi.org/10.1145/3579170.3579267
[5]
Emilio G. Cota and Luca P. Carloni. 2019. Cross-ISA machine instrumentation using fast and scalable dynamic binary translation. In Proceedings of the 15th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments.
[6]
Free Software Foundation, Inc.2023. Gcov (Using the GNU Compiler Collection (GCC)). https://gcc.gnu.org/onlinedocs/gcc/Gcov.html
[7]
Shay Gal-On and Markus Levy. 2012. Exploring coremark a benchmark maximizing simplicity and efficacy. The Embedded Microprocessor Benchmark Consortium (2012).
[8]
Edgar E. Iglesias. 2023. edgarigl/qemu-etrace. https://github.com/edgarigl/qemu-etrace original-date: 2016-02-15T09:42:55Z.
[9]
Marko Ivanković, Goran Petrović, René Just, and Gordon Fraser. 2019. Code coverage at Google. In Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering(ESEC/FSE 2019). https://doi.org/10.1145/3338906.3340459
[10]
Linux Test Project. 2023. LTP GCOV extension (LCOV). https://github.com/linux-test-project/lcov original-date: 2014-05-27T14:38:58Z.
[11]
LLVM Project. 2023. llvm-cov - emit coverage information — LLVM 18.0.0git documentation. https://llvm.org/docs/CommandGuide/llvm-cov.html
[12]
John D. McCalpin. 1995. Memory Bandwidth and Machine Balance in Current High Performance Computers. IEEE Computer Society Technical Committee on Computer Architecture (TCCA) Newsletter (Dec. 1995), 19–25.
[13]
Joan C. Miller and Clifford J. Maloney. 1963. Systematic mistake analysis of digital computer programs. Commun. ACM 6, 2 (Feb. 1963).
[14]
Stefan Nagy and Matthew Hicks. 2019. Full-Speed Fuzzing: Reducing Fuzzing Overhead through Coverage-Guided Tracing. In 2019 IEEE Symposium on Security and Privacy (SP). 787–802. https://doi.org/10.1109/SP.2019.00069 ISSN: 2375-1207.
[15]
NASA Jet Propulsion Laboratory. 2023. nasa-jpl/embedded-gcov. https://github.com/nasa-jpl/embedded-gcov original-date: 2022-02-02T19:25:26Z.
[16]
P. Piwowarski, M. Ohba, and J. Caruso. 1993. Coverage measurement experience during function test. In Proceedings of 1993 15th International Conference on Software Engineering. 287–301. https://doi.org/10.1109/ICSE.1993.346035
[17]
QEMU. 2023. QEMU. https://github.com/qemu/qemu
[18]
QEMU. 2023. QEMU TCG Plugins — QEMU documentation. https://www.qemu.org/docs/master/devel/tcg-plugins.html#api
[19]
Reinhold P. Weicker. 1984. Dhrystone: a synthetic systems programming benchmark. Commun. ACM 27, 10 (Oct. 1984). https://doi.org/10.1145/358274.358283
[20]
Brian A Wichmann. 1970. Some statistics from ALGOL programs. Central Computer Unit, National Physical Laboratory.
[21]
Xilinx. 2023. Xilinx’s fork of QEMU. https://github.com/Xilinx/qemu

Cited By

View all
  • (2024)Enhancing HW-SW Confidentiality Verification for Embedded Processors with SoftFlow’s Advanced Memory Range FeatureVLSI-SoC 2023: Innovations for Trustworthy Artificial Intelligence10.1007/978-3-031-70947-0_13(251-272)Online publication date: 29-Dec-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
RAPIDO '24: Proceedings of the 16th Workshop on Rapid Simulation and Performance Evaluation for Design
January 2024
54 pages
ISBN:9798400717918
DOI:10.1145/3642921
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 the author(s) 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].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 06 March 2024

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code Coverage
  2. Performance Optimization
  3. QEMU
  4. TCG Plugin

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

RAPIDO '24

Acceptance Rates

Overall Acceptance Rate 14 of 28 submissions, 50%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)37
  • Downloads (Last 6 weeks)8
Reflects downloads up to 01 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Enhancing HW-SW Confidentiality Verification for Embedded Processors with SoftFlow’s Advanced Memory Range FeatureVLSI-SoC 2023: Innovations for Trustworthy Artificial Intelligence10.1007/978-3-031-70947-0_13(251-272)Online publication date: 29-Dec-2024

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media