Abstract
Code coverage is often defined as a measure of the degree to which the source code of a program has been tested [19]. Various metrics for measuring code coverage exist. The vast majority of these metrics require instrumenting the source code to produce coverage data. However, for certain coverage metrics, it is also possible to instrument object code to produce coverage data. Traditionally, such instrumentation has been considered inferior to source level instrumentation because source code is the focus of code coverage. Our experience shows that object code instrumentation, specifically post-link instrumentation, can be very useful to users. Moreover, it does not only alleviate certain side-effects of source-level instrumentation, especially those related to compiler optimizations, but also lends itself to performance optimization that enables low-overhead instrumentation. Our experiments show an average of less than 1% overhead for instrumentation at the function level and an average of 4.1% and 0.4% overhead for SPECint2000 and SPECfp2000, respectively, for instrumentation at the basic block level. This paper demonstrates the advantages of post-link coverage and describes effective methodology and technology for applying it.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Balakrishnan, G., Reps, T., Melski, D., Teitelbaum, T.: Wysinwyx: What you see is not what you execute. In: Verified Software: Theories, Tools, Experiments. Springer, Heidelberg (to appear), http://citeseer.ist.psu.edu/762389.html
Code coverage metrics (accessed June 2007), http://www.bullseye.com/coverage.html
Object coverage. (accessed June 2007), http://www.bullseye.com/coverage.html#other_object
Cohn, R., Goodwin, D., Lowney, P.G.: Optimizing alpha executables on windows nt with spike. In: Digital Technical Journal (1997)
Contest concurrent testing tool (accessed June 2007), http://w3.haifa.ibm.com/softwaretesting/ConTest-Java/index.html
Do-178b software considerations in airborne systems and equipment certification (accessed June 2007), http://en.wikipedia.org/wiki/DO-178B
Focus functional and code coverage visuals and analysis (accessed June 2007) http://w3.haifa.ibm.com/softwaretesting/FoCuS/index.html
G-cover object level coverage analysis (accessed June 2007), http://www.ghs.com/products/safety_critical/gcover.html
Gcov coverage with gnu compiler gcc (accessed June 2007), http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
Grinwald, R., Harel, E., Orgad, M., S. U.S., Ziv, A.: User defined coverage - a tool supported methodology for design verification. In: DAC (June 1998)
Haber, G., Henis, E., Eisenberg, V.: Reliable post-link optimizations based on partial information. In: 3rd Workshop on Feedback Directed and Dynamic Optimizations (December 2000)
Haber, G., Klausner, M., Eisnebreg, V., Mendelson, B., Gurevich, M.: Optimization opportunities created by global data reordering. In: 1st International Symposium on Code Generation and Optimization (March 2003)
Henis, E.A., Haber, G., Klausner, M., Warshavsky, A.: Feedback based post-link optimization for large subsystems. In: 2nd Workshop on Feedback Directed Optimization (November 1999)
Muth, R., Debray, S., Watterson, S.: Alto: A link-time optimizer for the compaq alpha. Technical Report, 98-14, Dept. of Computer Science, The University of Arizona (December 1998)
Nahshon, I., Bernstein, D.: Fdpr - a post-pass object code optimization tool. In: Poster Session of the International Conference on Compiler Construction (April 1996)
Romer, T., Voelker, G., Lee, D., Wolman, A., Wong, W., Levy, H., Bershad, B., Chen, B.: Instrumentation and optimization of win32/intel executables using etch. In: USENIX Windows NT Workshop (August 1997)
Schmidt, W.J., Roediger, R.R., Mestad, C.S., Mendelson, B., Shavitt-Lottem, I., Bortnikov-Sitnitsky, V.: Profile-directed restructuring of operating system code. In: IBM Systems Journal (1998)
Schwarz, B., Debray, S., Andrews, G., Legendre, M.: Plto: A link-time optimizer for the intel ia-32 architecture. In: Workshop on Binary Rewriting (September 2001)
Wikipedia: Code coverage (accessed June 2007), http://en.wikipedia.org/wiki/Code_coverage
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Raz, O. et al. (2008). The Advantages of Post-Link Code Coverage. In: Yorav, K. (eds) Hardware and Software: Verification and Testing. HVC 2007. Lecture Notes in Computer Science, vol 4899. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-77966-7_19
Download citation
DOI: https://doi.org/10.1007/978-3-540-77966-7_19
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-77964-3
Online ISBN: 978-3-540-77966-7
eBook Packages: Computer ScienceComputer Science (R0)