Skip to main content

Aspect-Oriented Instrumentation with GCC

  • Conference paper
Runtime Verification (RV 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6418))

Included in the following conference series:

Abstract

We present the InterAspect instrumentation framework for GCC, a widely used compiler infrastructure. The addition of plug-in support in the latest release of GCC makes it an attractive platform for runtime instrumentation, as GCC plug-ins can directly add instrumentation by transforming the compiler’s intermediate representation. Such transformations, however, require expert knowledge of GCC internals. InterAspect addresses this situation by allowing instrumentation plug-ins to be developed using the familiar vocabulary of Aspect-Oriented Programming pointcuts, join points, and advice functions. InterAspect also supports powerful customized instrumentation, where specific information about each join point in a pointcut, as well as results of static analysis, can be used to customize the inserted instrumentation. We introduce the InterAspect API and present several examples that illustrate how it can be applied to useful runtime verification problems.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. BCEL, http://jakarta.apache.org/bcel

  2. AT&T Research Labs. Graphviz (2009), http://www.graphviz.org

  3. Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: abc: An extensible AspectJ compiler. In: Proceedings of the Fourth International Conference on Aspect-Oriented Software Development. ACM Press, New York (2005)

    Google Scholar 

  4. Bodden, E., Havelund, K.: Racer: Effective race detection using AspectJ. In: International Symposium on Software Testing and Analysis, Seattle, WA, pp. 155–165. ACM, New York (2008)

    Google Scholar 

  5. Callanan, S., Dean, D.J., Zadok, E.: Extending GCC with modular GIMPLE optimizations. In: Proceedings of the 2007 GCC Developers’ Summit, Ottawa, Canada (July 2007)

    Google Scholar 

  6. Chiba, S.: A metaobject protocol for C++. In: Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 285–299 (October 1995)

    Google Scholar 

  7. Chiba, S.: Load-time structural reflection in Java. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, p. 313. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  8. Coady, Y., Kiczales, G., Feeley, M., Smolyn, G.: Using AspectC to improve the modularity of path-specific customization in operating system code. In: Proceedings of the 9th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 88–98 (2001)

    Google Scholar 

  9. Douence, R., Fritz, T., Loriant, N., Menaud, J.-M., Ségura-Devillechaise, M., Südholt, M.: An expressive aspect language for system applications with Arachne. In: Proceedings of the 4th international conference on Aspect-oriented software development. ACM Press, New York (2005)

    Google Scholar 

  10. AspectJ, http://www.eclipse.org/aspectj

  11. Arachne, http://www.emn.fr/x-info/arachne

  12. Fei, L., Midkiff, S.P.: Artemis: Practical runtime monitoring of applications for errors. Tech. Rep. TR-ECE-05-02, Electrical and Computer Engineering, Purdue University (2005), http://docs.lib.purdue.edu/ecetr/4/

  13. Necula, G.C., McPeak, S., Rahul, S.P., Weimer, W.: CIL: Intermediate language and tools for analysis and transformation of C programs. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 213–228. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  14. GCC 4.5 release series changes, new features, and fixes, http://gcc.gnu.org/gcc-4.5/changes.html

  15. Huang, X., Seyster, J., Callanan, S., Dixit, K., Grosu, R., Smolka, S.A., Stoller, S.D., Zadok, E.: Software monitoring with controllable overhead. International Journal on Software Tools for Technology Transfer (STTT) (2010) (accepted for publication)

    Google Scholar 

  16. Objective Caml, http://caml.inria.fr/index.en.html

  17. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–355. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  18. ACC, http://research.msrg.utoronto.ca/ACC

  19. Nicoara, A., Alonso, G., Roscoe, T.: Controlled, systematic, and efficient code replacement for running Java programs. In: Proceedings of the ACM EuroSys Conference, Glasgow, Scotland, UK (April 2008)

    Google Scholar 

  20. Aspicere, http://sailhome.cs.queensu.ca/~bram/aspicere

  21. Rohlik, O., Pasetti, A., Cechticky, V., Birrer, I.: Implementing adaptability in embedded software through aspect oriented programming. In: IEEE Mechatronics & Robotics, pp. 85–90 (2004)

    Google Scholar 

  22. Spinczyk, O., Lohmann, D.: The design and implementation of AspectC++. Know.-Based Syst. 20(7), 636–651 (2007)

    Article  Google Scholar 

  23. Valgrind, http://valgrind.org

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Seyster, J. et al. (2010). Aspect-Oriented Instrumentation with GCC. In: Barringer, H., et al. Runtime Verification. RV 2010. Lecture Notes in Computer Science, vol 6418. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-16612-9_31

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-16612-9_31

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-16611-2

  • Online ISBN: 978-3-642-16612-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics