🤖 AI Summary
This work addresses the challenge of runtime code coverage analysis in AAA-grade C++ game engines, where traditional whole-program instrumentation incurs prohibitive performance overhead and compromises test stability. To overcome these limitations, the authors propose a developer-submission-oriented selective instrumentation approach that leverages a lightweight, incremental coverage collection mechanism. Integrated with a customized compiler toolchain and an industrial-scale testing pipeline, this method substantially reduces both compilation and runtime overhead. Evaluated across more than 2,000 code submissions, it maintains minimal compilation cost, sustains frame rates above 50% of baseline even in worst-case scenarios, and introduces no failures in automated tests—demonstrating, for the first time, a practical and scalable solution for real-time coverage analysis in large-scale game engines.
📝 Abstract
Code coverage is a valuable guide for testing, but in AAA games the overhead of instrumentation conflicts with strict performance requirements and can destabilize automated tests. We propose and assess a selective instrumentation approach tailored to large game engines written in \texttt{C++}, which reduces the scope of instrumentation while preserving relevant coverage data to developer commits. Our framework integrates into an industrial game testing pipeline, enabling developers to receive immediate coverage feedback on tests run against their changes. The compilation overhead of our approach is minimal, allowing instrumentation of over 2,000 commits before doubling build time. In performance evaluations, even the worst-case scenario maintains frame rates above 50\% of the non-instrumented baseline. Across two production test suites maintained by our industry partner, our framework caused no automated test failures, avoiding the instability observed under full instrumentation. Our work shows that commit-level or build-level coverage of large \texttt{C++} game engines can be achieved with minimal overhead and without compromising test stability.