public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Monitoring reads to members of global_options
@ 2014-09-02  3:24 Mateus Borges
  0 siblings, 0 replies; only message in thread
From: Mateus Borges @ 2014-09-02  3:24 UTC (permalink / raw)
  To: gcc-help

Hello everyone. I'm trying to instrument GCC to log reads of the
variables inside global_options. I managed to implement a (dumb)
version of this by wrapping all references of those variables with
a inline function, contained inside gcc/system.h.

To speed things up, I want to log only reads where the current
value is not the same of the previous one. After some frustrated
attempts with global variables, I'm now using a
singleton (class/members declared in system.h, implemented in a
new file) to store previous values and log the access if needed.

Now I need to compile this new file, and add the resulting object
file as input to the compilation of the instrumented source files.
Looking at the documentation, I guess that I need to edit
gcc/Makefile.in. However, I don't know exactly what to edit -
can you guys give me some pointers?

Ps: other implementation ideas are also welcome :)


Thanks,
Mateus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-02  3:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-02  3:24 Monitoring reads to members of global_options Mateus Borges

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).