skip to main content
research-article

The Perfect Getaway: Using Escape Analysis in Embedded Real-Time Systems

Published:11 May 2017Publication History
Skip Abstract Section

Abstract

The use of a managed, type-safe language such as Java in real-time and embedded systems offers productivity and, in particular, safety and dependability benefits at a reasonable cost. It has been shown for commodity systems that Escape Analysis (EA) enables a set of useful optimizations, and benefits from the properties of a type-safe language. In this article, we explore the application of escape analysis in KESO [Stilkerich et al. 2012], a Java ahead-of-time compiler targeting embedded real-time systems. We present specific applications of EA for embedded programs that go beyond the widely known stack-allocation and synchronization optimizations such as extended remote-procedure-call (RPC) support for software-isolated applications, automated inference of immutable data, or improved upper space and time bounds for worst-case estimations.

References

  1. Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. 1986. Compilers: Principles, Techniques, and Tools. AW, Boston, MA.Google ScholarGoogle Scholar
  2. Mark Aiken, Manuel Fähndrich, Chris Hawblitzel, Galen Hunt, and James Larus. 2006. Deconstructing process isolation. In Proceedings of the 2006 Workshop on Memory System Performance and Correctness (MSPC’06). ACM, New York, 1--10. DOI:http://dx.doi.org/10.1145/1178597.1178599 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Joshua Auerbach, David F. Bacon, Daniel Iercan, Christoph M. Kirsch, V. T. Rajan, Harald Röck, and Rainer Trummer. 2009. Low-latency time-portable real-time programming with exotasks. ACM Trans. Embed. Comp. Syst. 8, 2 (2009), 1--48. DOI:http://dx.doi.org/10.1145/1457255.1457262 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. AUTOSAR. 2009. Specification of Operating System (Version 4.0.0). Technical Report. Automotive Open System Architecture GbR.Google ScholarGoogle Scholar
  5. Bruno Blanchet. 1998. Escape analysis: Correctness proof, implementation and experimental results. In Proceedings of the 25th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL’98). 25--37. DOI:http://dx.doi.org/10.1145/268946.268949 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bruno Blanchet. 2003. Escape analysis for Java: Theory and practice. ACM Trans. Program. Lang. Syst. 25, 6 (Nov. 2003), 713--775. DOI:http://dx.doi.org/10.1145/945885.945886 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Greg Bollella, Benjamin Brosgol, James Gosling, Peter Dibble, Steve Furr, and Mark Turnbull. 2000. The Real-Time Specification for Java (1st ed.). AW.Google ScholarGoogle Scholar
  8. G. Cellere, et al. 2009. Neutron-induced soft errors in advanced flash memories. In IEDM 2008. IEEE.Google ScholarGoogle Scholar
  9. Ramkrishna Chatterjee, Barbara G. Ryder, and William A. Landi. 1999. Relevant context inference. In Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’99). ACM, New York, 133--146. DOI:http://dx.doi.org/10.1145/292540.292554 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jong-Deok Choi, Michael Burke, and Paul Carini. 1993. Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’93). ACM, New York, 232--245. DOI:http://dx.doi.org/10.1145/158511.158639 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. 1999. Escape analysis for Java. In 14th ACM Conference on OOP, Systems, Languages, and Applications (OOPSLA’99). ACM, New York, 1--19. DOI:http://dx.doi.org/10.1145/320384.320386 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Jong-Deok Choi, Manish Gupta, Mauricio J. Serrano, Vugranam C. Sreedhar, and Samuel P. Midkiff. 2003. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Trans. Program. Lang. Syst. 25, 6 (Nov. 2003), 876--910. DOI:http://dx.doi.org/10.1145/945885.945892 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Daniel Danner, Rainer Müller, Wolfgang Schröder-Preikschat, Wanja Hofer, and Daniel Lohmann. 2014. Safer sloth: Efficient, hardware-tailored memory protection. In Proceedings of the 20th IEEE International Symposium on Real-Time and Embedded Technology and Applications (RTAS’14). IEEE, 37--47. Google ScholarGoogle ScholarCross RefCross Ref
  14. Julian Dolby. 1997. Automatic inline allocation of objects. In Proceedings of the ACM SIGPLAN 1997 Conference on Programming Language Design and Implementation (PLDI’97). ACM, New York, 7--17. DOI:http://dx.doi.org/10.1145/258915.258918 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Julian Dolby and Andrew Chien. 2000. An automatic object inlining optimization and its evaluation. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation (PLDI’00). ACM, New York, 345--357. DOI:http://dx.doi.org/10.1145/349299.349344 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Julian Dolby and Andrew A. Chien. 1998. An evaluation of automatic object inline allocation techniques. In Proceedings of the 13th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA’98). ACM, New York, 1--20. DOI:http://dx.doi.org/10.1145/286936.286943 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Tamar Domani, Gal Goldshtein, Elliot K. Kolodner, Ethan Lewis, Erez Petrank, and Dafna Sheinwald. 2002. Thread-local heaps for Java. In Proceedings of the 3rd International Symposium on Memory Management (ISMM’02). ACM, New York, 76--87. DOI:http://dx.doi.org/10.1145/512429.512439 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Maryam Emami, Rakesh Ghiya, and Laurie J. Hendren. 1994. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation (PLDI’94). ACM, New York, 242--256. DOI:http://dx.doi.org/10.1145/178243.178264 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Christoph Erhardt, Simon Kuhnle, Isabella Stilkerich, and Wolfgang Schröder-Preikschat. 2014. The final Frontier: Coping with Immutable Data in a JVM for Embedded Real-Time Systems. In Proceedings of the 12th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES’14). ACM, New York, 97--106. DOI:http://dx.doi.org/10.1145/2661020.2661024 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Sanjay Ghemawat, Keith H. Randall, and Daniel J. Scales. 2000. Field analysis: Getting useful and low-cost interprocedural information. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation (PLDI’00). ACM, New York, 334--344. DOI:http://dx.doi.org/10.1145/349299.349343 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Rakesh Ghiya and Laurie J. Hendren. 1996. Connection analysis: A practical interprocedural heap analysis for C. Int. J. Parallel Program. 24, 6 (Dec. 1996), 547--578. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Benjamin Goldberg and Young Gil Park. 1990. Higher order escape analysis: Optimizing stack allocation in functional program implementations. In ESOP, Lecture Notes in Computer Science, Vol. 432, Neil D. Jones (Ed.). Springer, 152--160.Google ScholarGoogle Scholar
  23. Tomas Kalibera, Jeff Hagelberg, Filip Pizlo, Ales Plsek, Ben Titzer, and Jan Vitek. 2009. CDx: A family of real-time Java benchmarks. In Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES’09). ACM, New York, 41--50. DOI:http://dx.doi.org/10.1145/1620405.1620412 Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Stephan Korsholm. 2011. Flash memory in embedded Java programs. In Proceedings of the 9th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES’11). ACM, New York, 116--124. DOI:http://dx.doi.org/10.1145/2043910.2043930 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. William Landi and Barbara G. Ryder. 1992. A safe approximate algorithm for interprocedural aliasing. In Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation (PLDI’92). ACM, New York, 235--248. DOI:http://dx.doi.org/10.1145/143095.143137 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Clemens Lang. 2012. Improved Stack Allocation Using Escape Analysis in the KESO Multi-JVM. (Oct. 2012).Google ScholarGoogle Scholar
  27. Clemens Lang. 2014. Compiler-Assisted Memory Management Using Escape Analysis in the KESO JVM. (June 2014).Google ScholarGoogle Scholar
  28. Peeter Laud. 2001. Analysis for object inlining in Java. In Proceedings of the Joses Workshop. 1--8.Google ScholarGoogle Scholar
  29. Kyungwoo Lee, Xing Fang, and Samuel P. Midkiff. 2007. Practical escape analyses: How good are they? In Proceedings of the 3rd International Conference on Virtual Execution Environments (VEE’07). ACM, New York, 180--190. DOI:http://dx.doi.org/10.1145/1254810.1254836 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Ondrej Lhoták and Laurie Hendren. 2002. Run-time evaluation of opportunities for object inlining in Java. In Proceedings of the 2002 Joint ACM-ISCOPE Conference on Java Grande (JGI’02). ACM, New York, 175--184. DOI:http://dx.doi.org/10.1145/583810.583830 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Young Gil Park and Benjamin Goldberg. 1992. Escape analysis on lists. SIGPLAN Not. 27, 7 (1992), 116--127. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Filip Pizlo, Lukasz Ziarek, Ethan Blanton, Petr Maj, and Jan Vitek. 2010a. High-level programming of embedded hard real-time devices. In Proceedings of the ACM SIGOPS/EuroSys Eur. Conference on Computer Systems 2010 (EuroSys’10). ACM, New York, 69--82. DOI:http://dx.doi.org/10.1145/1755913.1755922 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Filip Pizlo, Lukasz Ziarek, Petr Maj, Antony L. Hosking, Ethan Blanton, and Jan Vitek. 2010b. Schism: Fragmentation-tolerant real-time garbage collection. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’10). ACM, New York, 146--159. DOI:http://dx.doi.org/10.1145/1806596.1806615 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Martin Schoeberl, Stephan Korsholm, Christian Thalinger, and Anders P. Ravn. 2008. Hardware objects for Java. In Proceedings of the 11th IEEE International Symposium on OO Real-Time Distributed Computing (ISORC’08). IEEE, 445--452. DOI:http://dx.doi.org/10.1109/ISORC.2008.63 Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Martin Schoeberl, Stephan Korsholm, Kalibera Tomas, and Anders P. Ravn. 2009. A hardware abstraction layer in Java. In ACM Trans. Embedd. Comput. Syst., Vol. 5. ACM, 1--42.Google ScholarGoogle Scholar
  36. Fridtjof Siebert. 2007. Realtime garbage collection in the JamaicaVM 3.0. In Proceedings of the 5th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES’07). ACM, New York, 94--103. DOI:http://dx.doi.org/10.1145/1288940.1288954 Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Vugranam C. Sreedhar, Roy Dz-Ching Ju, David M. Gillies, and Vatsa Santhanam. 1999. Translating out of static single assignment form. In Proceedings of the 6th International Symposium on Static Analysis (SAS’99). Springer, Heidelberg, 194--210. Google ScholarGoogle ScholarCross RefCross Ref
  38. Bjarne Steensgaard. 1996. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’96). ACM, New York, 32--41. DOI:http://dx.doi.org/10.1145/237721.237727 Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Isabella Stilkerich. 2016. Cooperative Memory Management in Safety-Critical Embedded Systems. Ph.D. Dissertation. Friedrich-Alexander University Erlangen-Nuremberg.Google ScholarGoogle Scholar
  40. Isabella Stilkerich, Clemens Lang, Christoph Erhardt, and Michael Stilkerich. 2015. A practical getaway: Applications of escape analysis in embedded real-time systems. In Proceedings of the 16th ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems 2015 CD-ROM (LCTES’15). ACM, New York, Article 4, 11 pages. DOI:http://dx.doi.org/10.1145/2670529.2754961 Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Isabella Stilkerich, Michael Strotz, Christoph Erhardt, Martin Hoffmann, Daniel Lohmann, Fabian Scheler, and Wolfgang Schröder-Preikschat. 2013. A JVM for soft-error-prone embedded systems. In Proceedings of the 2013 ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems (LCTES’13). ACM, New York, 21--32. DOI:http://dx.doi.org/10.1145/2465554.2465571Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Isabella Stilkerich, Michael Strotz, Christoph Erhardt, and Michael Stilkerich. 2014a. RT-LAGC: Fragmentation-Tolerant Real-Time Memory Management Revisited. In Proceedings of the 12th International Workshop on Java Technologies for Real-Time and Embedded Systems. ACM, New York, 87--96. DOI:http://dx.doi.org/10.1145/2661020.2661031 Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Isabella Stilkerich, Philip Taffner, Christoph Erhardt, Christian Dietrich, Christian Wawersich, and Michael Stilkerich. 2014b. Team Up: Cooperative memory management in embedded systems. In Proceedings of the 2014 International Conference on Compilers, Architectures, and Synthesis for Embedded Systems (CASES’14). ACM, New York, Article 10. DOI:http://dx.doi.org/10.1145/2656106.2656129 Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Michael Stilkerich. 2006. An OSEK Operating System Interface and Memory Management for Java. Diploma thesis (DA-I4-2006-14), University of Erlangen-Nuremberg, Germany. (Aug. 2006).Google ScholarGoogle Scholar
  45. Michael Stilkerich. 2012. Memory Protection at Option—Application-Tailored Memory Safety in Safety-Critical Embedded Systems. Ph.D. dissertation. Friedrich-Alexander University Erlangen-Nuremberg.Google ScholarGoogle Scholar
  46. Michael Stilkerich, Isabella Thomm, Christian Wawersich, and Wolfgang Schröder-Preikschat. 2012. Tailor-made JVMs for statically configured embedded systems. Concurr. Comput.: Pract. Exper. 24, 8 (2012), 789--812. DOI:http://dx.doi.org/10.1002/cpe.1755 Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Robert Tarjan. 1972. Depth first search and linear graph algorithms. SIAM J. Comput. 1, 2 (1972), 146--160. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Mark N. Wegman and F. Kenneth Zadeck. 1991. Constant propagation with conditional branches. ACM Trans. Program. Lang. Syst. 13, 2 (April 1991), 181--210. DOI:http://dx.doi.org/10.1145/103135.103136 Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Robert P. Wilson and Monica S. Lam. 1995. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation (PLDI’95). ACM, New York, 1--12. DOI:http://dx.doi.org/10.1145/207110.207111 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The Perfect Getaway: Using Escape Analysis in Embedded Real-Time Systems

          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

          Full Access

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!