public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* Checking libstdcxx coverage
@ 2022-11-10 15:53 Jakub Rachucki
  2022-11-10 15:55 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Rachucki @ 2022-11-10 15:53 UTC (permalink / raw)
  To: libstdc++

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

Dear all,

I am trying to check the coverage of the libstdc++. Is it possible to configure the build system to include coverage information only for libstdc++? So far, I have tried to configure the build system of the whole gcc using the --enable-coverage option and then run tests. Here is the complete configuration command:
../gcc/configure --prefix /home/jakub/gcc_install --enable-languages=c,c++ --disable-multilib --enable-coverage --disable-bootstrap

I build the GCC using:
make -j6

and run tests using:
make -k -j6 check

Running the test takes a very long time, most probably because of enabling the coverage flags for the whole GCC not only the C++ library. What's more, .gcno and .gcda files were not generated for libstdc++-v3.
I have also tried to run the libstdc++ test using :
make check-target-libstdc++-v3

or to enter the gcc-build-dir/x86_64-pc-linux-gnu/libstdc++-v3/ directory and run from there:
make -k check

In every case no coverage data is produced for libstdc++-v3.
I tried to manually include coverage flags in configure.ac and Makefile.am files. In this case coverage information were included. Nevertheless, the gcc build system is quite large and complex and I am not sure whether I have included the coverage flags in every needed place.

Is there an official way of generating coverage information for libstdc++-v3?
Best regards,
Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Checking libstdcxx coverage
  2022-11-10 15:53 Checking libstdcxx coverage Jakub Rachucki
@ 2022-11-10 15:55 ` Jonathan Wakely
  2022-11-10 16:00   ` Jakub Rachucki
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2022-11-10 15:55 UTC (permalink / raw)
  To: Jakub Rachucki; +Cc: libstdc++

On Thu, 10 Nov 2022 at 15:53, Jakub Rachucki via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
> Is there an official way of generating coverage information for libstdc++-v3?

No. You could try adding the flags via the --enable-cxx-flags option
which specifies the flags to use when compiling libstdc++.so

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Checking libstdcxx coverage
  2022-11-10 15:55 ` Jonathan Wakely
@ 2022-11-10 16:00   ` Jakub Rachucki
  2022-11-16 16:12     ` Jakub Rachucki
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Rachucki @ 2022-11-10 16:00 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++

Ok, thank you Jonathan, I will try it!

-----Original Message-----
From: Jonathan Wakely <jwakely.gcc@gmail.com> 
Sent: 10 November 2022 16:56
To: Jakub Rachucki <jrachucki@n7space.com>
Cc: libstdc++@gcc.gnu.org
Subject: Re: Checking libstdcxx coverage

On Thu, 10 Nov 2022 at 15:53, Jakub Rachucki via Libstdc++ <libstdc++@gcc.gnu.org> wrote:
> Is there an official way of generating coverage information for libstdc++-v3?

No. You could try adding the flags via the --enable-cxx-flags option which specifies the flags to use when compiling libstdc++.so

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Checking libstdcxx coverage
  2022-11-10 16:00   ` Jakub Rachucki
@ 2022-11-16 16:12     ` Jakub Rachucki
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Rachucki @ 2022-11-16 16:12 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

I have configured, built, and run tests using the "--enable-cxx-flags="--coverage"" flag. But it resulted in almost 0% coverage. I am wondering if --enable-cxx-flags also modifies linker flags? If not, then I think a coverage was measured incorrectly and this is a reason why it is so low. What do you think @Jonathan<mailto:jwakely.gcc@gmail.com>, is there a flag that also affects linker flags?



-----Original Message-----
From: Jakub Rachucki
Sent: 10 November 2022 17:01
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: libstdc++@gcc.gnu.org
Subject: RE: Checking libstdcxx coverage



Ok, thank you Jonathan, I will try it!



-----Original Message-----

From: Jonathan Wakely <jwakely.gcc@gmail.com<mailto:jwakely.gcc@gmail.com>>

Sent: 10 November 2022 16:56

To: Jakub Rachucki <jrachucki@n7space.com<mailto:jrachucki@n7space.com>>

Cc: libstdc++@gcc.gnu.org<mailto:libstdc++@gcc.gnu.org>

Subject: Re: Checking libstdcxx coverage



On Thu, 10 Nov 2022 at 15:53, Jakub Rachucki via Libstdc++ <libstdc++@gcc.gnu.org<mailto:libstdc++@gcc.gnu.org>> wrote:

> Is there an official way of generating coverage information for libstdc++-v3?



No. You could try adding the flags via the --enable-cxx-flags option which specifies the flags to use when compiling libstdc++.so

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-16 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 15:53 Checking libstdcxx coverage Jakub Rachucki
2022-11-10 15:55 ` Jonathan Wakely
2022-11-10 16:00   ` Jakub Rachucki
2022-11-16 16:12     ` Jakub Rachucki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).