skip to main content
10.1145/1167473.1167487acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Javana: a system for building customized Java program analysis tools

Published:16 October 2006Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Donnell. Java Performance Profiling using the VTune Performance Analyzer. Intel, 2004.]]Google ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarCross RefCross Ref
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle Scholar
  17. 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 ScholarGoogle Scholar
  18. N. Nethercote and J. Seward. Valgrind: A program supervision framework. In Electronic Notes in Theoretical Computer Science, volume 89. Elsevier, 2003.]]Google ScholarGoogle Scholar
  19. S. Reiss and M. Renieris. Languages for dynamic instrumentation. In Proceedings of the Workshop on Dynamic Analysis (WODA), May 2003.]]Google ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle Scholar

Index Terms

  1. Javana: a system for building customized Java program analysis tools

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!