On Tue, Feb 26, 2008 at 12:58 PM, Josef Weidendorfer <[EMAIL PROTECTED]> wrote: > On Tuesday 26 February 2008, Konstantin Serebryany wrote: > > >> At instrumentation time, check if a given instruction is the first > > of a function according to debug information. > > Is that reliable? > > Does valgrind instrument each routine completely before starting > > another routine (I beg my pardon for my ignorance here). > > No. That's what I though.
> Why is this needed? Consider we have function FOO and BAR. (and for simplicity FOO calls BAR) We want to instrument everything in FOO and not instrument BAR. We enter FOO for the first time and instrument it's first superblock. Than we enter BAR and do not instrument it. Than we exit BAR and we are in FOO again, and we need to instrument a new portion of FOO, which is not the first in FOO. So, 'check if a given instruction is the first of a function according to debug information' is not sufficient. Do I miss something? --kcc > Only the parts which are to be executed are instrument before, at the > granularity of superblocks. This means that the function context can > change multiple times for one code piece to instrument. This can be > switched off to work on basic blocks instead (which Callgrind is doing). > > Josef > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers