{"title":"Helper function inlining in dynamic binary translation","authors":"Wenwen Wang","doi":"10.1145/3446804.3446851","DOIUrl":null,"url":null,"abstract":"Dynamic binary translation (DBT) is the cornerstone of many important applications. Yet, it takes a tremendous effort to develop and maintain a real-world DBT system. To mitigate the engineering effort, helper functions are frequently employed during the development of a DBT system. Though helper functions greatly facilitate the DBT development, their adoption incurs substantial performance overhead due to the helper function calls. To solve this problem, this paper presents a novel approach to inline helper functions in DBT systems. The proposed inlining approach addresses several unique technical challenges. As a result, the performance overhead introduced by helper function calls can be reduced, and meanwhile, the benefits of helper functions for DBT development are not lost. We have implemented a prototype based on the proposed inlining approach using a popular DBT system, QEMU. Experimental results on the benchmark programs from the SPEC CPU 2017 benchmark suite show that an average of 1.2x performance speedup can be achieved. Moreover, the translation overhead introduced by inlining helper functions is negligible.","PeriodicalId":267468,"journal":{"name":"Proceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction","volume":"21 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-02-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3446804.3446851","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6
Abstract
Dynamic binary translation (DBT) is the cornerstone of many important applications. Yet, it takes a tremendous effort to develop and maintain a real-world DBT system. To mitigate the engineering effort, helper functions are frequently employed during the development of a DBT system. Though helper functions greatly facilitate the DBT development, their adoption incurs substantial performance overhead due to the helper function calls. To solve this problem, this paper presents a novel approach to inline helper functions in DBT systems. The proposed inlining approach addresses several unique technical challenges. As a result, the performance overhead introduced by helper function calls can be reduced, and meanwhile, the benefits of helper functions for DBT development are not lost. We have implemented a prototype based on the proposed inlining approach using a popular DBT system, QEMU. Experimental results on the benchmark programs from the SPEC CPU 2017 benchmark suite show that an average of 1.2x performance speedup can be achieved. Moreover, the translation overhead introduced by inlining helper functions is negligible.
动态二进制转换(DBT)是许多重要应用程序的基础。然而,开发和维护一个真实的DBT系统需要付出巨大的努力。为了减轻工程工作量,在DBT系统的开发过程中经常使用辅助函数。尽管helper函数极大地促进了DBT的开发,但由于helper函数调用,采用它们会导致大量的性能开销。为了解决这一问题,本文提出了一种在DBT系统中实现内联辅助函数的新方法。建议的内联方法解决了几个独特的技术挑战。因此,帮助函数调用带来的性能开销可以减少,同时,帮助函数对DBT开发的好处也不会丧失。我们已经使用流行的DBT系统QEMU实现了一个基于建议的内联方法的原型。在SPEC CPU 2017基准测试套件的基准测试程序上的实验结果表明,可以实现平均1.2倍的性能加速。此外,内联帮助函数带来的转换开销可以忽略不计。