skip to main content
research-article
Public Access

Enhancing Cross-ISA DBT Through Automatically Learned Translation Rules

Authors Info & Claims
Published:19 March 2018Publication History
Skip Abstract Section

Abstract

This paper presents a novel approach for dynamic binary translation (DBT) to automatically learn translation rules from guest and host binaries compiled from the same source code. The learned translation rules are then verified via binary symbolic execution and used in an existing DBT system, QEMU, to generate more efficient host binary code. Experimental results on SPEC CINT2006 show that the average time of learning a translation rule is less than two seconds. With the rules learned from a collection of benchmark programs excluding the targeted program itself, an average 1.25X performance speedup over QEMU can be achieved for SPEC CINT2006. Moreover, the translation overhead introduced by this rule-based approach is very small even for short-running workloads.

References

  1. Sorav Bansal and Alex Aiken. 2008. Binary Translation Using Peephole Superoptimizers Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation (OSDI'08). USENIX Association, Berkeley, CA, USA, 177--192. http://dl.acm.org/citation.cfm?id=1855741.1855754 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Leonid Baraz, Tevi Devor, Orna Etzion, Shalom Goldenberg, Alex Skaletsky, Yun Wang, and Yigel Zemach. 2003. IA-32 Execution Layer: A Two-phase Dynamic Translator Designed to Support IA-32 Applications on Itanium®-based Systems Proceedings of the 36th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO 36). IEEE Computer Society, Washington, DC, USA, 191--201. http://dl.acm.org/citation.cfm?id=956417.956550 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Fabrice Bellard. 2005. QEMU, a Fast and Portable Dynamic Translator. In Proceedings of the USENIX Annual Technical Conference (ATC '05). USENIX Association, Berkeley, CA, USA, 41--46. http://dl.acm.org/citation.cfm?id=1247360.1247401 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Robert S. Boyer, Bernard Elspas, and Karl N. Levitt. 1975. SELECT -- a Formal System for Testing and Debugging Programs by Symbolic Execution Proceedings of the International Conference on Reliable Software. ACM, New York, NY, USA, 234--245. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Derek L. Bruening. 2004. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. Ph.D. Dissertation. Cambridge, MA, USA. AAI0807735. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. David Brumley, Ivan Jager, Thanassis Avgerinos, and Edward J. Schwartz. 2011. BAP: A Binary Analysis Platform. In Proceedings of the 23rd International Conference on Computer Aided Verification (CAV'11). Springer-Verlag, Berlin, Heidelberg, 463--469. http://dl.acm.org/citation.cfm?id=2032305.2032342 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Chao-Jui Chang, Jan-Jan Wu, Wei-Chung Hsu, Pangfeng Liu, and Pen-Chung Yew. 2014. Efficient Memory Virtualization for Cross-ISA System Mode Emulation Proceedings of the 10th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE '14). ACM, New York, NY, USA, 117--128. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Eric Christopher. 2013. Debug Info - Status and Directions. In European LLVM Conference. http://llvm.org/devmtg/2013-04/christopher-slides.pdfGoogle ScholarGoogle Scholar
  9. Emilio G. Cota, Paolo Bonzini, Alex Bennée, and Luca P. Carloni. 2017. Cross-ISA Machine Emulation for Multicores. In Proceedings of the 2017 International Symposium on Code Generation and Optimization (CGO '17). IEEE Computer Society, Piscataway, NJ, USA, 210--220. http://dl.acm.org/citation.cfm?id=3049832.3049855 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Amanieu D'Antras, Cosmin Gorgovan, Jim Garside, John Goodacre, and Mikel Luján. 2017 b. HyperMAMBO-X64: Using Virtualization to Support High-Performance Transparent Binary Translation. In Proceedings of the 13th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments. (VEE '17). ACM, New York, NY, USA, 228--241. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Amanieu D'Antras, Cosmin Gorgovan, Jim Garside, and Mikel Luján. 2017 a. Low Overhead Dynamic Binary Translation on ARM. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '17). ACM, New York, NY, USA, 333--346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Vijay Ganesh and David L. Dill. 2007. A Decision Procedure for Bit-vectors and Arrays. Proceedings of the 19th International Conference on Computer Aided Verification (CAV'07). Springer-Verlag, Berlin, Heidelberg, 519--531. http://dl.acm.org/citation.cfm?id=1770351.1770421 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. GNU Project. Accessed: January 2018. The GNU Compiler Collection. (Accessed: January 2018). http://gcc.gnu.orgGoogle ScholarGoogle Scholar
  14. Niranjan Hasabnis and R. Sekar. 2016. Lifting Assembly to Intermediate Representation: A Novel Approach Leveraging Compilers Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems. (ASPLOS '16). ACM, New York, NY, USA, 311--324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Byron Hawkins, Brian Demsky, Derek Bruening, and Qin Zhao. 2015. Optimizing Binary Translation of Dynamically Generated Code Proceedings of the 13th Annual IEEE/ACM International Symposium on Code Generation and Optimization. (CGO '15). IEEE Computer Society, Washington, DC, USA, 68--78. http://dl.acm.org/citation.cfm?id=2738600.2738610 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Ding-Yong Hong, Chun-Chen Hsu, Pen-Chung Yew, Jan-Jan Wu, Wei-Chung Hsu, Pangfeng Liu, Chien-Min Wang, and Yeh-Ching Chung. 2012. HQEMU: A Multi-threaded and Retargetable Dynamic Binary Translator on Multicores Proceedings of the Tenth International Symposium on Code Generation and Optimization. (CGO '12). ACM, New York, NY, USA, 104--113. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Chun-Chen Hsu, Pangfeng Liu, Jan-Jan Wu, Pen-Chung Yew, Ding-Yong Hong, Wei-Chung Hsu, and Chien-Min Wang. 2013. Improving Dynamic Binary Optimization Through Early-exit Guided Code Region Formation. Proceedings of the 9th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE '13). ACM, New York, NY, USA, 23--32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Intel. 2003. IA-32 Intel® Architecture Software Developer's Manual.Google ScholarGoogle Scholar
  19. Ning Jia, Chun Yang, Jing Wang, Dong Tong, and Keyi Wang. 2013. SPIRE: Improving Dynamic Binary Translation Through SPC-indexed Indirect Branch Redirecting. In Proceedings of the 9th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE '13). ACM, New York, NY, USA, 1--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Stephen Kyle, Igor Böhm, Björn Franke, Hugh Leather, and Nigel Topham. 2012. Efficiently Parallelizing Instruction Set Simulation of Embedded Multi-core Processors Using Region-based Just-in-time Dynamic Binary Translation Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded Systems (LCTES '12). ACM, New York, NY, USA, 21--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Chris Lattner and Vikram Adve. 2004. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation Proceedings of the International Symposium on Code Generation and Optimization: Feedback-directed and Runtime Optimization (CGO '04). IEEE Computer Society, Washington, DC, USA, 75--88. http://dl.acm.org/citation.cfm?id=977395.977673 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Chi-Keung Luk, Robert Cohn, Robert Muth, Harish Patil, Artur Klauser, Geoff Lowney, Steven Wallace, Vijay Janapa Reddi, and Kim Hazelwood. 2005. Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '05). ACM, New York, NY, USA, 190--200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Daniel Lustig, Caroline Trippel, Michael Pellauer, and Margaret Martonosi. 2015. ArMOR: Defending Against Memory Consistency Model Mismatches in Heterogeneous Architectures Proceedings of the 42nd Annual International Symposium on Computer Architecture (ISCA '15). ACM, New York, NY, USA, 388--400. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Lorenzo Martignoni, Stephen McCamant, Pongsin Poosankam, Dawn Song, and Petros Maniatis. 2012. Path-exploration Lifting: Hi-fi Tests for Lo-fi Emulators Proceedings of the Seventeenth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XVII). ACM, New York, NY, USA, 337--348. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Nicholas Nethercote and Julian Seward. 2007. Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '07). ACM, New York, NY, USA, 89--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Vijay Janapa Reddi, Dan Connors, Robert Cohn, and Michael D. Smith. 2007. Persistent Code Caching: Exploiting Code Reuse Across Executions and Applications Proceedings of the International Symposium on Code Generation and Optimization (CGO '07). IEEE Computer Society, Washington, DC, USA, 74--88. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Daniel Sanchez and Christos Kozyrakis. 2013. ZSim: Fast and Accurate Microarchitectural Simulation of Thousand-core Systems Proceedings of the 40th Annual International Symposium on Computer Architecture (ISCA '13). ACM, New York, NY, USA, 475--486. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. David Seal. 2000. ARM Architecture Reference Manual (bibinfoedition2nd ed.). Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Jim Smith and Ravi Nair. 2005. Virtual Machines: Versatile Platforms for Systems and Processes (The Morgan Kaufmann Series in Computer Architecture and Design). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Dawn Song, David Brumley, Heng Yin, Juan Caballero, Ivan Jager, Min Gyung Kang, Zhenkai Liang, James Newsome, Pongsin Poosankam, and Prateek Saxena. 2008. BitBlaze: A New Approach to Computer Security via Binary Analysis Proceedings of the 4th International Conference on Information Systems Security (ICISS '08). Springer-Verlag, Berlin, Heidelberg, 1--25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Maxwell Souza, Daniel Nicácio, and Guido Araújo. 2012. ISAMAP: Instruction Mapping Driven by Dynamic Binary Translation Computer Architecture: ISCA 2010 International Workshop AMAS-BT. Springer Berlin Heidelberg, Berlin, Heidelberg, 117--138. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Wenwen Wang, Chenggang Wu, Tongxin Bai, Zhenjiang Wang, Xiang Yuan, and Huimin Cui. 2014. A Pattern Translation Method for Flags in Binary Translation. Journal of Computer Research and Development, Vol. 51, 10 (2014), 2336--2347. http://crad.ict.ac.cn/EN/10.7544/issn1000--1239.2014.20130018Google ScholarGoogle Scholar
  33. Wenwen Wang, Pen-Chung Yew, Antonia Zhai, and Stephen McCamant. 2016. A General Persistent Code Caching Framework for Dynamic Binary Translation (DBT) Proceedings of the 2016 USENIX Annual Technical Conference (USENIX ATC '16). USENIX Association, Berkeley, CA, USA, 591--603. http://dl.acm.org/citation.cfm?id=3026959.3027013 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Wenwen Wang, Pen-Chung Yew, Antonia Zhai, Stephen McCamant, Youfeng Wu, and Jayaram Bobba. 2017. Enabling Cross-ISA Offloading for COTS Binaries. Proceedings of the 15th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys '17). ACM, New York, NY, USA, 319--331. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Xiaochun Zhang, Qi Guo, Yunji Chen, Tianshi Chen, and Weiwu Hu. 2015. HERMES: A Fast cross-ISA Binary Translator with Post-optimization Proceedings of the 13th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO '15). IEEE Computer Society, Washington, DC, USA, 246--256. http://dl.acm.org/citation.cfm?id=2738600.2738631 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Enhancing Cross-ISA DBT Through Automatically Learned Translation Rules

              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

              Full Access

              • Published in

                cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 53, Issue 2
                ASPLOS '18
                February 2018
                809 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/3296957
                Issue’s Table of Contents
                • cover image ACM Conferences
                  ASPLOS '18: Proceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems
                  March 2018
                  827 pages
                  ISBN:9781450349116
                  DOI:10.1145/3173162

                Copyright © 2018 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 19 March 2018

                Check for updates

                Qualifiers

                • research-article

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!