skip to main content
10.1145/1772954.1772968acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

A self-adjusting code cache manager to balance start-up time and memory usage

Published:24 April 2010Publication History

ABSTRACT

In virtual machines for embedded devices that use just-in-time compilation, the management of the code cache can significantly impact performance in terms of both memory usage and start-up time. Although improving memory usage has been a common focus for system designers, start-up time is often overlooked. In systems with constrained resources, however, these two performance metrics are often at odds and must be considered together. In this paper, we present an adaptive self-adjusting code cache manager to improve performance with respect to both start-up time and memory usage. It balances these concerns by detecting changes in method compilation rates, resizing the cache after each pitching event. We conduct experiments to validate our proposed system and quantify the impacts that different code cache management techniques have on memory usage and start-up time through two oracle systems. Our results show that the proposed algorithm yields nearly the same start-up times as a hand-tuned oracle and shorter execution times than those of the SSCLI in eight out of ten applications. It also has lower memory usage over time in all but one application.

References

  1. D. Anthony, W. Srisaan, and M. Leung. An empirical study of the code pitching mechanism in the .NET Framework. Journal of Object Technology (Special issue: .NET Technologies 2005 Conference), 5:107--127, April 2006.Google ScholarGoogle Scholar
  2. V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A transparent dynamic optimization system. In ACM Conference on Programming Language Design and Implementation, pages 1--12, Vancouver, British Columbia, Canada, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Basu. .NET code pitching. http://blogs.msdn.com/abhinaba/ archive/2009/04/17/net-code-pitching.aspx, 2009.Google ScholarGoogle Scholar
  4. S. M. Blackburn, P. Cheng, and K. S. McKinley. Oil and Water? high performance garbage collection in Java with MMTk. In Proceedings of the International Conference on Software Engineering, pages 137--146, Scotland, UK, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Bruening and S. Amarasinghe. Maintaining consistency and bounding capacity of software code caches. In Proceedings of the International Symposium on Code Generation and Optimization, pages 74--85, Washington, DC, USA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Bruening and E. Duesterwald. Exploring optimal compilation unit shapes for an embedded just-in-time compiler. In Proceedings of the Workshop on Feedback-Directed and Dynamic Optimization (FDDO-3), Monterey, CA, USA, 2000.Google ScholarGoogle Scholar
  7. B. Cmelik and D. Keppel. Shade: a fast instruction-set simulator for execution profiling. In Proceedings of the Conference on Measurement and Modeling of Computer Systems, pages 128--137, Nashville, Tennessee, USA, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. F. Cmelik and D. Keppel. Shade: A fast instruction set simulator for execution profiling. Technical report, Sun Microsystems, Inc., Mountain View, CA, USA, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. S. Dhodapkar and J. E. Smith. Managing multi-configuration hardware via dynamic working set analysis. In Proceedings of the International Symposium on Computer Architecture, pages 233--244, Anchorage, Alaska, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. S. Dhodapkar and J. E. Smith. Comparing program phase detection techniques. In Proceedings of the International Symposium on Microarchitecture, pages 217--227, San Diego, CA, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Duesterwald and V. Bala.Software profiling for hot path prediction: less is more. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pages 202--211, Cambridge, Massachusetts, USA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Duesterwald, C. Cascaval, and S. Dwarakadas. Characterizing and predicting program behavior and its variability. In International Conference on Parallel Architecture and Compilation Techniques, pages 220--231, New Orleans, Louisiana, USA, September 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Hind, V. Rajan, and P. Sweeney. The phase shift detection problem is non-monotonic. Technical Report Report RC23058, IBM Research, 2003.Google ScholarGoogle Scholar
  14. IBM. Jikes rvm. http://jikesrvm.sourceforge.net/, 2005.Google ScholarGoogle Scholar
  15. A. Kumar. Programming with .net compact framework 1.0 and SQL CE 2.0. http://www.c-sharpcorner.com/, 2005.Google ScholarGoogle Scholar
  16. D. Merrill and K. Hazelwood. Trace fragment selection within method-based jvms. In Proceedings of the International Conference on Virtual Execution Environments, pages 41--50, Seattle, WA, USA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Microsoft. Shared Source Common Language Infrastructure 1.2 Release. http://msdn.microsoft.com/net/sscli/, 2006.Google ScholarGoogle Scholar
  18. MSDN.Device memory management in the .NET Compact Framework. http://msdn.microsoft.com/en--us/library/s6x0c3a4 (VS.100).aspx, 2009.Google ScholarGoogle Scholar
  19. P. Nagpurkar, M. Hind, C. Krintz, P. F. Sweeney, and V. T. Rajan. Online phase detection algorithms. In International Symposium on Code Generation and Optimization, pages 111 -- 123, NYC, NY, USA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Nagpurkar and C. Krintz. Visualization and analysis of phased behavior in Java programs. In ACM International Conference on Principles and Practice of Programming in Java (PPPJ), Las Vegas, NV, USA, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S. Pratschner. .NET CF weblog. http://weblogs.asp.net/stevenpr/archive/2005/12/12/502978.aspx, 2005.Google ScholarGoogle Scholar
  22. T. Sherwood, E. Perelman, and B. Calder. Basic block distribution analysis to find periodic behavior and simulation points in applications. In International Conference on Parallel Architectures and Compilation Techniques, Barcelona, Spain, September 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. T. Sherwood, E. Perelman, G. Hamerly, and B. Calder. Automatically characterizing large scale program behavior. In 10th International Conference on Architectural Support for Programming Languages and Operating Systems, San Jose, CA, USA, October 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. Sherwood, S. Sair, and B. Calder. Phase tracking and prediction. In Proceedings of the 30th International Symposium on Computer Architectural (ISCA'03), pages 336--349, San Diega, CA, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Smith and R. Nair. Virtual Machines : Versatile Platforms for Systems and Processes. Morgan Kaufmann, San Francisco, CA, USA, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Smith. Overcoming the challenges to feedback directed optimization. In Proceedings of the ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization, pages 1--11, Boston, Massachusetts, USA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. D. Stutz, T. Neward, and G. Shilling. Shared Source CLI Essentials. O'Reilly and Associates, Sebastopol, CA, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Sun Microsystems. The CLDC HotSpot implementation virtual machine. http://java.sun.com/products/cldc/wp/CLDC HI WhitePaper.pdf, 2002.Google ScholarGoogle Scholar
  29. Sun Microsystems. The Java hotspot virtual machine, v1.4.1. http://java.sun.com/products/hotspot/, 2003.Google ScholarGoogle Scholar
  30. UC Santa Barbara RACE Lab. A Collection of Phoenix-Compatible C# Benchmarks. http://www.cs.ucsb.edu/ckrintz/racelab/PhxCSBenchmarks/index.html, 2006.Google ScholarGoogle Scholar
  31. J. Whaley. A portable sampling-based profiler for java virtual machines. In JAVA '00: Proceedings of the ACM 2000 conference on Java Grande, pages 78--87, San Francisco, California, United States, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. A. Wigley and S. Wheelwright. Microsoft .NET Compact Framework. Microsoft Press, Redmond, WA, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. L. Zhang and C. Krintz. Adaptive code unloading for resource-constrained JVMs. In Proceedings of the Conference on Languages, Compilers, and Tools for Embedded Systems, pages 155--164, Washington, DC, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. L. Zhang and C. Krintz. Profile-driven code unloading for resource-constrained JVMs. In International Conference on the Principles and Practice of Programming in Java, pages 83--90, Las Vegas, NV, USA, June 2004. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. L. Zhang and C. Krintz. The design, implementation, an evaluation of adaptive code unloading for resource-constrained environments. ACM Transactions on Architecture and Code Optimization, 2(2):131--164, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. B. Zorn. Ben's CLI benchmark. http://research.microsoft.com/~Zorn/benchmarks/default.htm, 2005.Google ScholarGoogle Scholar

Index Terms

  1. A self-adjusting code cache manager to balance start-up time and memory usage

      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
        CGO '10: Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimization
        April 2010
        300 pages
        ISBN:9781605586359
        DOI:10.1145/1772954

        Copyright © 2010 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: 24 April 2010

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate312of1,061submissions,29%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader