skip to main content
10.1145/1815695.1815724acmotherconferencesArticle/Chapter ViewAbstractPublication PagessystorConference Proceedingsconference-collections
research-article

Generating low-overhead dynamic binary translators

Published:24 May 2010Publication History

ABSTRACT

Dynamic (on the fly) binary translation is an important part of many software systems. In this paper we discuss how to combine efficient translation with the generation of efficient code, while providing a high-level table-driven user interface that simplifies the generation of the binary translator (BT).

The translation actions of the BT are specified in high-level abstractions that are compiled into translation tables; these tables control the runtime program translation. This table generator allows a compact description of changes in the translated code.

We use fastBT, a table-based dynamic binary translator that uses a code cache and various optimizations for indirect control transfers to illustrate the design tradeoffs in binary translators. We present an analysis of the most challenging sources of overhead and describe optimizations to further reduce these penalties. Keys to the good performance are a configurable inlining mechanism and adaptive self-modifying optimizations for indirect control transfers.

References

  1. Bala, V., Duesterwald, E., and Banerjia, S. Dynamo: a transparent dynamic optimization system. In PLDI '00 (Vancouver, BC, Canada, 2000), pp. 1--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Barham, P., Dragovic, B., Fraser, K., Hand, S., Harris, T., Ho, A., Neugebauer, R., Pratt, I., and Warfield, A. Xen and the art of virtualization. In SOSP '03 (New York, NY, USA, 2003), pp. 164--177. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Bellard, F. QEMU, a fast and portable dynamic translator. In ATEC '05 (Berkeley, CA, USA, 2005), pp. 41--41. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bruening, D., and Amarasinghe, S. Maintaining consistency and bounding capacity of software code caches. In CGO '05 (Washington, DC, USA, 2005), pp. 74--85. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bruening, D., Duesterwald, E., and Amarasinghe, S. Design and implementation of a dynamic optimization framework for Windows. In ACM Workshop Feedback-directed Dyn. Opt. (FDDO-4) (2001).Google ScholarGoogle Scholar
  6. Bruening, D., Garnett, T., and Amarasinghe, S. An infrastructure for adaptive dynamic optimization. In CGO '03 (Washington, DC, USA, 2003), pp. 265--275. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bruening, D., Kiriansky, V., Garnett, T., and Banerji, S. Thread-shared software code caches. In CGO '06 (Washington, DC, USA, 2006), pp. 28--38. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bugnion, E. Dynamic binary translator with a system and method for updating and maintaining coherency of a translation cache. US Patent 6704925, March 2004.Google ScholarGoogle Scholar
  9. Chernoff, A., Herdeg, M., Hookway, R., Reeve, C., Rubin, N., Tye, T., Yadavalli, S. B., and Yates, J. Fx!32: A profile-directed binary translator. IEEE Micro 18, 2 (1998), 56--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Deutsch, L. P., and Schiffman, A. M. Efficient implementation of the smalltalk-80 system. In POPL '84 (New York, NY, USA, 1984), pp. 297--302. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Devine, S. W., Bugnion, E., and Rosenblum, M. Virtualization system including a virtual machine monitor for a computer with a segmented architecture. US Patent 6397242.Google ScholarGoogle Scholar
  12. Garg, M. Sysenter based system call mechanism in linux 2.6 (http://manugarg.googlepages.com/systemcallinlinux26.html).Google ScholarGoogle Scholar
  13. Gill, S. The diagnosis of mistakes in programmes on the edsac. Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences 206, 1087 (1951), 538--554.Google ScholarGoogle Scholar
  14. Hazelwood, K., and Smith, M. D. Managing bounded code caches in dynamic binary optimization systems. TACO '06 3, 3 (2006), 263--294. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Hiser, J., Kumar, N., Zhao, M., Zhou, S., Childers, B. R., Davidson, J. W., and Soffa, M. L. Techniques and tools for dynamic optimization. In IPDPS (2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Hiser, J. D., Williams, D., Hu, W., Davidson, J. W., Mars, J., and Childers, B. R. Evaluating indirect branch handling mechanisms in software dynamic translation systems. In CGO '07 (Washington, DC, USA, 2007), IEEE Computer Society, pp. 61--73. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Kistler, T., and Franz, M. Continuous program optimization: Design and evaluation. IEEE Trans. Comput. 50, 6 (2001), 549--566. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Luk, C.-K., Cohn, R., Muth, R., Patil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V. J., and Hazelwood, K. Pin: building customized program analysis tools with dynamic instrumentation. In PLDI '05 (New York, NY, USA, 2005), pp. 190--200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. May, C. Mimic: a fast system/370 simulator. In SIGPLAN '87: Papers of the Symposium on Interpreters and interpretive techniques (New York, NY, USA, 1987), pp. 1--13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Nethercote, N., and Seward, J. Valgrind: a framework for heavyweight dynamic binary instrumentation. In PLDI'07 (New York, NY, USA, 2007), pp. 89--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Olszewski, M., Cutler, J., and Steffan, J. G. Judostm: A dynamic binary-rewriting approach to software transactional memory. In PACT '07 (Washington, DC, USA, 2007), pp. 365--375. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Payer, M., and Gross, T. Requirements for fast binary translation. In 2nd Workshop on Architectural and Microarchitectural Support for Binary Translation (2009).Google ScholarGoogle Scholar
  23. Sridhar, S., Shapiro, J. S., and Bungale, P. P. HDTrans: a low-overhead dynamic translator. SIGARCH Comput. Archit. News 35, 1 (2007), 135--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Sridhar, S., Shapiro, J. S., Northup, E., and Bungale, P. P. HDTrans: an open source, low-level dynamic instrumentation system. In VEE '06 (New York, NY, USA, 2006), pp. 175--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Wen-Ke Chen, Sorin Lerner, R. C., and Gillies, D. M. Mojo: A dynamic optimization system. In ACM Workshop Feedback-directed Dyn. Opt. (FDDO-3) (2000).Google ScholarGoogle Scholar

Index Terms

  1. Generating low-overhead dynamic binary translators

    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 Other conferences
      SYSTOR '10: Proceedings of the 3rd Annual Haifa Experimental Systems Conference
      May 2010
      211 pages
      ISBN:9781605589084
      DOI:10.1145/1815695

      Copyright © 2010 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: 24 May 2010

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate94of285submissions,33%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader