skip to main content
10.1145/1346256.1346265acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
research-article

Process-shared and persistent code caches

Published: 05 March 2008 Publication History

Abstract

Software code caches are increasingly being used to amortizethe runtime overhead of tools such as dynamic optimizers, simulators, and instrumentation engines. The additional memory consumed by these caches, along with the data structures used to manage them, limits the scalability of dynamic tool deployment. Inter-process sharing of code caches significantly improves the ability to efficiently apply code caching tools to many processes simultaneously.
In this paper, we present a method of code cache sharing among processes for dynamic tools operating on native applications. Our design also supports code cache persistence for improved cold code execution in short-lived processes or long initialization sequences. Sharing raises security concerns, and we show how to achieve sharing without risk of privilege escalation and with read-only code caches and associated data structures. We evaluate process-shared and persisted code caches implemented in the DynamoRIO industrial-strength dynamic instrumentation engine, where we achieve a two-thirds reduction in both memory usage and startup time.

References

[1]
Adl-Tabatabai, A., Cierniak, M., Lueh, G., Parikh, V.M., and Stichnoth, J.M. 1998. Fast, effective code generation in a just-in-time Java compiler. In Procof ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'98), 280--290.
[2]
Arnold, M., Fink, S., Grove, D., Hind, M., and Sweeney, P.F. 2000. Adaptive optimization in the Jalapeño JVM. In Procof ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'00), 47--65.
[3]
Bala, V., Duesterwald, E., and Banerjia, S. 2000. Dynamo: A transparent runtime optimization system. In Procof ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '00), 1--12.
[4]
Bruening, D., and Amarasinghe, S. 2005. Maintaining consistency and bounding capacity of software code caches. In Procof International Symposium on Code Generation and Optimization (CGO '05), 74--85.
[5]
Bruening, D. 2004. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. PhD thesis, M.I.T.
[6]
Bugnion, E., Devine, S., and Rosenblum, M. 1997. Disco: Running commodity operating systems on scalable multiprocessors. In Procof 16th ACM Symposium on Operating System Principles (SOSP '97), 143--156.
[7]
Bungale, P.P., and Luk, C.-K. 2007. PinOS: A programmable framework for whole-system dynamic instrumentation. In Procof 3rd International Conference on Virtual Execution Environments (VEE'07), 137--147.
[8]
Chen, W., Lerner, S., Chaiken, R., and Gillies, D.M. 2000. Mojo: A dynamic optimization system. In Procof 3rd ACM Workshop on Feedback--Directed and Dynamic Optimization (FDDO-3), 81--90.
[9]
Chernoff, A., Herdeg, M., Hookway, R., Reeve, C., Rubin, N., Tye, T., Yadavalli, S.B., and Yates, J. 1998. FX!32: A profile-directed binary translator. IEEE Micro, 18(2) (Mar.), 56--64.
[10]
Cifuentes, C., Lewis, B., and Ung, D. 2002. Walkabout --- a retargetable dynamic binary translation framework. In Procof 4th Workshop on Binary Translation.
[11]
Cmelik, R.F., and Keppel, D. 1994. Shade: A fast instruction-set simulator for execution profiling. ACM SIGMETRICS Performance Evaluation Review, 22(1) (May), 128--137.
[12]
Connectix. Virtual PC. http://www.microsoft.com/windows/virtualpc/default.mspx.
[13]
Czajkowski, G., Daynès, L., and Nystrom, N. 2002. Code sharing among virtual machines. In Procof 16th European Conference on Object-Oriented Programming (ECOOP 2002), 155--177.
[14]
Dehnert, J.C., Grant, B.K., Banning, J.P., Johnson, R., Kistler, T., Klaiber, A., and Mattson, J. 2003. The Transmeta code morphing software: Using speculation, recovery, and adaptive retranslation to address real-life challenges. In Procof International Symposium on Code Generation and Optimization (CGO'03), 15--24.
[15]
Desoli, G., Mateev, N., Duesterwald, E., Faraboschi, P., and Fisher, J.A. 2002. DELI: A new run-time control point. In Procof 35th International Symposium on Microarchitecture (MICRO'02), 257--268.
[16]
Deutsch, L.P., and Schiffman, A.M. 1984. Efficient implementation of the Smalltalk-80 system. In Procof ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '84), 297--302.
[17]
Ebcioglu, K., and Altman, E. 1997. DAISY: Dynamic compilation for 100% architectural compatibility. In balance Procof 24th International Symposium on Computer Architecture (ISCA '97), 26--37.
[18]
Hazelwood, K., and Smith, M.D. 2003. Characterizing inter-execution and inter-application optimization persistence. In Workshop on Exploring the Trace Space for Dynamic Optimization Techniques, 51--58.
[19]
Hölzle, U. 1994. Adaptive Optimization for Self: Reconciling High Performance with Exploratory Programming. PhD thesis, Stanford University.
[20]
Kennedy, A., and Syme, D. 2002. Combining generics, pre-compilation and sharing between software-based processes. In Procof Second workshop on Semantics, Program Analysis and Computing Environments for Memory Management (SPACE'04), 257--268.
[21]
Klaiber, A., 2000. The technology behind Crusoe processors. Transmeta Corporation, Jan. http://www.transmeta.com/crusoe/download/pdf/crusoetechwp.pdf.
[22]
Larus, J., and Schnarr, E. 1995. EEL: Machine-independent executable editing. In Procof ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '95), 291--300.
[23]
Li, J., Zhang, P., and Etzion, O. 2005. Module-aware translation for real-life desktop applications. In Procof 1st ACM/USENIX International Conference on Virtual Execution Environments (VEE '05), ACM Press, New York, NY, USA, 89--99.
[24]
Luk, C.-K., Cohn, R., Muth, R., Patil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V.J., and Hazelwood, K. 2005. Pin: Building customized program analysis tools with dynamic instrumentation. In Procof ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'05), 190--200.
[25]
Magnusson, P.S., Dahlgren, F., Grahn, H., Karlsson, M., Larsson, F., Lundholm, F., Moestedt, A., Nilsson, J., Stenström, P., and Werner, B. 1998. SimICS/sun4m: A virtual workstation. In Procof USENIX Annual Technical Conference, 119--130.
[26]
Nethercote, N., and Seward, J. 2003. Valgrind: A program supervision framework. In Procof 3rd Workshop on Runtime Verification (RV'03).
[27]
Reddi, V.J., Connors, D., and Cohn, R.S. 2005. Persistence in dynamic code transformation systems. SIGARCH Computer Architecture News, 33(5), 69--74.
[28]
Reddi, V.J., Connors, D., Cohn, R., and Smith, M.D. 2007. Persistent code caching: Exploiting code reuse across executions and applications. In Procof International Symposium on Code Generation and Optimization (CGO '07), 74--88.
[29]
Robinson, A., 2001. Why dynamic translation? Transitive Technologies Ltd., May. http://www.transitive.com/documents/Why_Dynamic_Translation1.pdf.
[30]
Romer, T., Voelker, G., Lee, D., Wolman, A., Wong, W., Levy, H., and Bershad, B. 1997. Instrumentation and optimization of Win32/Intel executables using Etch. In Procof USENIX Windows NT Workshop, 1--7.
[31]
Scott, K., Kumar, N., Velusamy, S., Childers, B., Davidson, J., and Soffa, M.L. 2003. Reconfigurable and retargetable software dynamic translation. In Procof International Symposium on Code Generation and Optimization (CGO '03), 36--47.
[32]
Sridhar, S., Shapiro, J.S., Northup, E., and Bungale, P.P. 2006. HDTrans: An open source, low-level dynamic instrumentation system. In Procof 2nd International Conference on Virtual Execution Environments (VEE '06), ACM Press, New York, NY, USA, 175--185.
[33]
Srivastava, A., and Eustace, A. 1994. ATOM: A system for building customized program analysis tools. In Procof ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '94), 196--205.
[34]
Srivastava, A., Edwards, A., and Vo, H. 2001. Vulcan: Binary transformation in a distributed environment. Tech. Rep. MSR-TR-2001-50, Microsoft Research, Apr.
[35]
Sun Microsystems. The Java HotSpot performance engine architecture. http://java.sun.com/products/hotspot/whitepaper.html.
[36]
Waskiewicz, J., 2007. Dyninst object serialization/deserialization, May. http://www.paradyn.org/PCW2007/paradyn\verb+_+\\presentations/pdfs/jaw.pdf.
[37]
Whitaker, A., Shaw, M., and Gribble, S. 2002. Denali: Lightweight virtual machines for distributed and networked applications. In Procof USENIX Annual Technical Conference, 195--209.
[38]
Witchel, E., and Rosenblum, M. 1996. Embra: Fast and flexible machine simulation. In Procof 1996 ACM SIGMETRICS Conference on Measurement and Modeling of Computer Systems, 68--79.
[39]
Zhang, C.X., Wang, Z., Gloy, N.C., Chen, J.B., and Smith, M.D. 1997. System support for automated profiling and optimization. In Procof 16th ACM Symposium on Operating System Principles (SOSP'97), 15--26.
[40]
Zheng, C., and Thompson, C. 2000. PA-RISC to IA-64: Transparent execution, no recompilation. IEEE Computer, 33(3) (Mar.), 47--53.

Cited By

View all
  • (2023)Efficient Dynamic Binary Translation with Accumulative Persistent Code Caching2022 IEEE 28th International Conference on Parallel and Distributed Systems (ICPADS)10.1109/ICPADS56603.2022.00066(458-466)Online publication date: Jan-2023
  • (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
  • (2019)Improving Startup Performance in Dynamic Binary Translators2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP)10.1109/EMPDP.2019.8671644(67-74)Online publication date: Feb-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
VEE '08: Proceedings of the fourth ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
March 2008
190 pages
ISBN:9781595937964
DOI:10.1145/1346256
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 ACM 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: 05 March 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. binary translation
  2. dynamic instrumentation
  3. software code cache
  4. tool scalability

Qualifiers

  • Research-article

Conference

VEE '08

Acceptance Rates

VEE '08 Paper Acceptance Rate 18 of 57 submissions, 32%;
Overall Acceptance Rate 80 of 235 submissions, 34%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Efficient Dynamic Binary Translation with Accumulative Persistent Code Caching2022 IEEE 28th International Conference on Parallel and Distributed Systems (ICPADS)10.1109/ICPADS56603.2022.00066(458-466)Online publication date: Jan-2023
  • (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
  • (2019)Improving Startup Performance in Dynamic Binary Translators2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP)10.1109/EMPDP.2019.8671644(67-74)Online publication date: Feb-2019
  • (2018)Reusing the Optimized Code for JavaScript Ahead-of-Time CompilationACM Transactions on Architecture and Code Optimization10.1145/329105615:4(1-20)Online publication date: 19-Dec-2018
  • (2018)ShareJIT: JIT code cache sharing across processes and its practical implementationProceedings of the ACM on Programming Languages10.1145/32764942:OOPSLA(1-23)Online publication date: 24-Oct-2018
  • (2017)HyperMAMBO-X64ACM SIGPLAN Notices10.1145/3140607.305075652:7(228-241)Online publication date: 8-Apr-2017
  • (2017)Enabling Cross-ISA Offloading for COTS BinariesProceedings of the 15th Annual International Conference on Mobile Systems, Applications, and Services10.1145/3081333.3081337(319-331)Online publication date: 16-Jun-2017
  • (2017)HyperMAMBO-X64Proceedings of the 13th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments10.1145/3050748.3050756(228-241)Online publication date: 8-Apr-2017
  • (2014)SPTUProceedings of International Conference on Systems and Storage10.1145/2611354.2611368(1-12)Online publication date: 30-Jun-2014
  • (2013)SPIREACM SIGPLAN Notices10.1145/2517326.245151648:7(1-12)Online publication date: 16-Mar-2013
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media