skip to main content
10.1145/1711506.1711510acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

@J: towards rapid development of dynamic analysis tools for the Java Virtual Machine

Published: 25 October 2009 Publication History

Abstract

Many software-engineering tools for the Java Virtual Machine that perform some form of dynamic program analysis, such as profilers or debuggers, are implemented with low-level bytecode instrumentation techniques. While program manipulation at the bytecode level is very flexible, because the possible bytecode transformations are not restricted, tool development is tedious and error-prone. Specifying bytecode instrumentation at a higher level using aspect-oriented programming (AOP) is a promising alternative in order to reduce tool development time and cost. However, prevailing AOP frameworks lack some features that are essential for certain dynamic analyses. In this paper, we focus on three common shortcomings in AOP frameworks with respect to the development of aspect-based tools -- (1) the lack of mechanisms for passing data between woven advices in local variables, (2) the support for user-defined static analyses at weaving time, and (3) the absence of pointcuts at the level of individual basic blocks of code. We propose @J, an annotation-based AOP language and weaver that integrates support for these three features. We illustrate the benefits of the proposed features with two examples.

References

[1]
S. Akai, S. Chiba, and M. Nishizawa. Region pointcut for AspectJ. In ACP4IS '09: Proceedings of the 8th Workshop on Aspects, Components, and Patterns for Infrastructure Software, pages 43--48, New York, NY, USA, 2009. ACM.
[2]
B. Alpern, C. R. Attanasio, J. J. Barton, B. 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, N. 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.
[3]
T. Aotani and H. Masuhara. SCoPE: an AspectJ compiler for supporting user-defined analysis-based pointcuts. In AOSD '07: Proceedings of the 6th international conference on Aspect-oriented software development, pages 161--172, New York, NY, USA, 2007. ACM.
[4]
A. Armbruster, J. Baker, A. Cunei, C. Flack, D. Holmes, F. Pizlo, E. Pla, M. Prochazka, and J. Vitek. A real-time Java virtual machine with applications in avionics. ACM Trans. Embed. Comput. Syst., 7(1):1--49, 2007.
[5]
S. Artzi, S. Kim, and M. D. Ernst. ReCrash: Making Software Failures Reproducible by Preserving Object States. In J. Vitek, editor, ECOOP '08: Proceedings of the 22th European Conference on Object-Oriented Programming, volume 5142 of Lecture Notes in Computer Science, pages 542--565, Paphos, Cyprus, 2008. Springer-Verlag.
[6]
Aspectwerkz. AspectWerkz-Plain Java AOP. Web pages at http://aspectwerkz.codehaus.org/.
[7]
P. Avgustinov, A. S. Christensen, L. J. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: An extensible AspectJ compiler. In AOSD '05: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pages 87--98, New York, NY, USA, 2005. ACM Press.
[8]
L. D. Benavides, R. Douence, and M. Südholt. Debugging and testing middleware with aspect-based control-flow and causal patterns. In Middleware '08: Proceedings of the 9th ACM/IFIP/USENIX International Conference on Middleware, pages 183--202, New York, NY, USA, 2008. Springer-Verlag New York, Inc.
[9]
W. Binder and J. Hulaas. A portable CPU-management framework for Java. IEEE Internet Computing, 8(5):74--83, Sep./Oct. 2004.
[10]
W. Binder, J. Hulaas, and P. Moret. Advanced Java Bytecode Instrumentation. In PPPJ'07: Proceedings of the 5th International Symposium on Principles and Practice of Programming in Java, pages 135--144, New York, NY, USA, 2007. ACM Press.
[11]
W. Binder, J. Hulaas, P. Moret, and A. Villazón. Platform-independent profiling in a virtual execution environment. Software: Practice and Experience, 39(1):47--79, 2009. http://dx.doi.org/10.1002/spe.890.
[12]
W. Binder, J. G. Hulaas, and A. Villazón. Portable resource control in Java. ACM SIGPLAN Notices, 36(11):139--155, Nov. 2001. Proceedings of the 2001 ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA'01).
[13]
W. Binder, A. Villazón, M. Schoeberl, and P. Moret. Cache-aware cross-profiling for Java processors. In International Conference on Compilers, Architecture, and Synthesis for Embedded Systems (CASES-2008), pages 127--136, Atlanta, Georgia, USA, Oct. 2008. ACM.
[14]
C. Bockisch, M. Arnold, T. Dinkelaker, and M. Mezini. Adapting virtual machine techniques for seamless aspect support. In OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pages 109--124, New York, NY, USA, 2006. ACM.
[15]
E. Bodden and K. Havelund. Racer: Effective Race Detection Using AspectJ. In International Symposium on Software Testing and Analysis (ISSTA), Seattle, WA, July 20--24 2008, pages 155--165, New York, NY, USA, 07 2008. ACM.
[16]
F. Chen, T. F. Serbanuta, and G. Rosu. jPredictor: A Predictive Runtime Analysis Tool for Java. In ICSE '08: Proceedings of the 30th international conference on Software engineering, pages 221--230, New York, NY, USA, 2008. ACM.
[17]
S. Chiba. Load-time structural reflection in Java. In Proceedings of the 14th European Conference on Object-Oriented Programming (ECOOP'2000), volume 1850 of Lecture Notes in Computer Science, pages 313--336. Springer Verlag, Cannes, France, June 2000.
[18]
J. Cook and A. Nusayr. Using AOP for Detailed Runtime Monitoring Instrumentation. In WODA 2008: the sixth international workshop on dynamic analysis, New York, NY, USA, jul 2009. ACM.
[19]
B. De Fraine, M. Südholt, and V. Jonckers. StrongAspectJ: flexible and safe pointcut/advice bindings. In AOSD '08: Proceedings of the 7th international conference on Aspect-oriented software development, pages 60--71, New York, NY, USA, 2008. ACM.
[20]
M. Dmitriev. Profiling Java applications using code hotswapping and dynamic call graph revelation. In WOSP '04: Proceedings of the Fourth International Workshop on Software and Performance, pages 139--150. ACM Press, 2004.
[21]
B. Dufour, L. Hendren, and C. Verbrugge. *J: A tool for dynamic analysis of Java programs. In OOPSLA '03: Companion of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 306--307, New York, NY, USA, 2003. ACM Press.
[22]
R. Dyer and H. Rajan. Nu: A dynamic aspect-oriented intermediate language model and virtual machine for flexible runtime adaptation. In AOSD '08: Proceedings of the 7th International Conference on Aspect-oriented Software Development, pages 191--202, New York, NY, USA, 2008. ACM.
[23]
B. Goetz, T. Peierls, J. Bloch, J. Bowbeer, D. Holmes, and D. Lea. Java Concurrency in Practice. Addison-Wesley, 2006.
[24]
J. Gosling, B. Joy, G. L. Steele, and G. Bracha. The Java Language Specification, Third Edition. The Java Series. Addison-Wesley, 2005.
[25]
E. Hilsdale and J. Hugunin. Advice weaving in AspectJ. In AOSD '04: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pages 26--35, New York, NY, USA, 2004. ACM.
[26]
JBoss. Open source middleware software. Web pages at http://labs.jboss.com/jbossaop/.
[27]
M. Jovic and M. Hauswirth. Measuring the performance of interactive applications with listener latency profiling. In PPPJ '08: Proceedings of the 6th international symposium on Principles and practice of programming in Java, pages 137--146, New York, NY, USA, 2008. ACM.
[28]
G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In J. L. Knudsen, editor, Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP-2001), volume 2072 of Lecture Notes in Computer Science, pages 327--353, 2001.
[29]
G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In M. Akşit and S. Matsuoka, editors, Proceedings of European Conference on Object-Oriented Programming, volume 1241, pages 220--242. Springer-Verlag, Berlin, Heidelberg, and New York, 1997.
[30]
K. Klose, K. Ostermann, and M. Leuschel. Partial evaluation of pointcuts. In PADL, pages 320--334, 2007.
[31]
J. Manson, W. Pugh, and S. V. Adve. The Java Memory Model. In POPL '05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 378--391, New York, NY, USA, 2005. ACM.
[32]
P. Moret, W. Binder, and A. Villazón. CCCP: Complete calling context profiling in virtual execution environments. In PEPM '09: Proceedings of the 2009 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, pages 151--160, Savannah, GA, USA, 2009. ACM.
[33]
NetBeans. The NetBeans Profiler Project. Web pages at http://profiler.netbeans.org/.
[34]
ObjectWeb. ASM. Web pages at http://asm.objectweb.org/.
[35]
K. Palacz, J. Baker, C. Flack, C. Grothoff, H. Yamauchi, and J. Vitek. Engineering a customizable intermediate representation. In IVME '03: Proceedings of the 2003 workshop on Interpreters, virtual machines and emulators, pages 67--76, New York, NY, USA, 2003. ACM.
[36]
R. Pawlak. Spoon: Compile-time annotation processing for middleware. IEEE Distributed Systems Online, 7(11):1, 2006.
[37]
D. J. Pearce, M. Webster, R. Berry, and P. H. J. Kelly. Profiling with AspectJ. Software: Practice and Experience, 37(7):747--777, June 2007.
[38]
A. Popovici, G. Alonso, and T. Gross. Just-in-time aspects: efficient dynamic weaving for Java. In AOSD '03: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pages 100--109, New York, NY, USA, 2003. ACM Press.
[39]
H. Rajan. A Case for Explicit Join Point Models for Aspect-Oriented Intermediate Languages. In VMIL '07: Proceedings of the 1st Workshop on Virtual Machines and Intermediate Languages for Emerging Modularization Mechanisms, page 4, New York, NY, USA, 2007. ACM.
[40]
D. Röthlisberger, M. Härry, A. Villazón, D. Ansaloni, W. Binder, O. Nierstrasz, and P. Moret. Augmenting Static Source Views in IDEs with Dynamic Metrics. In ICSM '09: Proceedings of the 2009 IEEE International Conference on Software Maintenance, pages 253--262, Edmonton, Alberta, Canada, 2009. IEEE Computer Society.
[41]
Spring Framework. Open source application framework. Web pages at http://www.springsource.org/.
[42]
Sun Microsystems, Inc. The Maxine Virtual Machine. Web pages at http://research.sun.com/projects/maxine/.
[43]
Sun Microsystems, Inc. JVM Tool Interface (JVMTI) version 1.1. Web pages at http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html, 2006.
[44]
The Apache Jakarta Project. The Byte Code Engineering Library (BCEL). Web pages at http://jakarta.apache.org/bcel/.
[45]
R. Vallée-Rai, E. Gagnon, L. J. Hendren, P. Lam, P. Pominville, and V. Sundaresan. Optimizing Java bytecode using the Soot framework: Is it feasible? In Compiler Construction, 9th International Conference (CC 2000), pages 18--34, 2000.
[46]
A. Villazón, W. Binder, D. Ansaloni, and P. Moret. Advanced Dynamic Runtime Adaptation for Java. In GPCE '09: Proceedings of the Eighth International Conference on Generative Programming and Component Engineering. ACM, Oct. 2009.
[47]
A. Villazón, W. Binder, and P. Moret. Aspect Weaving in Standard Java Class Libraries. In PPPJ '08: Proceedings of the 6th International Symposium on Principles and Practice of Programming in Java, pages 159--167, New York, NY, USA, Sept. 2008. ACM.
[48]
A. Villazón, W. Binder, and P. Moret. Flexible Calling Context Reification for Aspect-Oriented Programming. In AOSD '09: Proceedings of the 8th International Conference on Aspect-oriented Software Development, pages 63--74, Charlottesville, Virginia, USA, Mar. 2009. ACM.
[49]
G. Xu and A. Rountev. Precise memory leak detection for Java software using container profiling. In ICSE '08: Proceedings of the 30th international conference on Software engineering, pages 151--160, New York, NY, USA, 2008. ACM.

Cited By

View all
  • (2017)The CSI Framework for Compiler-Inserted Program InstrumentationProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/31545021:2(1-25)Online publication date: 19-Dec-2017
  • (2017)Function call interception techniquesSoftware: Practice and Experience10.1002/spe.250148:3(385-401)Online publication date: 16-May-2017
  • (2015)Introduction to dynamic program analysis with DiSLScience of Computer Programming10.1016/j.scico.2014.01.00398:P1(100-115)Online publication date: 1-Feb-2015
  • Show More Cited By

Index Terms

  1. @J: towards rapid development of dynamic analysis tools for the Java Virtual Machine

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      VMIL '09: Proceedings of the Third Workshop on Virtual Machines and Intermediate Languages
      October 2009
      47 pages
      ISBN:9781605588742
      DOI:10.1145/1711506
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 25 October 2009

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Java Virtual Machine
      2. analysis at weaving time
      3. aspect weaving
      4. aspect-oriented programming
      5. basic-block-of-code pointcuts
      6. bytecode instrumentation
      7. debugging
      8. dynamic program analysis
      9. local variables
      10. profiling

      Qualifiers

      • Research-article

      Conference

      OOPSLA09
      Sponsor:

      Acceptance Rates

      Overall Acceptance Rate 4 of 4 submissions, 100%

      Upcoming Conference

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)3
      • Downloads (Last 6 weeks)1
      Reflects downloads up to 28 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2017)The CSI Framework for Compiler-Inserted Program InstrumentationProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/31545021:2(1-25)Online publication date: 19-Dec-2017
      • (2017)Function call interception techniquesSoftware: Practice and Experience10.1002/spe.250148:3(385-401)Online publication date: 16-May-2017
      • (2015)Introduction to dynamic program analysis with DiSLScience of Computer Programming10.1016/j.scico.2014.01.00398:P1(100-115)Online publication date: 1-Feb-2015
      • (2014)Dynamic program analysis-Reconciling developer productivity and tool performanceScience of Computer Programming10.1016/j.scico.2014.03.01495:P3(344-358)Online publication date: 1-Dec-2014
      • (2013)Productive Development of Dynamic Program Analysis Tools with DiSLProceedings of the 2013 22nd Australian Conference on Software Engineering10.1109/ASWEC.2013.12(11-19)Online publication date: 4-Jun-2013
      • (2012)DiSLProceedings of the 11th annual international conference on Aspect-oriented Software Development10.1145/2162049.2162077(239-250)Online publication date: 25-Mar-2012
      • (2011)Towards a domain-specific aspect language for dynamic program analysisProceedings of the sixth annual workshop on Domain-specific aspect languages10.1145/1960496.1960500(9-11)Online publication date: 21-Mar-2011
      • (2010)A meta-aspect protocol for developing dynamic analysesProceedings of the First international conference on Runtime verification10.5555/1939399.1939415(153-167)Online publication date: 1-Nov-2010
      • (2010)Parallel dynamic analysis on multicores with aspect-oriented programmingProceedings of the 9th International Conference on Aspect-Oriented Software Development10.1145/1739230.1739232(1-12)Online publication date: 15-Mar-2010

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media