Advertisement

Program transformations for light-weight CPU accounting and control in the Java virtual machine

A systematic review
  • Jarle Hulaas
  • Walter Binder
Article

Abstract

This article constitutes a thorough presentation of an original scheme for portable CPU accounting and control in Java, which is based on program transformation techniques at the bytecode level and can be used with every standard Java Virtual Machine. In our approach applications, middleware, and even the standard Java runtime libraries (i.e., the Java Development Kit) are modified in a fully portable way, in order to expose details regarding the execution of threads. These transformations however incur a certain overhead at runtime. Further contributions of this article are the systematic review of the origin of such overheads and the description of a new static path prediction scheme targeted at reducing them.

Keywords

Java Resource management Bytecode engineering Program transformations 

References

  1. 1.
    Back, G., Hsieh, W., Lepreau, J.: Processes in KaffeOS: Isolation, resource management, and sharing in Java. In: Proceedings of the Fourth Symposium on Operating Systems Design and Implementation (OSDI’2000), San Diego, CA, USA, Oct. 2000 Google Scholar
  2. 2.
    Ball, T., Larus, J.R.: Branch prediction for free. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 300–313 (1993) Google Scholar
  3. 3.
    Binder, W., Hulaas, J.: Extending standard Java runtime systems for resource management. In: Software Engineering and Middleware (SEM 2004), Linz, Austria, Sept. 2004. LNCS (Lecture Notes in Computer Science), vol. 3437, pp. 154–169. Springer, Berlin (2004) Google Scholar
  4. 4.
    Binder, W., Hulaas, J.: A portable CPU-management framework for Java. IEEE Internet Comput. 8(5), 74–83 (2004) CrossRefGoogle Scholar
  5. 5.
    Binder, W., Hulaas, J.: Using bytecode instruction counting as portable CPU consumption metric. In: QAPL’05 (3rd Workshop on Quantitative Aspects of Programming Languages), Edinburgh, Scotland, Apr. 2005. ENTCS (Electronic Notes in Theoretical Computer Science), vol. 153(2) (2005) Google Scholar
  6. 6.
    Binder, W., Hulaas, J.: Exact and portable profiling for Java using bytecode instruction counting. In: QAPL’06 (4th Workshop on Quantitative Aspects of Programming Languages), Vienna, Austria, Apr. 2006. ENTCS (Electronic Notes in Theoretical Computer Science) (2006) Google Scholar
  7. 7.
    Binder, W., Lichtl, B.: Using a secure mobile object kernel as operating system on embedded devices to support the dynamic upload of applications. In: Lecture Notes in Computer Science, vol. 2535, pp. 154–170. Springer, Berlin (2002) Google Scholar
  8. 8.
    Binder, W., Hulaas, J.G., Villazón, A.: Portable resource control in Java. ACM SIGPLAN Not. 36(11), 139–155 (2001). Proceedings of the 2001 ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA’01) CrossRefGoogle Scholar
  9. 9.
    Chiba, S.: Load-time structural reflection in Java. In: Proceedings of the 14th European Conference on Object-Oriented Programming (ECOOP’2000), Cannes, France, June 2000. Lecture Notes in Computer Science, vol. 1850, pp. 313–336. Springer, Berlin (2000) Google Scholar
  10. 10.
    Cierniak, M., Lueh, G.-Y., Stichnoth, J.M.: Practicing JUDO: Java under dynamic optimizations. ACM SIGPLAN Not. 35(5), 13–26 (2000) CrossRefGoogle Scholar
  11. 11.
    Cragon, H.G.: Branch Strategy Taxonomy and Performance Models. IEEE Computer Society, Los Alamitos (1992) Google Scholar
  12. 12.
    Czajkowski, G., Daynès, L.: Multitasking without compromise: A virtual machine evolution. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA’01), pp. 125–138, Tampa Bay, Florida, Oct. 2001 Google Scholar
  13. 13.
    Czajkowski, G., von Eicken, T.: JRes: A resource accounting interface for Java. ACM SIGPLAN Not. 33, 10 (1998). Proceedings of the 13th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA-98), New York, USA, Oct. 1998 CrossRefGoogle Scholar
  14. 14.
    Czajkowski, G., Hahn, S., Skinner, G., Soper, P., Bryce, C.: A resource management interface for the Java platform. Softw. Practice Exp. 35(2), 123–157 (2004) CrossRefGoogle Scholar
  15. 15.
    Dahm, M.: Byte code engineering. In: Java-Information-Tage 1999 (JIT’99), Sept. 1999. http://jakarta.apache.org/bcel/
  16. 16.
    Deitrich, B.L., Cheng, B.-C., Hwu, W.W.: Improving static branch prediction in a compiler. In: IEEE PACT, pp. 214–221 (1998) Google Scholar
  17. 17.
    Dufour, B., Driesen, K., Hendren, L., Verbrugge, C.: Dynamic metrics for Java. ACM SIGPLAN Not. 38(11), 149–168 (2003) CrossRefGoogle Scholar
  18. 18.
    Feeley, M.: Polling efficiently on stock hardware. In the 1993 ACM SIGPLAN Conference on Functional Programming and Computer Architecture, pp. 179–187, Copenhagen, Denmark, June 1993 Google Scholar
  19. 19.
    Gosling, J., Joy, B., Steele, G.L., Bracha, G.: The Java Language Specification, 2nd edn. Java Series. Addison–Wesley, Reading (2000) Google Scholar
  20. 20.
    Gustafsson, J., Ermedahl, A.: Automatic derivation of path and loop annotations in object-oriented real-time programs. J. Parall. Distrib. Comput. Pract. 1(2) (1998) Google Scholar
  21. 21.
    Hulaas, J., Binder, W.: Program transformations for portable CPU accounting and control in Java. In: Proceedings of PEPM’04 (2004 ACM SIGPLAN Symposium on Partial Evaluation & Program Manipulation), pp. 169–177, Verona, Italy, August 24–25 2004 Google Scholar
  22. 22.
    Hulaas, J., Kalas, D.: Monitoring of resource consumption in Java-based application servers. In: Proceedings of the 10th HP Openview University Association Plenary Workshop (HP-OVUA’2003), Geneva, Switzerland, July 2003 Google Scholar
  23. 23.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP-2001). Lecture Notes in Computer Science, vol. 2072, pp. 327–353. Springer, Berlin (2001) Google Scholar
  24. 24.
    Kiselev, I.: Aspect-Oriented Programming with AspectJ. Sams Publishing, Indianapolis (2003) Google Scholar
  25. 25.
    Krall, A.: Improving semi-static branch prediction by code replication. In: Conference on Programming Language Design and Implementation, vol. 29(7), pp. 97–106, Orlando, 1994 Google Scholar
  26. 26.
    Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison–Wesley, Reading (1999) Google Scholar
  27. 27.
    Ogasawara, T., Komatsu, H., Nakatani, T.: A study of exception handling and its dynamic optimization in Java. ACM SIGPLAN Not. 36(11), 83–95 (2001). Proceedings of the 2001 ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA’01) CrossRefGoogle Scholar
  28. 28.
    Sun Microsystems, Inc. Java HotSpot Technology. Web pages at http://java.sun.com/products/hotspot/
  29. 29.
    Suri, N., Bradshaw, J.M., Breedy, M.R., Groth, P.T., Hill, G.A., Jeffers, R., Mitrovich, T.S., Pouliot, B.R., Smith, D.S.: NOMADS: toward a strong and safe mobile agent system. In: Proceedings of the 4th International Conference on Autonomous Agents (AGENTS-00), NY, June 2000 Google Scholar
  30. 30.
    Tanter, E., Ségura-Devillechaise, M., Noyé, J., Piquer, J.: Altering Java semantics via bytecode manipulation. In: Proceedings of the ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering (GPCE 2002), USA, Oct. 2002. LNSC, vol. 2487. Springer, Berlin (2002) Google Scholar
  31. 31.
    The Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks. Web pages at http://www.spec.org/osg/jvm98/
  32. 32.
    Vallée-Rai, R., Gagnon, E., Hendren, L.J., Lam, P., Pominville, P., Sundaresan, V.: Optimizing Java bytecode using the Soot framework: Is it feasible? In: Compiler Construction, 9th International Conference (CC 2000), pp. 18–34 (2000) Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2008

Authors and Affiliations

  1. 1.School of Computer and Communication SciencesEcole Polytechnique Fédérale de Lausanne (EPFL)LausanneSwitzerland
  2. 2.Faculty of InformaticsUniversity of LuganoLuganoSwitzerland

Personalised recommendations