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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
AT&T Research Labs. Graphviz (2009), http://www.graphviz.org
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)
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)
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)
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)
Chiba, S.: Load-time structural reflection in Java. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, p. 313. Springer, Heidelberg (2000)
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)
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)
AspectJ, http://www.eclipse.org/aspectj
Arachne, http://www.emn.fr/x-info/arachne
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/
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)
GCC 4.5 release series changes, new features, and fixes, http://gcc.gnu.org/gcc-4.5/changes.html
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)
Objective Caml, http://caml.inria.fr/index.en.html
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)
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)
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)
Spinczyk, O., Lohmann, D.: The design and implementation of AspectC++. Know.-Based Syst. 20(7), 636–651 (2007)
Valgrind, http://valgrind.org
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)