Skip to main content
Log in

Eliminating object reference checks by escape analysis on real-time Java virtual machine

  • Published:
Cluster Computing Aims and scope Submit manuscript

Abstract

The real-time specification for Java (RTSJ) makes Java to be a real-time programming language. However, the RTSJ’s memory management system is more complicated than J2SE’s. The assignment rules of RTSJ, which prevent the creation of dangling references, must be checked by real-time Java virtual machines (JVMs) at run-time. These frequent run-time object reference checks introduce significant time overheads and unpredictable execution time, which has great impact on real-time systems. This paper presents an equivalence class based, context sensitive and flow insensitive escape analysis algorithm that effectively eliminates unnecessary run-time reference checkpoints of RTSJ programs. The optimization framework has been implemented in an open-source real-time JVM namely jRate and evaluated by CD\(_x\), a relative authority real-time Java benchmark suite. The results show that this optimization algorithm eliminates more than 90% static reference checkpoints, removes about 50% run-time reference checkpoints on average , and improves the run-time performance of average 3.13%, max 8.93%.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

References

  1. Belliardi, R., Brosgol, B., Dibble, P., Holmes, D., Wellings, A.: Real-time specification for Java Version. 1.0.2. 2006. http://www.rtsj.org/docs/rtsj_1.0.2_spec.pdf (2015)

  2. Higuera-Toledano, M. T.: About 15 years of real-time Java. In: Proceeding of the 10th International Workshop on Java Technologies for Real-time and Embedded Systems, pp. 34–43 (2012)

  3. Dvorak, D., Bollella, G., Canham, T., Carson, V., Champlin, V., Giovannoni, B., Indictor, M., Meyer, K., Murray, A., Reinholtz, K.: Project golden gate: towards real-time Java in space missions. In: Proceeding the 7th IEEE International Symposium on Object-Oriented Real-time Distributed Computing, pp. 1 5–22 (2004)

  4. Baker, J., Cunei, A., Flack, C., Pizlo, F., Prochazka, M., Vitek, J., Armbruster, A., Pia, E., Holmes, E.: A real-time Java virtual machine for avionics-an experience report. In: Proceeding of the 12th IEEE Real Time Technology and Applications Symposium, pp. 384–396 (2006)

  5. Armbruster, A., Baker, J., Cunei, A., Flack, C., Holmes, D., Pizlo, F., Pla, E., Rochazka, M., Vitek, J.: A real-time Java virtual machine with applications in avionics. ACM Transactions on Embedded Computing Systems, vol. 7(1), Article No. 5 (2007)

  6. Robertz, S, G., Henriksson, R., Nilsson, K., Blomdell, A., Tarasov, I.: Using real-time Java for industrial robot control. In: Proceeding the 5th International workshop on Java Technologies for Real-Time and Embedded Systems. pp. 104–110 (2007)

  7. Auerbach, J., Bacon, D. F., Blainey, B., Cheng, P., Dawson, M., Fulton, M., Grove, D., Hart, D., Stoodley, M.: Design and implementation of a comprehensive real-time Java virtual machine. In: Proceeding of the 7th ACM & IEEE International Conference on Embedded software, pp. 249–258 (2007)

  8. IBM.: The IBM WebSphere real time vritual machine. http://www-03.ibm.com/software/products/en/real-time (2015)

  9. Luckow, K. S., Thomsen, B., Korsholm, S. E.: HVMTP: a time predictable and portable Java virtual machine for hard real-time embedded systems. In: Proceeding of the 12th International Workshop on Java Technologies for Real-Time and Embedded Systems, pp. 107–116 (2014)

  10. AICAS.: The JamaicaVM virtual machine. http://www.aicas.com (2015)

  11. Bruno, E.J., Bollella, G.: Real-Time Java Programming: With Java RTS, pp. 63–92. Prentice Hall, Upper Saddle River (2009)

    Google Scholar 

  12. Corsaro, A., Schmidt, D.C.: The Design and Performance of the jRate Real-Time Java Implementation, pp. 900–921. Spring, Berlin (2002)

    MATH  Google Scholar 

  13. Corsaro, A.: Techniques and patterns for safe and efficient real-time middleware. PhD thesis, Washington University (2004)

  14. Pizlo, F., Ziarek, L., Vitek, J.: Real time Java on resource-constrained platforms with Fiji VM. In: Proceeding the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems, pp. 110–119 (2009)

  15. Higuera, M. T.: Region-based memory management for real-time Java. In: Proceeding the 4th IEEE International Symposium on Object-Oriented Real-Time Distributed Computing, pp. 387–394 (2001)

  16. Pizlo, F., Vitek, J.: Memory management for real-time Java: state of Art. In: Proceeding the 11th International Symposium on Object-Oriented Real-Time Distributed Computing. pp. 248–254 (2008)

  17. Andreae, C., Coady, Y., Gibbs, C., Noble, J., Vitek, J., Zhao, T.: Scoped types and aspects for real-time Java. In: Proceeding the 20th European Conference on Object-Oriented Programming, pp. 124–147 (2006)

  18. Basanta-Val, P., Garcia-Valls, M., Estevez-Ayres, I., Delgado-Kloos, C.: Extended portal: violating the assignment rule and enforcing the single parent rule. In: Proceeding of the 4th International Workshop on Java Technologies for Real-Time and Embedded Systems, pp. 30–37 (2006)

  19. Higuera-Toledano, M. T.: Making stronger and flexible the single parent rule in the real-time specification of Java. In: Proceeding of the 6th International Workshop on Java Technologies for Real-Time and Embedded Systems, pp. 19-28 (2008)

  20. Higuera-Toledano, M. T.: Name-based write barriers in real-time Java. In: Proceeding the 7th IEEE International Conference on Computer and Information Technology, pp. 781–786 (2017)

  21. Higuera-Toledano, M. T., de Miguel, M. A.: Dynamic detection of access errors and illegal references in RTSJ. In: Procedding 8th IEEE Symposium. Real-Time and Embedded Technology and Applications Symposium, pp. 101–110 (2002)

  22. Higuera-toledano M. T.: Hardware-based solution detecting illegal reference in real-time Java. In: Proceeding the 15th Euromicro Conference on Real-Time System, pp. 229–237 (2013)

  23. Corsaro, A., Cytron, R. K.: Efficient memory-reference checks for real-time Java. In: Proceeding of the 2003 ACM SIGPLAN Conference on Language, Compiler, and Tool for Embedded Systems, pp. 51–58 (2003)

  24. Boyapati, C., Salcianu, A., Beebee, Jr. W., Rinard, M.: Ownership types for safe region-based memory management in real-time Java. In: Proceeding ACM SIGPLAN 2003 Conference Programming Language Design and Implementation, pp. 324–337 (2003)

  25. Cunei, A., Vitek, J.: A new approach to real-time checkpointing. In: Proceeding 2nd International Conference Virtual Execution Environments, pp. 68–77 (2006)

  26. Steensgaard, B.: Points-to analysis in almost linear time. In: Proceeding the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 32–41 (1996)

  27. Das, M.: Unification-based pointer analysis with directional assignments. In: Proceeding the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 35–46 (2000)

  28. Andersen, L. O.: Program analysis and specialization for the C programming language. PhD thesis, Department of Computer Science, University of Copenhagen (1994)

  29. Hardekopf, B., Lin, C.: The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. In: Proceeding of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 290–299 (2007)

  30. Pearce. D. J., Kelly, P. H. J., Hankin, C.: Efficient field-sensitive pointer analysis of C. ACM Transactions on Programming Languages and Systems, vol. 30(1), Article No. 4 (2007)

  31. Pereira, F. M. Q., Berlin. D.: Wave propagation and deep propagation for pointer analysis. In: Proceeding of the 7th IEEE/ACM International Symposium on Code Generation and Optimization, pp. 126–135 (2009)

  32. Choi, J.D., Gupta, M., Serrano, M.J., Sreedhar, V.C.: Stack allocation and synchronization optimizations for Java using escape analysis. ACM Trans. Progr. Lang. Syst. 25(6), 876–910 (2003)

    Article  Google Scholar 

  33. Ruf, E.: Effective synchronization removal for Java. In: Proceeding the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 208–218 (2000)

  34. Shi, X.H., Wu, G., Jin, M.Z., Lueh, G.Y., Liu, C., Wang, L.: Escape analysis: embrace the open world. J. Softw. 19(3), 522–532 (2008)

    Article  Google Scholar 

  35. Kotzmann, T., Mössenbock, H.: Escape analysis in the context of dynamic compilation and deoptimization. In: Proceeding the 1st ACM/USENIX International Conference on Virtual Execution Environments, pp. 111–120 (2005)

  36. Lee, K., Fang, X., Midkiff, S. P.: Practical escape analyses: how good are they? In: Proceeding the 3rd International Conference on Virtual Execution Environments, pp. 180–190 (2007)

  37. Yan, D., Xu, G., Rountev, A.: Demand-driven context-sensitive alias analysis for Java. In: Proceeding of the 2011 International Symposium on Software Testing and Analysis, pp. 155–165 (2011)

  38. Wu, J., Hu, G., Tang, Y., Yang, J.: . Effective dynamic detection of alias analysis errors. In: Proceeding of the 2013 9th Joint Meeting on Foundations of Software Engineering, pp. 279–289 (2013)

  39. Kalibera, T., Hagelberg, J., Pizlo, F., Plsek, A., Titzer, B., Vitek, J.: CD\(_{x}\): Family of real-time Java benchmarks. In: Proceeding of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems, pp. 41–50 (2009)

  40. Kalibera, T., Parizek, P., Haddad, G., Leavens, G. T., Vitek, J.: Challenge benchmarks for verification of real-time programs. In: Proceeding of the 4th ACM SIGPLAN Workshop on Programming Languages Meets Program Verification, pp. 57–62 (2010)

Download references

Acknowledgements

The work was supported by the National Natural Science Foundation of China under Grant No. 61272166, and the State Key Laboratory of Software Development Environment of China No. SKLSDE-2016ZX-08.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiaohua Shi.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Feng, W., Shi, X. & Wang, W. Eliminating object reference checks by escape analysis on real-time Java virtual machine. Cluster Comput 22 (Suppl 4), 9323–9334 (2019). https://doi.org/10.1007/s10586-018-2145-8

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10586-018-2145-8

Keywords

Navigation