This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: instrumentation injection & trees



On Mar 3, 2005, at 6:12 PM, jason@sourcelabs.com wrote:


I'm new to the gcc community. I've been asked to modify gcc to allow it
to inject various kinds of instrumentation during compilation. My current
plan is to capture the tree being generated by the front end, augment it,
and pass it on to the back end. It seems like a reasonable approach but I
can't find much information about interpreting and manipulating trees.


Does anyone have any information about this technique of wedging code
between the front and back ends, or, better yet, some examples? Is there
a better approach? Are there existing tools that might eliminate the need
to write this instrumentation injector from scratch?

If you are going this for 4.0.0 and above, you might want to look into gimplify_function_tree and the code for flag_instrument_function_entry_exit.


-- Pinski



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]