Accelerating Shared Library Execution in a DBT

Tom Spink, Bjoern Franke

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract / Description of output

User-mode Dynamic Binary Translation (DBT) has recently received renewed interest, not least due to Apple’s transition towards the Arm ISA, supported by a DBT compatibility layer for x86 legacy applications. While receiving praise for its performance, execution of legacy applications through Apple’s Rosetta 2 technology still incurs a performance penalty when compared to direct host execution. A particular limitation of Rosetta 2 is that code is either executed exclusively as native Arm code, or as translated Arm code. In particular,mixed mode execution of native Arm code and translated code is not possible. This is a missed opportunity, especially in the case of shared libraries where both optimized x86 and Arm versions of the same library are available. In this paper,we develop mixed mode execution capabilities for shared libraries in a DBT system, eliminating the need to translate code where a highly optimised native version already exists. Our novel execution model intercepts calls to shared library functions in the DBT system and automatically redirects them to their faster host counterparts, making better use of the underlying host ISA. To ease the burden for the developer, we make use of an Interface Description Language (IDL) to capture library function signatures, from which relevant stubs and data marshalling code are generated automatically. We have implemented our novel mixed mode execution approach in the open-source Qemu DBT system, and demonstrate both ease of use and performance benefits for three popular libraries (standard C Math library, SQLite, and OpenSSL). Our evaluation confirms that with minimal developer effort, accelerated host execution of shared library functionality results in speedups between 2.7× and 6.3× on average, and up to 28× for x86 legacy applications on an Arm host system.
Original languageEnglish
Title of host publicationProceedings of the 25th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems
PublisherACM
Publication statusAccepted/In press - 1 Apr 2024
Event25th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems - Copenhagen, Denmark
Duration: 24 Jun 202428 Jun 2024
Conference number: 25
https://pldi24.sigplan.org/home/LCTES-2024

Conference

Conference25th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems
Abbreviated titleLCTES 2024
Country/TerritoryDenmark
CityCopenhagen
Period24/06/2428/06/24
Internet address

Keywords / Materials (for Non-textual outputs)

  • shared libraries
  • dynamic binary translation
  • instruction set simulation

Fingerprint

Dive into the research topics of 'Accelerating Shared Library Execution in a DBT'. Together they form a unique fingerprint.

Cite this