skip to main content
10.1145/1134760.1220166acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
Article

HDTrans: an open source, low-level dynamic instrumentation system

Published:14 June 2006Publication History

ABSTRACT

Dynamic translation is a general purpose tool used for instrumenting programs at run time. Performance of translated execution relies on balancing the cost of translation against the benefits of any optimizations achieved, and many current translators perform substantial rewriting during translation in an attempt to reduce execution time. Our results show that these optimizations offer no significant benefit even when the translated program has a small, hot working set. When used in a broader range of applications, such as ubiquitous policy enforcement or penetration detection, translator performance cannot rely on the presence of a hot working set to amortize the cost of translation. A simpler, more maintainable, adaptable, and smaller translator appears preferable to more complicated designs in most cases.HDTrans is a light-weight dynamic instrumentation system for the IA-32 architecture that uses some simple and effective translation techniques in combination with established trace linearization and code caching optimizations. We present an evaluation of translation overhead under both benchmark and less idealized conditions, showing that conventional benchmarks do not provide a good prediction of translation overhead when used pervasively.A further contribution of this paper is an analysis of the effectiveness of post-link static pre-translation techniques for overhead reduction. Our results indicate that static pre-translation is effective only when expensive instrumentation or optimization is performed.

References

  1. Advanced Micro Devices, Inc. AMD64 Architecture Tech Docs, 2005. http://www.amd.com/us-en/Processors/TechnicalResources/0,,30_182_739_7044,00.html.Google ScholarGoogle Scholar
  2. Altman, E., Gschwind, M., and Sathaye, S. BOA: The architecture of a binary translation processor. In Research Report RC21665 IBM T.J. Watson Research Center (2000).Google ScholarGoogle Scholar
  3. Bala, V., Duesterwald, E., and Banerjia, S. Dynamo: A transparent dynamic optimization system. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (June 2000), pp. 1--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bell, J. R. Threaded Code. In Communications of the ACM (June 1973), no. 6, pp. 370--372. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bellard, F. QEMU, a Fast and Portable Dynamic Translator. In Proc. 2005 USENIX Annual Technical Conference, FREENIX Track (2005), pp. 41--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Breuning, D. L. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. PhD thesis, Massachusetts Institute of Technology, September 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bruening, D., and Amarasinghe, S. Maintaining Consistency and Bounding Capacity of Software Code Caches. In Proc.3rd International Symposium on Code Generation and Optimization (CGO 2006) (Mar. 2005), pp. 74--85. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bruening, D., Garnett, T., and Amarasinghe, S. An Infrastructure for Adaptive Dynamic Optimizations. In Proc. International Symposium on Code Generation and Optimization (2003), pp. 265--275. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Bruening, D., Kiriansky, V., Garnett, T., and Banerjia, S. Thread-Shared Software Code Caches. In Proc.4th International Symposium on Code Generation and Optimization (CGO 2006) (Mar. 2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Bungale, P., Sridhar, S., and Shapiro, J. S. Low-Complexity Dynamic Translation in VDebug. Tech. Rep. SRL2004-02, Johns Hopkins University Systems Research Laboratory, May 2004.Google ScholarGoogle Scholar
  11. Bungale, P., Sridhar, S., and Shapiro, J. S. Supervisor-Mode Virtualization for x86 in VDebug. Tech. Rep. SRL2004-01, Johns Hopkins University Systems Research Laboratory, May 2004.Google ScholarGoogle Scholar
  12. Chen, W. K., Lerner, S., Chaiken, R., and Gillies, D. M. Mojo: A Dynamic Optimization System. In ACM Workshop on Feedback-directed and Dynamic Optimization (FDDO-3) (Dec 2000).Google ScholarGoogle Scholar
  13. Cifuentes, C., and Emmerik, M. V. UQBT: Adaptable binary translation at low cost. In IEEE Computer, 33(3). Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Cifuentes, C., Lewis, B., and Ung, D. Walkabout--A Retargetable Dynamic Binary Translation Framework. In Technical report 2002-106, Sun Microsystems Laboratories (January 2002).Google ScholarGoogle Scholar
  15. Cmelik, B., and Keppel, D. Shade: A fast instruction- set simulator for execution profiling. In ACM SIGMETRICS Conf. on the Measurement and Modeling of Computer Systems (1994), pp. 128--137. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Deutsch, L. P., and Schiffman, A. M. Efficient Implementation of the Smalltalk-80 System. In Proc. ACM Symposium on Principles of Programming Languages (Jan. 1984), pp. 297--302. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Devine, S., Bugnion, E., and Rosenblum, M. Virtualization System Including a Virtual Machine Monitor for a Computer with a Segmented Architecture. In United States Patent 6,397,242 (May 2002).Google ScholarGoogle Scholar
  18. Dewar, R. B. Indirect Threaded Code. In Communications of the ACM (June 1975), no. 6, pp. 330--331. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Dragovic, B., Fraser, K., Hand, S., Harris, T., Ho, A., Pratt, I., Warfield, A., Barham, P., and Neugebauer, R. Xen and the Art of Virtualization. In Proc. 2003 ACM Symposium on Operating Systems Principles (Oct. 2003), pp. 164--177. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Ebcioglu, K., and Altman, E. DAISY: Dynamic Compilation for 100% Architectural Compatibility. In In Proc. 24th International Symposium on Computer Architecture (June 1997), pp. 26--38. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Engler, D. VCODE: A Retargetable, Extensible, Very Fast Dynamic Code Generation System. In Proc. 23rd Annual ACM Conference on Programming Language Design and Implementation (Philadelphia, PA, USA, May 1996). Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Engler, D., Hsieh, W. C., and Kaashoek, M. F. 'C: A Language for High-Level, Efficient, and Machine-Independent Dynamic Code Generation. In Proc. 22nd Annual Symposium on Principles of Programming Languages (Dec. 1995), pp. 131--144. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Engler, D., and Kaashoek, M. F. DPF: Fast, Flexible Message Demultiplexing using Dynamic Code Generation. In Proc. SIGCOMM '96 Conference (Stanford, CA, USA, Aug. 1992), pp. 53--59. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Engler, D., and Proebsting, T. A. DCG: An Efficient, Retargable Dynamic Code Generation System. In Proc. ASPLOS-VI (Oct. 1994), pp. 238--245. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Hazelwood, K. Code Cache Management in Dynamic Optimization Systems. PhD thesis, Harvard University, Cambridge, MA, May 2004.Google ScholarGoogle Scholar
  26. Hazelwood, K., and Cohn, R. A Cross-Architectural Framework for Code Cache Manipulation. In 4th Annual International Symposium on Code Generation and Optimization (March 2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Hazelwood, K., and Smith, J. E. Exploring Code Cache Eviction Granularities in Dynamic Optimization Systems. In 2nd Annual International Symposium on Code Generation and Optimization (March 2004), pp. 89--99. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Hazelwood, K., and Smith, M. D. Code Cache Management Schemes for Dynamic Optimizers. In Proc. Sixth Annual Workshop on Interaction between Compilers and Computer Architectures (Feb. 2002), pp. 102--110. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Hazelwood, K., and Smith, M. D. Generational Cache Management of Code Traces in Dynamic Optimization Systems. In 36th Annual International Symposium on Microarchitecture (San Diego, CA, December 2003), pp. 169--179. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Hookway, R. J., and Herdeg, M. A. DIGITAL FX!32: Combining Emulation and Binary Translation. In Digital Technical Journal, 9(1):3--12 (1997). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Hunter, C., and Banning, J. DOS at RISC. In Byte Magazine (Nov. 1989), pp. 361--368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Kiriansky, V., Bruening, D., and Amarasinghe, S. Secure Execution via Program Shepherding. In 11th USENIX Security Symposium (August 2002). Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Kruegel, C., Robertson, W., Valeur, F., and Vigna, G. Static Disassembly of Obfuscated Binaries. In Proceedings of USENIX Security 2004 (August 2004). Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Luk, C. K., Cohn, R. S., Muth, R., Patil, H., Klauser, A., Lowney, P. G., Wallace, S., Reddi, V. J., and Hazelwood, K. Pin: Building Customized Program Analysis Tools With Dynamic Instrumentation. In Programming Languages Design and Implementation 2005 (June 2005), pp. 190--200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. May, C. MIMIC: A fast System/370 simulator. In Proc. SIGPLAN'87 Symposium on Interpreters and Interpretive Techniques (June 1987), pp. 1--13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Nethercote, N. Dynamic Binary Analysis and Instrumentation. PhD thesis, University of Cambridge, November 2004.Google ScholarGoogle Scholar
  37. Operation, A. U. S. System V Interface Definition. 1989.Google ScholarGoogle Scholar
  38. Rau, B. R. Levels of Representation of Programs and the Architecture of Universal Host Machines. In Proc. 11th Annual Workshop on Microprogramming (1978), pp. 67--79. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Reddi, V. J., Connors, D. A., and Cohn, R. S. Persistence in Dynamic Code Transformation Systems. In Proc. 2005 Workshop on Binary Instrumentation and Analysis (Sept. 2005).Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Scott, K., Kumar, N., Childers, B., Davidson, J., and Soffa, M. Overhead Reduction Techniques for Software Dynamic Translation. In NSF Workshop on Next Generation Software (April 2004).Google ScholarGoogle Scholar
  41. Scott, K., Kumar, N., Velusamy, S., Childers, B., Davidson, J., and Soffa, M. Retargetable and Reconfigurable Software Dynamic Translation. In ACM SIGMICRO Int'l. Conf. on Code Generation and Optimization (March 2003). Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Shapiro, J. Debug: The Next Generation UNIX Debugger, 1989.Google ScholarGoogle Scholar
  43. Shapiro, J. S., Northup, E., Doerrie, M. S., and Sridhar, S. Coyotos Microkernel Specification, 2006. http:// www.coyotos.org/.Google ScholarGoogle Scholar
  44. Shapiro, J. S., Smith, J. M., and Farber, D. J. EROS: A fast capability system. In In Proc. 17th ACM Symposium on Operating Systems Principles (Dec. 1999), pp. 170--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Shiveley, R. Enhanced Virtualization on Intel Architecture-based Servers. In Technology@Intel Magazine (April 2005).Google ScholarGoogle Scholar
  46. Sridhar, S., Shapiro, J. S., and Bungale, P. P. HDTrans: A Low-Overhead Dynamic Translator. In Proc. 2005 Workshop on Binary Instrumentation and Analysis (Sept. 2005).Google ScholarGoogle Scholar
  47. Standard Performance Evaluation Corporation. SPEC OMP OpenMP Benchmark Suite, version 3.0, Dec. 2003. http://www.spec.org/omp.Google ScholarGoogle Scholar
  48. Standard Performance Evaluation Corporation. SPEC CPU2000 Benchmark Suite, version 1.3, Nov. 2005. http://www.spec.org/ osg/cpu2000.Google ScholarGoogle Scholar
  49. Witchel, E., and Rosenblum, M. Embra: Fast and exible machine simulation. In Measurement and Modeling of Computer Systems (1996), pp. 68--79. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. HDTrans: an open source, low-level dynamic instrumentation system

    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
      VEE '06: Proceedings of the 2nd international conference on Virtual execution environments
      June 2006
      194 pages
      ISBN:1595933328
      DOI:10.1145/1134760

      Copyright © 2006 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: 14 June 2006

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate80of235submissions,34%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader