ABSTRACT
Understanding the behavior of applications running on high-level language virtual machines, as is the case in Java, is non-trivial because of the tight entanglement at the lowest execution level between the application and the virtual machine. This paper proposes Javana, a system for building Java program analysis tools. Javana provides an easy-to-use instrumentation infrastructure that allows for building customized profiling tools very quickly.Javana runs a dynamic binary instrumentation tool underneath the virtual machine. The virtual machine communicates with the instrumentation layer through an event handling mechanism for building a vertical map that links low-level native instruction pointers and memory addresses to high-level language concepts such as objects, methods, threads, lines of code, etc. The dynamic binary instrumentation tool then intercepts all memory accesses and instructions executed and provides the Javana end user with high-level language information for all memory accesses and natively executed instructions.We demonstrate the power of Javana through a number of applications: memory address tracing, vertical cache simulation and object lifetime computation. For each of these applications, the instrumentation specification requires only a small number of lines of code. Developing similarly powerful profiling tools within a virtual machine (as done in current practice) is both time-consuming and error-prone; in addition, the accuracy of the obtained profiling results might be questionable as we show in this paper.
- B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. F. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. C. Shepherd, S. E. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño Virtual Machine. IBM Systems Journal, 39(1):211.238, 2000.]] Google Scholar
Digital Library
- D. C. Burger and T. M. Austin. The SimpleScalar Tool Set. Computer Architecture News, 1997. See also http://www.simplescalar.com for more information.]] Google Scholar
Digital Library
- J.-D. Choi, B. Alpern, T. Ngo, M. Sridharan, and J. Vlissides. A perturbation-free replay platform for cross-optimized multithreaded applications. In Proceedings of the 15th International Parallel and Distributed Processing Symposium (IPDPS), Apr. 2001.]] Google Scholar
Digital Library
- B. De Bus, D. Chanet, B. De Sutter, L. Van Put, and K. De Bosschere. The design and implementation of FIT: A flexible instrumentation toolkit. In Proceedings of the ACM-SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE), pages 29--34, June 2004.]] Google Scholar
Digital Library
- M. Dmitriev. Selective profiling of Java applications using dynamic bytecode instrumentation. In Proceedings of the 2004 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), pages 141--150, Mar. 2004.]] Google Scholar
Digital Library
- J. Donnell. Java Performance Profiling using the VTune Performance Analyzer. Intel, 2004.]]Google Scholar
- B. Dufour, K. Driesen, L. Hendren, and C. Verbrugge. Dynamic metrics for Java. In Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Languages, Applications and Systems (OOPSLA), pages 149--168, Oct. 2003.]] Google Scholar
Digital Library
- B. Dufour, L. Hendren, and C. Verbrugge. *J: A tool for dynamic analysis of Java programs. In Companion of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Languages, Applications and Systems (OOPSLA), pages 306--307, Oct. 2003.]] Google Scholar
Digital Library
- A. Georges, D. Buytaert, L. Eeckhout, and K. De Bosschere. Method-level phase behavior in Java workloads. In Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems and Languages (OOPSLA), pages 270--287, Oct. 2004.]] Google Scholar
Digital Library
- M. Hauswirth, A. Diwan, P. S. Sweeney, and M. C. Mozer. Automating vertical profiling. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems and Languages (OOPSLA), pages 281--296, Oct. 2005.]] Google Scholar
Digital Library
- M. Hauswirth, P. S. Sweeney, A. Diwan, and M. Hind. Vertical profiling: Understanding the behavior of object-oriented applications. In Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems and Languages (OOPSLA), pages 251--269, Oct. 2004.]] Google Scholar
Digital Library
- G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP), pages 327--355, June 2001.]] Google Scholar
Digital Library
- G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), pages 220--242, 1997.]]Google Scholar
Cross Ref
- J. R. Larus and E. Schnarr. EEL: Machine-independent executable editing. In Proceedings of the ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI), pages 291--300, 1995.]] Google Scholar
Digital Library
- C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi, and K. Hazelwood. Pin: building customized program analysis tools with dynamic instrumentation. In Proceedings of the ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI), pages 190--200, June 2005.]] Google Scholar
Digital Library
- J. Maebe and K. De Bosschere. Instrumenting self-modifying code. In Proceedings of the Fifth International Workshop on Automated Debugging (AADEBUG), pages 103--113, Sept. 2003.]]Google Scholar
- J. Maebe, M. Ronsse, and K. De Bosschere. DIOTA: Dynamic instrumentation, optimization and transformation of applications. In Proceedings of the 2002 Workshop on Binary Translation (WBT) held in conjunction with the International Conference on Parallel Architectures and Compilation Techniques (PACT), Sept. 2002.]]Google Scholar
- N. Nethercote and J. Seward. Valgrind: A program supervision framework. In Electronic Notes in Theoretical Computer Science, volume 89. Elsevier, 2003.]]Google Scholar
- S. Reiss and M. Renieris. Languages for dynamic instrumentation. In Proceedings of the Workshop on Dynamic Analysis (WODA), May 2003.]]Google Scholar
- R. Shaham, E. K. Kolodner, and M. Sagiv. Heap profiling for space-efficient Java. In Proceedings of the ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI), pages 104--113, 2001.]] Google Scholar
Digital Library
- Y. Shuf, M. J. Serrano, M. Gupta, and J. P. Singh. Characterizing the memory behavior of Java workloads: a structured view and opportunities for optimizations. In Proceedings of the 2001 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems, pages 194--205, June 2001.]] Google Scholar
Digital Library
- O. Spinczyk, A. Gal, and W. Schröder-Preikschat. AspectC++: an aspect-oriented extension to the C++ programming language. In CRPITS '02: Proceedings of the Fortieth International Conference on Tools Pacific, pages 53--60, 2002.]] Google Scholar
Digital Library
- A. Srivastava and A. Eustace. ATOM: A system for building customized program analysis tools. Technical Report 94/2, Western Research Lab, Compaq, Mar. 1994.]]Google Scholar
Digital Library
- J. Suzuki and Y. Yamamoto. Extending UML with aspects: Aspect support in the design phase. In Proceedings of the Workshop on Object-Oriented Technology, pages 299--300, 1999.]] Google Scholar
Digital Library
- P. Sweeney, M. Hauswirth, B. Cahoon, P. Cheng, A. Diwan, D. Grove, and M. H. d. Using hardware performance monitors to understand the behavior of Java applications. In Proceedings of the 3rd Virtual Machine Research and Technology Symposium (VM), pages 57--72, May 2004.]] Google Scholar
Digital Library
- C. Zhang and H.-A. Jacobsen. TinyC2: Towards building a dynamic weaving aspect language for C. In Proceedings of the Foundations of Aspect-Oriented Languages Workshop at AOSD 2003, Mar. 2003.]]Google Scholar
Index Terms
Javana: a system for building customized Java program analysis tools
Recommendations
Javana: a system for building customized Java program analysis tools
Proceedings of the 2006 OOPSLA ConferenceUnderstanding the behavior of applications running on high-level language virtual machines, as is the case in Java, is non-trivial because of the tight entanglement at the lowest execution level between the application and the virtual machine. This ...
Building Java program analysis tools using Javana
OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applicationsJavana is a tool for creating customized Java program analysis tools. It comes with an easy-to-use instrumentation framework that enables programmers to develop profiling tools that crosscut the Java application, the Java Virtual Machine (JVM) and the ...
Evaluating the Java Native Interface JNI: Leveraging Existing Native Code, Libraries and Threads to a Running Java Virtual Machine
This article aims to explore JNI features and to discover fundamental operations of the Java programming language, such as arrays, objects, classes, threads and exception handling, and to illustrate these by using various algorithms and code samples. ...







Comments