skip to main content
10.1145/1085130.1085151acmconferencesArticle/Chapter ViewAbstractPublication PagesaadebugConference Proceedingsconference-collections
Article

Code coverage testing using hardware performance monitoring support

Published:19 September 2005Publication History

ABSTRACT

Code coverage analysis, the process of finding code exercised by a particular set of test inputs, is an important component of software development and verification. Most traditional methods of implementing code coverage analysis tools are based on program instrumentation. These methods typically incur high overhead due to the insertion and execution of instrumentation code, and are not deployable in many software environments. Hardware-based sampling techniques attempt to lower overhead by leveraging existing Hardware Performance Monitoring (HPM) support for program counter (PC) sampling. While PC-sampling incurs lower levels of overhead, it does not provide complete coverage information. This paper extends the HPM approach in two ways. First, it utilizes the sampling of branch vectors which are supported on modern processors. Second, compiler analysis is performed on branch vectors to extend the amount of code coverage information derived from each sample. This paper shows that although HPM is generally used to guide performance improvement efforts, there is substantial promise in leveraging the HPM information for code debugging and verification. The combination of sampled branch vectors and compiler analysis can be used to attain upwards of 80% of the actual code coverage.

References

  1. A. Aho, R. Sethi, and J. Ullman. Compilers: Principles, Techniques and Tools. A-W Press, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. F. Allen. Control ow analysis. In Proceedings of Compiler Optimization, pages 1--19, 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Anderson and et al. Continuous profiling: Where have all the cycles gone? In Proc. of the 16th ACM Symposium of Operating Systems Principles, pages 1--14, October 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bullseye Testing Technology. http://www.bullseye.com/.Google ScholarGoogle Scholar
  5. S. Eranian. The perfmon2 interface specification. Technical Report HPL-2004-200R1, Hewlett-Packard Laboratory, February 2005.Google ScholarGoogle Scholar
  6. C. L. et al. Pin: Building customized program analysis tools with dynamic instrumentation. In ACM SIGPLAN Conference on Programming Language Design and Implementation, Chicago, IL, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Hewlett-Packard Development Company. perfmon project http://www.hpl.hp.com/research/linux/perfmon/.Google ScholarGoogle Scholar
  8. IBM. PowerPC 740/PowerPC 750 RISC Microprocessor User's Manual, 1999.Google ScholarGoogle Scholar
  9. IBM PureCoverage. http://www.pts.com/wp2077.cfm.Google ScholarGoogle Scholar
  10. Intel Corporation. Intel Itanium 2 processor reference manual: For software development and optimization. May 2004.Google ScholarGoogle Scholar
  11. M. Kearns and et al. On the learnability of discrete distributions. In STOC '94: Proceedings of the twenty-sixth annual ACM symposium on Theory of computing, pages 273--282. ACM Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Y. W. Kim. Efficient use of code coverage in large-scale software development. In CASCON '03: Proceedings of the 2003 conference of the Centre for Advanced Studies on Collaborative research, pages 145--155. IBM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. OpenIMPACT Compiler. http://www.gelato.uiuc.edu/.Google ScholarGoogle Scholar
  14. OProfile System Profiler for Linux. http://oprofile.sourceforge.net.Google ScholarGoogle Scholar
  15. A. Orso, N. Shi, and M. J. Harrold. Scaling regression testing to large software systems. In Proceedings of the 12th Symposium on Foundations of Software Engineering, pages 241--251. ACM Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Sprunt. Pentium 4 performance-monitoring features. In IEEE Micro 22(4), pages 72--82, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. M. Tikir and J. K. Hollingsworth. Efficient instrumentation for code coverage testing. In Proceedings of the Symposium on Software Testing and Analysis, July 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. H. Zhu, P. A. V. Hall, and J. H. R. May. Software unit test coverage and adequacy. ACM Computing Survey, 29(4):366--427, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Code coverage testing using hardware performance monitoring support

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      AADEBUG'05: Proceedings of the sixth international symposium on Automated analysis-driven debugging
      September 2005
      172 pages
      ISBN:1595930507
      DOI:10.1145/1085130

      Copyright © 2005 ACM

      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 ACM 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: 19 September 2005

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader