On Monday 27 July 2009, He fei wrote:
> Hi Josef,
> Thanks for your input~
> 
> So you mean there doesn't actually exist a real code coverage tool within
> Valgrind that can act like gconv?

I suppose you talk about "gcov". Actually, AFAIK, no.

> Then what about execute valgrind with the target program and then gconv it
> (with gconv option turned on during gcc compilation)?

If you recompile your code for use with gcov, why would you use a Valgrind
tool at all? What is the expected benefit?

Perhaps I misunderstood your request: I never used gcov myself.

Josef

> 
> Will this does the trick?
> 
> Regards,
> 
> -Fei
> 
> On Mon, Jul 27, 2009 at 3:43 PM, Josef Weidendorfer <
> [email protected]> wrote:
> 
> > On Monday 27 July 2009, He fei wrote:
> > > Hi All,
> > > My current project works on a unit testing with Valgrind. In order to
> > better
> > > test the code, a code coverage output with Valgrind is desired.
> > > I've looked into Cachegrind and Callgrind and I believe callgrind is more
> > > close to what I need.
> > >
> > > But after running callgrind, I was dissapointted as it doesn't provide a
> > > general code percentile summary (like how many lines have been covered),
> > but
> > > rather how many instruction covered.
> >
> > Because Cachegrind/Callgrind never touches code which was not executed, you
> > can not
> > calculate a percentile summary of covered code. There needs to be a
> > detection phase
> > of what source code lines exist even if no code was executed from them.
> > This could
> > then be combined with Callgrinds/Cachegrinds data to provide the summary
> > you want.
> >
> > > I googled online and found no clue info regarding this. The most possible
> > > approach will be http://www.brainmurders.eclipse.co.uk/covergrind.html,
> > > which will require extra effort in compiling and add-on.
> >
> > In Covergrind, I only see the metric "LinesTouched". No idea if it provides
> > "LinesNotTouched" which would be required.
> >
> > Josef
> >
> > >
> > > I wonder if there's option or combined method within current Valgrind
> > > framework that this can be done.
> > >
> > > Best regards,
> > >
> >
> >
> >
> 
> 



------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to