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: Help in Load Store Instrumentation


Rajkishore Barik wrote:
I am a newbie to GCC development community. Can
someone help me in instrumenting loads/stores in GCC?

There are many places that loads/stores can be emitted, so this may not be very easy. emit_move_insn is a good place to start though. Also, a typical program has many loads/stores, so trying to instrument them is likely to add a lot of overheard.


You might try looking at some solutions implemented by other people. Current sources have mudflap which does some load/store instrumentation to detect programming errors.

There were the gcc patches for Checker. I don't know if there is a current maintained version of these patches, but if you grab a copy of gcc-2.8.1 from the old-releases directory on our web site, and grep for flag_check_memory_usage you can see what these patches did.

> want to get the runtime values back into the GCC
> component in the next run. Any help will be highly

Maybe you want to look at the value profiling support in the current gcc sources then. See the gcc/value-prof.c file. See the options -fprofile-values and -fpvt (profile value transformations). See also -fprofile-generate and -fprofile-use which turn these options on.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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