Abstract
Transactional memory (TM) has been shown to be a promising programming model for multi-core systems. We developed a Software-based Transactional Memory (STM) compiler that generates efficient transactional code for transactions to run on a STM runtime without the need of transactional hardware support. Since real-world applications often invoke third party libraries available only in binary form, it is imperative for our STM compiler to support legacy binary functions and provide an efficient solution to convert those invoked inside transactions to the corresponding transactional code. Our STM compiler employs a Lightweight Dynamic Binary Translation and Optimization Module (LDBTOM) to automatically convert legacy binary functions to transactional code. In this paper, we describe our LDBTOM system, which 1) seamlessly integrates the translated code with the STM compiler generated code to run on the STM runtime, and 2) optimizes the translated code taking advantage of dynamic optimization opportunities and STM runtime information. Although the binary code is inherently harder to optimize than high-level source code, our experiment shows that it can be translated and optimized into efficient transactional code by LDBTOM.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Adl-Tabatabai, A., Lewis, B.T., Menon, V.S., Murphy, B.M., Saha, B.: T. Compiler and runtime support for efficient software transactional memory. In: PLDI 2006 (2006)
Adl-Tabatabai, et al.: Hw Acceleration For a Software Transactional Memory System. In: Micro 2006 (2006)
Ananian, C.S., Asanovic, K., Kuszmaul, B.C., Leiserson, C.E., Lie, S.: Unbounded transactional memory. In: 11th International Symposium on High-Performance Computer Architecture, 2005. HPCA-11, February 12-16, 2005, pp. 316–327 (2005)
Baraz, L., Devor, T., Etzion, O., Goldenberg, S., Skaletsky, A., Wang, Y., Zemach, Y.: IA-32 Execution Layer: a two-phase dynamic translator designed to support IA-32 applications on Itanium®-based systems. In: Micro-36 2003 (2003)
Blundell, C., Lewis, E.C., Martin, M.M.K.: Deconstructing Transactional Semantics: The Subtleties of Atomicity. In: Annual Workshop on Duplicating, Deconstructing, and Debunking (WDDD) (June 2005)
Blundell, C., Lewis, E.C., Martin, M.M.K.: Unrestricted Transactional Memory: Supporting I/O and System Calls within Transactions. Technical Report CIS-06-09, Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA (April 2006)
Wang, C., Chen, W., Wu, Y., Saha, B., Adl-babatabai, A.: Code Generation and Optimization for Transactional Memory Constructs in an Unmanaged Language. In: CGO 2007 (2007)
Wang, C., Hu, S., Kim, H.-s., Nair, S., Breternitz Jr., M., Ying, Z., Wu, Y.: StarDBT: An Efficient Multi-platform Dynamic Binary Translation System. In: Choi, L., Paek, Y., Cho, S. (eds.) ACSAC 2007. LNCS, vol. 4697, pp. 4–15. Springer, Heidelberg (2007)
Borin, E., Wang, C., Wu, Y., Araujo, G.: Software-Based Transparent and Comprehensive Control-Flow Error Detection. In: CGO 2006 (2006)
Qin, F., Wang, C., Li, Z., Kim, H.-s., Zhou, Y., Wu, Y.: LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks. In: Micro-39 2006 (2006)
Harris, T., Plesko, M., Shinnar, A., Tarditi, D.: Optimizing Memory Transactions. In: PLDI 2006 (2006)
Herlihy, M., Luchango, V., Moir, M., Scherer, W.N.: Software Transactional Memory for Dynamic Sized Data Structures. In: PODC 2003 (2003)
Hosking, A., Moss, J.E.B.: Nested transactional memory: Model and preliminary Sketches SCOOL (2005)
Olszewski, M., Cutler, J., Steffan, J.G.: JudoSTM: A Dynamic Binary-Rewriting Approach to Software Transactional Memory. In: PACT 2007 (2007)
Moir, M.: Hybrid Transactional Memory. Sun Microsystems Technical Report
Moore, K.E., Bobba, J., Moravan, M.J., Hill, M.D., Wood, D.A.: LogTM: Log-based Transactional Memory. In: HPCA 2006 (2006)
Wu, Q., Reddi, V.J., Wu, Y., Lee, J., Connors, D., Brooks, D., Martonosi, M., Clark, D.W.: Dynamic Compilation Framework for Controlling Microprocessor Energy and Performance. In: Micro-38 2005(2005)
Rajwar, R., Herlihy, M., Lai, K.: Virtualizing Transactional Memory. In: Proc. of the 32nd Annual Intl. Symp. On Computer Architecture (June 2005)
Shavit, N., Tuitou, D.: Software Transactional Memory. In: PODC 1995(1995)
Correct and Consistent Transactional Memory System (submitted for publication)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Wang, C., Ying, V., Wu, Y. (2008). Supporting Legacy Binary Code in a Software Transaction Compiler with Dynamic Binary Translation and Optimization. In: Hendren, L. (eds) Compiler Construction. CC 2008. Lecture Notes in Computer Science, vol 4959. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78791-4_20
Download citation
DOI: https://doi.org/10.1007/978-3-540-78791-4_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-78790-7
Online ISBN: 978-3-540-78791-4
eBook Packages: Computer ScienceComputer Science (R0)