This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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: glibc build with gcov support


On 11/19/2013 03:55 AM, Tatiana Udalova wrote:
> I wanna check Glibc test coverage to be able to find untested functions.
> 
> As far as I understand oprofile isn't suitable for it:
> It'll give me information about running code only.

It is currently not possible to build glibc with coverage support.
The circular dependencies from the code coverage system to the C 
library make it impossible to compile glibc.

I would be happy to review patches to add support for building
glibc with code coverage (gcov support), but it would take some
effort to implement and is not a small weekend project.

The alternative as Ondrej suggests is to use oprofile. Using
oprofile is suitable for coverage measurement of glibc.

Your statement "It'll give me information about running code only"
is true for all coverage testing, both gcov and oprofile require
you run code in order to get coverage data. There is no other way
to determine if a code path is taken without running code and
analysing the resulting data (except for static analysis).

So you have two options:
* Implement gcov support for glibc.
* Use oprofile.

If you use oprofile I would be interested in seeing a published
report of how you used it and what kind of coverage you had?

I'm sure the community would be interested in maintaining
oprofile scripts to get coverage data on the project e.g. 
Use oprofile in conjunction with the entire testsuite run
to gather coverage information.

Keep us updated.

Cheers,
Carlos.


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