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.
- Bala, V., Duesterwald, E., and Banerjia, S. Dynamo: a transparent dynamic optimization system. In PLDI '00 (Vancouver, BC, Canada, 2000), pp. 1--12. Google ScholarDigital Library
- 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 ScholarDigital Library
- Bellard, F. QEMU, a fast and portable dynamic translator. In ATEC '05 (Berkeley, CA, USA, 2005), pp. 41--41. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- Bruening, D., Garnett, T., and Amarasinghe, S. An infrastructure for adaptive dynamic optimization. In CGO '03 (Washington, DC, USA, 2003), pp. 265--275. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- Garg, M. Sysenter based system call mechanism in linux 2.6 (http://manugarg.googlepages.com/systemcallinlinux26.html).Google Scholar
- 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 Scholar
- Hazelwood, K., and Smith, M. D. Managing bounded code caches in dynamic binary optimization systems. TACO '06 3, 3 (2006), 263--294. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Kistler, T., and Franz, M. Continuous program optimization: Design and evaluation. IEEE Trans. Comput. 50, 6 (2001), 549--566. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Payer, M., and Gross, T. Requirements for fast binary translation. In 2nd Workshop on Architectural and Microarchitectural Support for Binary Translation (2009).Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
Index Terms
- Generating low-overhead dynamic binary translators
Recommendations
HDTrans: an open source, low-level dynamic instrumentation system
VEE '06: Proceedings of the 2nd international conference on Virtual execution environmentsDynamic 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 ...
Machine-adaptable dynamic binary translation
DYNAMO '00: Proceedings of the ACM SIGPLAN workshop on Dynamic and adaptive compilation and optimizationDynamic binary translation is the process of translating and optimizing executable code for one machine to another at runtime, while the program is “executing” on the target machine.
Dynamic translation techniques have normally been limited to two ...
Dynamic binary translation using run-time feedbacks
Software analysis, evolution and re-engineeringDynamic binary translation is the process of translating, modifying and rewriting executable (binary) code from one machine to another at run-time. This process of low-level re-engineering consists of a reverse engineering phase followed by a forward ...
Comments