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.
- 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 Scholar
- 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 Scholar
- 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 ScholarDigital Library
- Bell, J. R. Threaded Code. In Communications of the ACM (June 1973), no. 6, pp. 370--372. Google ScholarDigital Library
- Bellard, F. QEMU, a Fast and Portable Dynamic Translator. In Proc. 2005 USENIX Annual Technical Conference, FREENIX Track (2005), pp. 41--46. Google ScholarDigital Library
- Breuning, D. L. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. PhD thesis, Massachusetts Institute of Technology, September 2004. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
- Cifuentes, C., and Emmerik, M. V. UQBT: Adaptable binary translation at low cost. In IEEE Computer, 33(3). Google ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- Dewar, R. B. Indirect Threaded Code. In Communications of the ACM (June 1975), no. 6, pp. 330--331. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Engler, D., and Proebsting, T. A. DCG: An Efficient, Retargable Dynamic Code Generation System. In Proc. ASPLOS-VI (Oct. 1994), pp. 238--245. Google ScholarDigital Library
- Hazelwood, K. Code Cache Management in Dynamic Optimization Systems. PhD thesis, Harvard University, Cambridge, MA, May 2004.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Hunter, C., and Banning, J. DOS at RISC. In Byte Magazine (Nov. 1989), pp. 361--368. Google ScholarDigital Library
- Kiriansky, V., Bruening, D., and Amarasinghe, S. Secure Execution via Program Shepherding. In 11th USENIX Security Symposium (August 2002). Google ScholarDigital Library
- Kruegel, C., Robertson, W., Valeur, F., and Vigna, G. Static Disassembly of Obfuscated Binaries. In Proceedings of USENIX Security 2004 (August 2004). Google ScholarDigital Library
- 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 ScholarDigital Library
- May, C. MIMIC: A fast System/370 simulator. In Proc. SIGPLAN'87 Symposium on Interpreters and Interpretive Techniques (June 1987), pp. 1--13. Google ScholarDigital Library
- Nethercote, N. Dynamic Binary Analysis and Instrumentation. PhD thesis, University of Cambridge, November 2004.Google Scholar
- Operation, A. U. S. System V Interface Definition. 1989.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- Shapiro, J. Debug: The Next Generation UNIX Debugger, 1989.Google Scholar
- Shapiro, J. S., Northup, E., Doerrie, M. S., and Sridhar, S. Coyotos Microkernel Specification, 2006. http:// www.coyotos.org/.Google Scholar
- 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 ScholarDigital Library
- Shiveley, R. Enhanced Virtualization on Intel Architecture-based Servers. In Technology@Intel Magazine (April 2005).Google Scholar
- 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 Scholar
- Standard Performance Evaluation Corporation. SPEC OMP OpenMP Benchmark Suite, version 3.0, Dec. 2003. http://www.spec.org/omp.Google Scholar
- Standard Performance Evaluation Corporation. SPEC CPU2000 Benchmark Suite, version 1.3, Nov. 2005. http://www.spec.org/ osg/cpu2000.Google Scholar
- Witchel, E., and Rosenblum, M. Embra: Fast and exible machine simulation. In Measurement and Modeling of Computer Systems (1996), pp. 68--79. Google ScholarDigital Library
Index Terms
- HDTrans: an open source, low-level dynamic instrumentation system
Recommendations
HDTrans: a low-overhead dynamic translator
Dynamic translation is a general purpose tool used for instrumenting programs at run time. Many current translators perform substantial rewriting during translation in an attempt to reduce execution time. When dynamic translation is used as a ubiquitous ...
Generating low-overhead dynamic binary translators
SYSTOR '10: Proceedings of the 3rd Annual Haifa Experimental Systems ConferenceDynamic (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 ...
The Transmeta Code Morphing™ Software: using speculation, recovery, and adaptive retranslation to address real-life challenges
CGO '03: Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimizationTransmeta's Crusoe microprocessor is a full, system-level implementation of the x86 architecture, comprising a native VLIW microprocessor with a software layer, the Code Morphing Software (CMS), that combines an interpreter, dynamic binary translator, ...
Comments