skip to main content
10.1145/3186411.3186413acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
research-article
Public Access

Improving Dynamically-Generated Code Performance on Dynamic Binary Translators

Published: 25 March 2018 Publication History

Abstract

The recent transition in the software industry toward dynamically generated code poses a new challenge to existing dynamic binary translation (DBT) systems. A significant re-translation overhead could be introduced due to the maintenance of the consistency between the dynamically-generated guest code and the corresponding translated host code. To address this issue, this paper presents a novel approach to optimize DBT systems for guest applications with dynamically-generated code. The proposed approach can maximize the reuse of previously translated host code to mitigate the re-translation overhead. A prototype based on such an approach has been implemented on an existing DBT system HQEMU. Experimental results on a set of JavaScript applications show that it can achieve a 1.24X performance speedup on average compared to the original HQEMU.

References

[1]
Keith Adams, Jason Evans, Bertrand Maher, Guilherme Ottoni, Andrew Paroski, Brett Simmers, Edwin Smith, and Owen Yamauchi. 2014. The Hiphop Virtual Machine. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA '14). ACM, New York, NY, USA, 777--790.
[2]
Wonsun Ahn, Jiho Choi, Thomas Shull, María J. Garzarán, and Josep Torrellas. 2014. Improving JavaScript Performance by Deconstructing the Type System. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '14). ACM, New York, NY, USA, 496--507.
[3]
Fabrice Bellard. 2005. QEMU, a Fast and Portable Dynamic Translator. In Proceedings of the Annual Conference on USENIX Annual Technical Conference (ATC '05). USENIX Association, Berkeley, CA, USA, 41--46. http://dl.acm.org/citation.cfm?id=1247360.1247401
[4]
Derek L. Bruening. 2004. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. Ph.D. Dissertation. Cambridge, MA, USA. AAI0807735.
[5]
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
[6]
Monika Dhok, Murali Krishna Ramanathan, and Nishant Sinha. 2016. Type-aware Concolic Testing of JavaScript Programs. In Proceedings of the 38th International Conference on Software Engineering (ICSE '16). ACM, New York, NY, USA, 168--179.
[7]
Evelyn Duesterwald and Vasanth Bala. 2000. Software Profiling for Hot Path Prediction: Less is More. In Proceedings of the Ninth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS IX). ACM, New York, NY, USA, 202--211.
[8]
Google. Accessed: November 27, 2017. Chrome V8 JavaScript Engine. (Accessed: November 27, 2017). http://developers.google.com/v8
[9]
Google. Accessed: November 27, 2017. Chrome Web Browser. (Accessed: November 27, 2017). http://www.google.com/chrome
[10]
Google. Accessed: November 27, 2017. Octane: The JavaScript Benchmark Suite for the modern web. (Accessed: November 27, 2017). http://developers.google.com/octane
[11]
Dibakar Gope, David J. Schlais, and Mikko H. Lipasti. 2017. Architectural Support for Server-Side PHP Processing. In Proceedings of the 44th Annual International Symposium on Computer Architecture (ISCA '17). ACM, New York, NY, USA, 507--520.
[12]
Byron Hawkins, Brian Demsky, Derek Bruening, and Qin Zhao. 2015. Optimizing Binary Translation of Dynamically Generated Code. In 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
[13]
Hiroshige Hayashizaki, Peng Wu, Hiroshi Inoue, Mauricio J. Serrano, and Toshio Nakatani. 2011. Improving the Performance of Trace-based Systems by False Loop Filtering. In Proceedings of the Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XVI). ACM, New York, NY, USA, 405--418.
[14]
David Hiniker, Kim Hazelwood, and Michael D. Smith. 2005. Improving Region Selection in Dynamic Optimization Systems. In Proceedings of the 38th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO 38). IEEE Computer Society, Washington, DC, USA, 141--154.
[15]
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. In Proceedings of the Tenth International Symposium on Code Generation and Optimization (CGO '12). ACM, New York, NY, USA, 104--113.
[16]
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. In Proceedings of the 9th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE '13). ACM, New York, NY, USA, 23--32.
[17]
Joyent Inc. Accessed: November 27, 2017. Node.js. (Accessed: November 27, 2017). http://nodejs.org
[18]
David Keppel. 1991. A Portable Interface for On-the-fly Instruction Space Modification. In Proceedings of the Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS IV). ACM, New York, NY, USA, 86--95.
[19]
Samuel Larsen and Saman Amarasinghe. 2000. Exploiting Superword Level Parallelism with Multimedia Instruction Sets. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation (PLDI '00). ACM, New York, NY, USA, 145--156.
[20]
Chris Lattner. 2002. LLVM: An Infrastructure for Multi-Stage Optimization. Master's thesis. Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL. See http://llvm.org.
[21]
Jianhui Li, Peng Zhang, and Orna Etzion. 2005. Module-aware Translation for Real-life Desktop Applications. In Proceedings of the 1st ACM/USENIX International Conference on Virtual Execution Environments (VEE '05). ACM, New York, NY, USA, 89--99.
[22]
Yu-Ping Liu, Ding-Yong Hong, Jan-Jan Wu, Sheng-Yu Fu, and Wei-Chung Hsu. 2017. Exploiting Asymmetric SIMD Register Configurations in ARM-to-x86 Dynamic Binary Translation. In Proceedings of the 26th International Conference on Parallel Architectures and Compilation Techniques (PACT '17). IEEE Computer Society, Washington, DC, USA, 343--355.
[23]
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. In Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '05). ACM, New York, NY, USA, 190--200.
[24]
Mozilla. Accessed: November 27, 2017. SpiderMonkey JavaScript Engine. (Accessed: November 27, 2017). http://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
[25]
Nicholas Nethercote and Julian Seward. 2007. Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '07). ACM, New York, NY, USA, 89--100.
[26]
Semih Okur, David L. Hartveld, Danny Dig, and Arie van Deursen. 2014. A Study and Toolkit for Asynchronous Programming in C#. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). ACM, New York, NY, USA, 1117--1127.
[27]
Guilherme Ottoni, Thomas Hartin, Christopher Weaver, Jason Brandt, Belliappa Kuttanna, and Hong Wang. 2011. Harmonia: A Transparent, Efficient, and Harmonious Dynamic Binary Translator Targeting the Intel® Architecture. In Proceedings of the 8th ACM International Conference on Computing Frontiers (CF '11). ACM, New York, NY, USA, Article 26, 10 pages.
[28]
Vijay Janapa Reddi, Dan Connors, Robert Cohn, and Michael D. Smith. 2007. Persistent Code Caching: Exploiting Code Reuse Across Executions and Applications. In Proceedings of the International Symposium on Code Generation and Optimization (CGO '07). IEEE Computer Society, Washington, DC, USA, 74--88.
[29]
Hesam Samimi, Max Schäfer, Shay Artzi, Todd Millstein, Frank Tip, and Laurie Hendren. 2012. Automated Repair of HTML Generation Errors in PHP Applications Using String Constraint Solving. In Proceedings of the 34th International Conference on Software Engineering (ICSE '12). IEEE Press, Piscataway, NJ, USA, 277--287. http://dl.acm.org/citation.cfm?id=2337223.2337257
[30]
Kevin Scott and Jack Davidson. 2001. Strata: A Software Dynamic Translation Infrastructure. Technical Report. Charlottesville, VA, USA.
[31]
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.
[32]
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. In Proceedings of the 4th International Conference on Information Systems Security (ICISS '08). Springer-Verlag, Berlin, Heidelberg, 1--25.
[33]
Android Studio. Accessed: November 27, 2017. Run Apps on the Android Emulator. (Accessed: November 27, 2017). http://developer.android.com/studio/run/emulator.html
[34]
Cheng Wang, Shiliang Hu, Ho-seop Kim, Sreekumar R. Nair, Mauricio Breternitz, Zhiwei Ying, and Youfeng Wu. 2007. StarDBT: An Efficient Multi-platform Dynamic Binary Translation System. In Proceedings of the 12th Asia-Pacific Conference on Advances in Computer Systems Architecture (ACSAC'07). Springer-Verlag, Berlin, Heidelberg, 4--15. http://dl.acm.org/citation.cfm?id=2392163.2392166
[35]
Wenwen Wang, Stephen McCamant, Antonia Zhai, and Pen-Chung Yew. 2018. Enhancing Cross-ISA DBT Through Automatically Learned Translation Rules. In Proceedings of the 23rd ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '18). ACM, New York, NY, USA.
[36]
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 51, 10 (2014). http://crad.ict.ac.cn/EN/10.7544/issn1000-1239.2014.20130018
[37]
Wenwen Wang, Pen-Chung Yew, Antonia Zhai, and Stephen McCamant. 2016. A General Persistent Code Caching Framework for Dynamic Binary Translation (DBT). In Proceedings of the 2016 USENIX Conference on Usenix Annual Technical Conference (USENIX ATC '16). USENIX Association, Berkeley, CA, USA, 591--603. http://dl.acm.org/citation.cfm?id=3026959.3027013
[38]
Wenwen Wang, Pen-Chung Yew, Antonia Zhai, Stephen McCamant, Youfeng Wu, and Jayaram Bobba. 2017. Enabling Cross-ISA Offloading for COTS Binaries. In Proceedings of the 15th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys '17). ACM, New York, NY, USA, 319--331.
[39]
Xiaochun Zhang, Qi Guo, Yunji Chen, Tianshi Chen, and Weiwu Hu. 2015. HERMES: A Fast cross-ISA Binary Translator with Post-optimization. In 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

Cited By

View all
  • (2022)How Far We’ve Come – A Characterization Study of Standalone WebAssembly Runtimes2022 IEEE International Symposium on Workload Characterization (IISWC)10.1109/IISWC55918.2022.00028(228-241)Online publication date: Nov-2022
  • (2022)WDBTJournal of Systems and Software10.1016/j.jss.2022.111247187:COnline publication date: 1-May-2022
  • (2021)WDBT: Wear Characterization, Reduction, and Leveling of DBT Systems for Non-Volatile MemoryProceedings of the International Symposium on Memory Systems10.1145/3488423.3519337(1-13)Online publication date: 27-Sep-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
VEE '18: Proceedings of the 14th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments
March 2018
106 pages
ISBN:9781450355797
DOI:10.1145/3186411
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 the author(s) 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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 March 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Binary Code Matching
  2. DBT
  3. JIT

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

Conference

VEE '18

Acceptance Rates

Overall Acceptance Rate 80 of 235 submissions, 34%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)258
  • Downloads (Last 6 weeks)41
Reflects downloads up to 25 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2022)How Far We’ve Come – A Characterization Study of Standalone WebAssembly Runtimes2022 IEEE International Symposium on Workload Characterization (IISWC)10.1109/IISWC55918.2022.00028(228-241)Online publication date: Nov-2022
  • (2022)WDBTJournal of Systems and Software10.1016/j.jss.2022.111247187:COnline publication date: 1-May-2022
  • (2021)WDBT: Wear Characterization, Reduction, and Leveling of DBT Systems for Non-Volatile MemoryProceedings of the International Symposium on Memory Systems10.1145/3488423.3519337(1-13)Online publication date: 27-Sep-2021
  • (2021)Effective exploitation of SIMD resources in cross-ISA virtualizationProceedings of the 17th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments10.1145/3453933.3454016(84-97)Online publication date: 7-Apr-2021
  • (2021)Helper function inlining in dynamic binary translationProceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction10.1145/3446804.3446851(107-118)Online publication date: 2-Mar-2021
  • (2020)Efficient and scalable cross-ISA virtualization of hardware transactional memoryProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377919(107-120)Online publication date: 22-Feb-2020
  • (2020)PerfDBT: Efficient Performance Regression Testing of Dynamic Binary Translation2020 IEEE 38th International Conference on Computer Design (ICCD)10.1109/ICCD50377.2020.00071(389-392)Online publication date: Oct-2020
  • (2019)Unleashing the power of learningProceedings of the 2019 USENIX Conference on Usenix Annual Technical Conference10.5555/3358807.3358815(77-89)Online publication date: 10-Jul-2019
  • (2024)An Instruction Inflation Analyzing Framework for Dynamic Binary TranslatorsACM Transactions on Architecture and Code Optimization10.1145/364081321:2(1-25)Online publication date: 15-Jan-2024
  • (2021)Effective exploitation of SIMD resources in cross-ISA virtualizationProceedings of the 17th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments10.1145/3453933.3454016(84-97)Online publication date: 7-Apr-2021

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media