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.
- Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. 1986. Compilers: Principles, Techniques, and Tools. AW, Boston, MA.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- AUTOSAR. 2009. Specification of Operating System (Version 4.0.0). Technical Report. Automotive Open System Architecture GbR.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Greg Bollella, Benjamin Brosgol, James Gosling, Peter Dibble, Steve Furr, and Mark Turnbull. 2000. The Real-Time Specification for Java (1st ed.). AW.Google Scholar
- G. Cellere, et al. 2009. Neutron-induced soft errors in advanced flash memories. In IEDM 2008. IEEE.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Clemens Lang. 2012. Improved Stack Allocation Using Escape Analysis in the KESO Multi-JVM. (Oct. 2012).Google Scholar
- Clemens Lang. 2014. Compiler-Assisted Memory Management Using Escape Analysis in the KESO JVM. (June 2014).Google Scholar
- Peeter Laud. 2001. Analysis for object inlining in Java. In Proceedings of the Joses Workshop. 1--8.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Young Gil Park and Benjamin Goldberg. 1992. Escape analysis on lists. SIGPLAN Not. 27, 7 (1992), 116--127. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Isabella Stilkerich. 2016. Cooperative Memory Management in Safety-Critical Embedded Systems. Ph.D. Dissertation. Friedrich-Alexander University Erlangen-Nuremberg.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- Robert Tarjan. 1972. Depth first search and linear graph algorithms. SIAM J. Comput. 1, 2 (1972), 146--160. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
The Perfect Getaway: Using Escape Analysis in Embedded Real-Time Systems
Recommendations
Design and Implementation of an Escape Analysis in the Context of Safety-Critical Embedded Systems
The use of a managed, type-safe language such as Standard ML, Ada Ravenscar, or Java in hard real-time and embedded systems offers productivity, safety, and dependability benefits at a reasonable cost. Static software systems, that is systems in which ...
Side-effect analysis with fast escape filter
SOAP '12: Proceedings of the ACM SIGPLAN International Workshop on State of the Art in Java Program analysisSide-effect analysis is a fundamental static analysis used to determine the memory locations modified or used by each program entity. For the programs with pointers, the analysis can be very imprecise. To improve the precision of side-effect analysis, ...
KESO: an open-source multi-JVM for deeply embedded systems
JTRES '10: Proceedings of the 8th International Workshop on Java Technologies for Real-Time and Embedded SystemsJava still is a rather exotic language in the field of real-time and particularly embedded systems, though it could provide productivity and especially safety and dependability benefits over the dominating language C. The reasons for the lack of ...






Comments