Enabling Modularity and Re-use in Dynamic Program Analysis Tools for the Java Virtual Machine

  • Danilo Ansaloni
  • Stephen Kell
  • Yudi Zheng
  • Lubomír Bulej
  • Walter Binder
  • Petr Tůma
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7920)

Abstract

Dynamic program analysis tools based on code instrumentation serve many important software engineering tasks such as profiling, debugging, testing, program comprehension, and reverse engineering. Unfortunately, constructing new analysis tools is unduly difficult, because existing frameworks offer little or no support to the programmer beyond the incidental task of instrumentation. We observe that existing dynamic analysis tools re-address recurring requirements in their essential task: maintaining state which captures some property of the analysed program. This paper presents a general architecture for dynamic program analysis tools which treats the maintenance of analysis state in a modular fashion, consisting of mappers decomposing input events spatially, and updaters aggregating them over time. We show that this architecture captures the requirements of a wide variety of existing analysis tools.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ammons, G., Ball, T., Larus, J.R.: Exploiting hardware performance counters with flow and context sensitive profiling. In: Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, pp. 85–96. ACM (1997)Google Scholar
  2. 2.
    Ansaloni, D., Binder, W., Villazón, A., Moret, P.: Parallel dynamic analysis on multicores with aspect-oriented programming. In: AOSD 2010: Proceedings of the 9th International Conference on Aspect-Oriented Software Development, pp. 1–12. ACM Press (March 2010)Google Scholar
  3. 3.
    Blackburn, S.M., Garner, R., Hoffman, C., Khan, A.M., McKinley, K.S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M., Hosking, A., Jump, M., Lee, H., Moss, J.E.B., Phansalkar, A., Stefanović, D., VanDrunen, T., von Dincklage, D., Wiedermann, B.: The DaCapo benchmarks: Java benchmarking development and analysis. In: Proc. 21st ACM SIGPLAN Conf. on Object-Oriented Programing, Systems, Languages, and Applications, OOPSLA 2006 (2006)Google Scholar
  4. 4.
    Bodden, E., Havelund, K.: Racer: effective race detection using AspectJ. In: Proc. Int. Symp. on Software Testing and Analysis, ISSTA 2008, pp. 155–166. ACM (2008)Google Scholar
  5. 5.
    Cantrill, B.M., Shapiro, M.W., Leventhal, A.H.: Dynamic instrumentation of production systems. In: Proc. USENIX Annual Technical Conference, ATEC 2004, p. 2. USENIX Association (2004)Google Scholar
  6. 6.
    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
  7. 7.
    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
  8. 8.
    Coady, Y., Kiczales, G., Feeley, M., Smolyn, G.: Using aspectC to improve the modularity of path-specific customization in operating system code. SIGSOFT Softw. Eng. Notes 26(5), 88–98 (2001)CrossRefGoogle Scholar
  9. 9.
    Courtney, A.: Frappé: Functional reactive programming in Java. In: Ramakrishnan, I.V. (ed.) PADL 2001. LNCS, vol. 1990, pp. 29–44. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  10. 10.
    Enck, W., Gilbert, P., Chun, B.-G., Cox, L.P., Jung, J., McDaniel, P., Sheth, A.N.: TaintDroid: an information-flow tracking system for realtime privacy monitoring on smartphones. In: Proc. 9th USENIX Conference on Operating Systems Design and Implementation, OSDI 2010, pp. 1–6. USENIX Association (2010)Google Scholar
  11. 11.
    Flanagan, C., Freund, S.N.: FastTrack: efficient and precise dynamic race detection. In: Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, pp. 121–133. ACM (2009)Google Scholar
  12. 12.
    Flanagan, C., Freund, S.N.: The RoadRunner dynamic analysis framework for concurrent programs. In: Proc. 9th Workshop on Program Analysis for Software Tools and Engineering, PASTE 2010, pp. 1–8. ACM (2010)Google Scholar
  13. 13.
    Graham, S.L., Kessler, P.B., Mckusick, M.K.: Gprof: A call graph execution profiler. In: Proc. SIGPLAN Symposium on Compiler Construction, SIGPLAN 1982, pp. 120–126. ACM (1982)Google Scholar
  14. 14.
    Hertz, M., Blackburn, S.M., Moss, J.E.B., McKinley, K.S., Stefanović, D.: Error-free garbage collection traces: how to cheat and not get caught. In: Proc. ACM SIGMETRICS Int. Conf. on Measurement and Modeling of Computer Systems, SIGMETRICS 2002, pp. 140–151. ACM (2002)Google Scholar
  15. 15.
    Hollingsworth, J., Niam, O., Miller, B., Xu, Z., Goncalves, M., Zheng, L.: MDL: a language and compiler for dynamic program instrumentation. In: Proc. Conf. Parallel Architectures and Compilation Techniques, pp. 201–212. IEEE (1997)Google Scholar
  16. 16.
    Jovic, M., Hauswirth, M.: Listener latency profiling: Measuring the perceptible performance of interactive java applications. Science of Computer Programming 76(11), 1054–1072 (2011)CrossRefGoogle Scholar
  17. 17.
    Jump, M., McKinley, K.S.: Dynamic shape analysis via degree metrics. In: Proc. Int. Symp. on Memory Management, ISMM 2009, pp. 119–128. ACM (2009)Google Scholar
  18. 18.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Lindskov Knudsen, J. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  19. 19.
    Lattner, C., Adve, V.: LLVM: A compilation framework for lifelong program analysis & transformation. In: Proc. Int. Symp. on Code Generation and Optimization, CGO 2004 (2004)Google Scholar
  20. 20.
    Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley (1999)Google Scholar
  21. 21.
    Luk, C.-K., Cohn, R., Muth, R., Ptil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V., Hazelwood, K.: Pin: Building customized program analysis tools with dynamic instrumentation. In: Proce. ACM SIGPLAN Conf. on Programming Language Design and Implementation, pp. 191–200. ACM (2005)Google Scholar
  22. 22.
    Maier, I., Odersky, M.: Deprecating the Observer Pattern with Scala.react. Technical report, EPFL (2012)Google Scholar
  23. 23.
    Marek, L., Villazón, A., Zheng, Y., Ansaloni, D., Binder, W., Qi, Z.: DiSL: a domain-specific language for bytecode instrumentation. In: Proc. 11th Int. Conf. on Aspect-Oriented Software Development, pp. 239–250 (2012)Google Scholar
  24. 24.
    Meyerovich, L.A., Guha, A., Baskin, J., Cooper, G.H., Greenberg, M., Bromfield, A., Krishnamurthi, S.: Flapjax: a programming language for Ajax applications. In: 24th ACM SIGPLAN Conf. on Object Oriented Programming: Systems Languages and Applications, OOPSLA 2009, pp. 1–20. ACM (2009)Google Scholar
  25. 25.
    Nethercote, N., Seward, J.: Valgrind: A framework for heavyweight dynamic binary instrumentation. In: Proc. ACM SIGPLAN 2007 Conf. on Programming Language Design and Implementation, pp. 89–100. ACM (2007)Google Scholar
  26. 26.
    Ricci, N.P., Guyer, S.Z., Moss, J.E.B.: Elephant Tracks: generating program traces with object death records. In: Proc. 9th Int. Conf. on Principles and Practice of Programming in Java, PPPJ 2011, pp. 139–142. ACM (2011)Google Scholar
  27. 27.
    Rothlisberger, D., Harry, M., Binder, W., Moret, P., Ansaloni, D., Villazon, A., Nierstrasz, O.: Exploiting dynamic information in ides improves speed and correctness of software maintenance tasks. IEEE Transactions on Software Engineering 38(3), 579–591 (2012)CrossRefGoogle Scholar
  28. 28.
    Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15(4), 391–411 (1997)CrossRefGoogle Scholar
  29. 29.
    Sen, K., Marinov, D., Agha, G.: CUTE: a concolic unit testing engine for c. In: Proc. 10th European Software Engineering Conf. Held Jointly with 13th ACM SIGSOFT Int. Symp. on Foundations of Software Engineering, ESEC/FSE-13, pp. 263–272. ACM (2005)Google Scholar
  30. 30.
    Shi, Y., Park, S., Yin, Z., Lu, S., Zhou, Y., Chen, W., Zheng, W.: Do I use the wrong definition?: DeFuse: definition-use invariants for detecting concurrency and sequential bugs. In: Proc. ACM Int. Conf. on Object Oriented Programming Systems Languages and Applications, OOPSLA 2010, pp. 160–174. ACM (2010)Google Scholar
  31. 31.
    Strom, R.E., Yemini, S.: Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Softw. Eng. 12(1), 157–171 (1986)MATHCrossRefGoogle Scholar
  32. 32.
    Weidendorfer, J.: Sequential performance analysis with callgrind and kcachegrind. In: Resch, M., Keller, R., Himmler, V., Krammer, B., Schulz, A. (eds.) Tools for High Performance Computing, pp. 93–113. Springer (2008)Google Scholar
  33. 33.
    Zukowski, J.: The Definitive Guide to Java Swing. 3rd edn. Apress (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Danilo Ansaloni
    • 1
  • Stephen Kell
    • 1
  • Yudi Zheng
    • 1
  • Lubomír Bulej
    • 2
  • Walter Binder
    • 1
  • Petr Tůma
    • 2
  1. 1.University of LuganoSwitzerland
  2. 2.Charles UniversityPragueCzech Republic

Personalised recommendations