Advertisement

Java Bytecode Instrumentation Made Easy: The DiSL Framework for Dynamic Program Analysis

  • Lukáš Marek
  • Yudi Zheng
  • Danilo Ansaloni
  • Aibek Sarimbekov
  • Walter Binder
  • Petr Tůma
  • Zhengwei Qi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7705)

Abstract

Many software development tools (e.g., profilers, debuggers, testing tools) and frameworks (e.g., aspect weavers) are based on bytecode instrumentation techniques. While there are many low-level bytecode manipulation libraries that support the development of such tools and frameworks, they typically provide only low-level abstractions and require detailed knowledge of the Java Virtual Machine. In addition, they often lack the necessary infrastructure for load-time instrumentation with complete bytecode coverage to ensure that each method with a bytecode representation gets instrumented. In this paper we give an introduction to DiSL, a domain-specific aspect language and framework for bytecode instrumentation that reconciles high expressiveness of the language, high level of abstraction, and efficiency of the generated code. We illustrate the strengths of DiSL with a concrete analysis as a case study. The DiSL framework is open-source and has been successfully used in several research projects.

Keywords

Bytecode instrumentation aspect-oriented programming domain-specific languages Java Virtual Machine 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Binder, W., Ansaloni, D., Villazón, A., Moret, P.: Flexible and efficient profiling with aspect-oriented programming. Concurrency and Computation: Practice and Experience 23(15), 1749–1773 (2011)CrossRefGoogle Scholar
  2. 2.
    Chiba, S., Nishizawa, M.: An Easy-to-Use Toolkit for Efficient Java Bytecode Translators. In: Pfenning, F., Macko, M. (eds.) GPCE 2003. LNCS, vol. 2830, pp. 364–376. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  3. 3.
    Chiba, S.: Load-Time Structural Reflection in Java. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, pp. 313–336. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  4. 4.
    Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Auletta, V. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  5. 5.
    Marek, L., Villazón, A., Zheng, Y., Ansaloni, D., Binder, W., Qi, Z.: DiSL: a domain-specific language for bytecode instrumentation. In: AOSD 2012: Proceedings of the 11th International Conference on Aspect-Oriented Software Development, pp. 239–250 (2012)Google Scholar
  6. 6.
    Moret, P., Binder, W., Tanter, É.: Polymorphic bytecode instrumentation. In: AOSD 2011: Proceedings of the 10th International Conference on Aspect-Oriented Software Development, pp. 129–140 (2011)Google Scholar
  7. 7.
    Pearce, D.J., Webster, M., Berry, R., Kelly, P.H.J.: Profiling with AspectJ. Software: Practice and Experience 37(7), 747–777 (2007)CrossRefGoogle Scholar
  8. 8.
    Sewe, A., Mezini, M., Sarimbekov, A., Ansaloni, D., Binder, W., Ricci, N., Guyer, S.Z.: new Scala() instanceof Java: A comparison of the memory behaviour of Java and Scala programs. In: ISMM 2012: Proceedings of the International Symposium on Memory Management. pp. 97–108 (2012)Google Scholar
  9. 9.
    Vallée-Rai, R., Gagnon, E., Hendren, L., Lam, P., Pominville, P., Sundaresan, V.: Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? In: Watt, D.A. (ed.) CC 2000. LNCS, vol. 1781, pp. 18–34. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  10. 10.
    Zheng, Y., Ansaloni, D., Marek, L., Sewe, A., Binder, W., Villazón, A., Tuma, P., Qi, Z., Mezini, M.: Turbo DiSL: Partial Evaluation for High-Level Bytecode Instrumentation. In: Furia, C.A., Nanz, S. (eds.) TOOLS 2012. LNCS, vol. 7304, pp. 353–368. Springer, Heidelberg (2012)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Lukáš Marek
    • 1
  • Yudi Zheng
    • 2
  • Danilo Ansaloni
    • 3
  • Aibek Sarimbekov
    • 3
  • Walter Binder
    • 3
  • Petr Tůma
    • 1
  • Zhengwei Qi
    • 2
  1. 1.Charles UniversityCzech Republic
  2. 2.Shanghai Jiao Tong UniversityChina
  3. 3.University of LuganoSwitzerland

Personalised recommendations