This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: glibc build with gcov support
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Tatiana Udalova <t dot udalova at samsung dot com>, 'Ondřej Bílka' <neleai at seznam dot cz>
- Cc: libc-help at sourceware dot org, "'Slava Garbuzov'" <v dot garbuzov at samsung dot com>, "'Evgeny Gavrin'" <e dot gavrin at samsung dot com>, Jeff Law <law at redhat dot com>
- Date: Tue, 19 Nov 2013 15:24:39 -0500
- Subject: Re: glibc build with gcov support
- Authentication-results: sourceware.org; auth=none
- References: <001201cee4f4$36da6a80$a48f3f80$%udalova at samsung dot com> <20131119080808 dot GA13376 at domone dot podge> <002001cee505$0a4fc440$1eef4cc0$%udalova at samsung dot com>
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.