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.
Similar content being viewed by others
References
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
Ball, T., Larus, J.R.: Branch prediction for free. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 300–313 (1993)
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)
Binder, W., Hulaas, J.: A portable CPU-management framework for Java. IEEE Internet Comput. 8(5), 74–83 (2004)
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)
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)
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)
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)
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)
Cierniak, M., Lueh, G.-Y., Stichnoth, J.M.: Practicing JUDO: Java under dynamic optimizations. ACM SIGPLAN Not. 35(5), 13–26 (2000)
Cragon, H.G.: Branch Strategy Taxonomy and Performance Models. IEEE Computer Society, Los Alamitos (1992)
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
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
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)
Dahm, M.: Byte code engineering. In: Java-Information-Tage 1999 (JIT’99), Sept. 1999. http://jakarta.apache.org/bcel/
Deitrich, B.L., Cheng, B.-C., Hwu, W.W.: Improving static branch prediction in a compiler. In: IEEE PACT, pp. 214–221 (1998)
Dufour, B., Driesen, K., Hendren, L., Verbrugge, C.: Dynamic metrics for Java. ACM SIGPLAN Not. 38(11), 149–168 (2003)
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
Gosling, J., Joy, B., Steele, G.L., Bracha, G.: The Java Language Specification, 2nd edn. Java Series. Addison–Wesley, Reading (2000)
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)
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
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
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)
Kiselev, I.: Aspect-Oriented Programming with AspectJ. Sams Publishing, Indianapolis (2003)
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
Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison–Wesley, Reading (1999)
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)
Sun Microsystems, Inc. Java HotSpot Technology. Web pages at http://java.sun.com/products/hotspot/
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
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)
The Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks. Web pages at http://www.spec.org/osg/jvm98/
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)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Hulaas, J., Binder, W. Program transformations for light-weight CPU accounting and control in the Java virtual machine. Higher-Order Symb Comput 21, 119–146 (2008). https://doi.org/10.1007/s10990-008-9026-4
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10990-008-9026-4