Java Bytecode Instrumentation Made Easy: The DiSL Framework for Dynamic Program Analysis
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.
KeywordsBytecode instrumentation aspect-oriented programming domain-specific languages Java Virtual Machine
Unable to display preview. Download preview PDF.
- 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.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
- 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