Advertisement

Cluster Computing

, Volume 22, Supplement 4, pp 9323–9334 | Cite as

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

  • Wei Feng
  • Xiaohua ShiEmail author
  • Wenru Wang
Article
  • 67 Downloads

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%.

Keywords

Escape analysis Object reference check Real-time Java 

Notes

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.

References

  1. 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. 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)Google Scholar
  3. 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)Google Scholar
  4. 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)Google Scholar
  5. 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)Google Scholar
  6. 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)Google Scholar
  7. 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)Google Scholar
  8. 8.
    IBM.: The IBM WebSphere real time vritual machine. http://www-03.ibm.com/software/products/en/real-time (2015)
  9. 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)Google Scholar
  10. 10.
    AICAS.: The JamaicaVM virtual machine. http://www.aicas.com (2015)
  11. 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. 12.
    Corsaro, A., Schmidt, D.C.: The Design and Performance of the jRate Real-Time Java Implementation, pp. 900–921. Spring, Berlin (2002)zbMATHGoogle Scholar
  13. 13.
    Corsaro, A.: Techniques and patterns for safe and efficient real-time middleware. PhD thesis, Washington University (2004)Google Scholar
  14. 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)Google Scholar
  15. 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)Google Scholar
  16. 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)Google Scholar
  17. 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)Google Scholar
  18. 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)Google Scholar
  19. 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)Google Scholar
  20. 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)Google Scholar
  21. 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)Google Scholar
  22. 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)Google Scholar
  23. 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)Google Scholar
  24. 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)Google Scholar
  25. 25.
    Cunei, A., Vitek, J.: A new approach to real-time checkpointing. In: Proceeding 2nd International Conference Virtual Execution Environments, pp. 68–77 (2006)Google Scholar
  26. 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)Google Scholar
  27. 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)Google Scholar
  28. 28.
    Andersen, L. O.: Program analysis and specialization for the C programming language. PhD thesis, Department of Computer Science, University of Copenhagen (1994)Google Scholar
  29. 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)Google Scholar
  30. 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)Google Scholar
  31. 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)Google Scholar
  32. 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)CrossRefGoogle Scholar
  33. 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)Google Scholar
  34. 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)CrossRefGoogle Scholar
  35. 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)Google Scholar
  36. 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)Google Scholar
  37. 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)Google Scholar
  38. 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)Google Scholar
  39. 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)Google Scholar
  40. 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)Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.State Key Laboratory of Software Development Environment, School of Computer Science and EngineeringBeihang UniversityBeijingChina

Personalised recommendations