skip to main content
10.1145/2602988.2602994acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
research-article

Allocation folding based on dominance

Published:12 June 2014Publication History

ABSTRACT

Memory management system performance is of increasing importance in today's managed languages. Two lingering sources of overhead are the direct costs of memory allocations and write barriers. This paper introduces it allocation folding, an optimization technique where the virtual machine automatically folds multiple memory allocation operations in optimized code together into a single, larger it allocation group. An allocation group comprises multiple objects and requires just a single bounds check in a bump-pointer style allocation, rather than a check for each individual object. More importantly, all objects allocated in a single allocation group are guaranteed to be contiguous after allocation and thus exist in the same generation, which makes it possible to statically remove write barriers for reference stores involving objects in the same allocation group. Unlike object inlining, object fusing, and object colocation, allocation folding requires no special connectivity or ownership relation between the objects in an allocation group. We present our analysis algorithm to determine when it is safe to fold allocations together and discuss our implementation in V8, an open-source, production JavaScript virtual machine. We present performance results for the Octane and Kraken benchmark suites and show that allocation folding is a strong performance improvement, even in the presence of some heap fragmentation. Additionally, we use four hand-selected benchmarks JPEGEncoder, NBody, Soft3D, and Textwriter where allocation folding has a large impact.

References

  1. C. Authors. Textwriter. http://www.chrome.org.Google ScholarGoogle Scholar
  2. J. M. Barth. Shifting garbage collection overhead to compile time. Communications of the ACM, 20(7):513--518, July 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. M. Blackburn and A. L. Hosking. Barriers: friend or foe? In Proceedingsof the International Symposium on Memory Management, ISMM '04, pages 143--151, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Dolby. Automatic inline allocation of objects. In Proceedings of the Conference on Programming Language Design and Implementation, PLDI '97, pages 7--17, New York, NY, USA, 1997. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Dolby and A. Chien. An automatic object inlining optimization and its evaluation. SIGPLAN Notices, 35(5):345--357, May 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Dolby and A. A. Chien. An evaluation of automatic object inline allocation techniques. In Proceeding of the Conference on Object- Oriented Programming Systems, Languages, and Applications, OOPSLA '98, pages 1--20. ACM Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Google Inc. Octane. https://developers.google.com/octane, 2013.Google ScholarGoogle Scholar
  8. Google Inc. V8. https://code.google.com/p/v8, 2013.Google ScholarGoogle Scholar
  9. Google Inc. V8 design. https://code.google.com/p/v8/design, 2013.Google ScholarGoogle Scholar
  10. I. Gouy. Nbody. http://shootout.alioth.debian.org.Google ScholarGoogle Scholar
  11. S. Z. Guyer and K. S. McKinley. Finding your cronies: static analysis for dynamic object colocation. In Proceedings of the Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA '04, pages 237--250, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. McNamee. Soft3d, 2008.Google ScholarGoogle Scholar
  13. Mozilla. Kraken. https://krakenbenchmark.mozilla.org, 2013.Google ScholarGoogle Scholar
  14. V. K. Nandivada and D. Detlefs. Compile-time concurrent marking write barrier removal. In Proceedings of the International Symposium on Code Generation and Optimization, CGO '05, pages 37--48,Washington, DC, USA, 2005. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. F. Pizlo, E. Petrank, and B. Steensgaard. Path specialization: reducing phased execution overheads. In Proceedings of the International Symposium on Memory Management, ISMM '08, pages 81--90, NewYork, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Ritter. JPEGEncoder. https://github.com/owencm/javascript-jpegencoder, 2009.Google ScholarGoogle Scholar
  17. I. Rogers. Reducing and eliding read barriers for concurrent garbage collectors. In Proceedings of the Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, ICOOOLPS '11, pages 5:1--5:5, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. T. Vechev and D. F. Bacon. Write barrier elision for concurrent garbage collectors. In Proceedings of the International Symposium on Memory Management, ISMM '04, pages 13--24, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Veldema, J. H. Ceriel, F. H. Rutger, and E. Henri. Object combining: A new aggressive optimization for object intensive programs. In Proceedings of the Conference on Java Grande, JGI '02, pages 165--174, New York, NY, USA, 2002. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Wimmer and M. Franz. Linear scan register allocation on SSA form. In Proceedings of the International Symposium on Code Generation and Optimization, CGO '10, pages 170--179, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. C.Wimmer and H.Mossenbosck. Automatic feedback-directed object fusing. ACM Transactions on Architecture and Code Optimization, 7(2):7:1--7:35, Oct. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. X. Yang, S. M. Blackburn, D. Frampton, and A. L. Hosking. Barriers reconsidered, friendlier still! In Proceedings of the International Symposium on Memory Management, ISMM '12, pages 37--48, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. K. Zee and M. Rinard. Write barrier removal by static analysis. In Proceedings of the Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA '02, pages 191--210, New York, NY, USA, 2002. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Allocation folding based on dominance

    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
    • Published in

      cover image ACM Conferences
      ISMM '14: Proceedings of the 2014 international symposium on Memory management
      June 2014
      136 pages
      ISBN:9781450329217
      DOI:10.1145/2602988
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 49, Issue 11
        ISMM '14
        November 2014
        121 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2775049
        • Editor:
        • Andy Gill
        Issue’s Table of Contents

      Copyright © 2014 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 June 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      ISMM '14 Paper Acceptance Rate11of22submissions,50%Overall Acceptance Rate72of156submissions,46%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader