#4196 closed enhancement (fixed)

Improve gcov support provided by GCC for RTEMS

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: tool/gcc Version: 6
Severity: normal Keywords: qualification
Cc: Blocked By:
Blocking: #4670

Description (last modified by Sebastian Huber)

If we want to use gcov in RTEMS to get code coverage in all system states, then we need some tweaks in GCC:

https://gcc.gnu.org/pipermail/gcc/2020-November/234164.html

The linker set based gcov information registration is already included in GCC:

https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section

There is a discussion about how the gcov information can be transferred from the embedded system to the host:

https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559342.html

The following patch set was integrated in GCC 13:

https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593536.html

https://gcc.gnu.org/onlinedocs/gcc/Freestanding-Environments.html#Freestanding-Environments

Attachments (13)

0001-gcov-Add-fprofile-info-section-support.patch (7.2 KB) - added by Sebastian Huber on 12/02/20 at 09:54:29.
0001-gcov-Fix-use-of-profile-info-section.patch (1.4 KB) - added by Sebastian Huber on 07/21/21 at 09:44:53.
0002-gcov-Add-__gcov_info_to_gdca.patch (18.0 KB) - added by Sebastian Huber on 07/21/21 at 09:45:10.
0001-Remove-wrong-bail-out-in-prune_topn_counter.patch (73.7 KB) - added by Sebastian Huber on 07/21/21 at 13:33:53.
0001-Back-port-__gcov_info_to_gcda-to-GCC-10.patch (78.4 KB) - added by Sebastian Huber on 08/06/21 at 15:24:11.
0001-Back-port-v2-of-__gcov_info_to_gcda-to-GCC-10.patch (81.4 KB) - added by Sebastian Huber on 08/09/21 at 15:29:56.
0001-Back-port-v3-of-__gcov_info_to_gcda-to-GCC-10.patch (82.5 KB) - added by Sebastian Huber on 08/09/21 at 18:44:12.
0001-Back-port-v4-of-__gcov_info_to_gcda-to-GCC-10.patch (84.0 KB) - added by Sebastian Huber on 08/30/21 at 08:48:43.
0001-Back-port-v5-of-__gcov_info_to_gcda-to-GCC-10.patch (85.0 KB) - added by Sebastian Huber on 08/30/21 at 12:02:33.
0001-Back-port-v1-of-gcov-tool-merge-stream-to-GCC-12.patch (55.3 KB) - added by Sebastian Huber on 05/03/22 at 06:13:16.
0001-Back-port-v6-of-gcov-improvements-to-GCC-10.patch (164.1 KB) - added by Sebastian Huber on 06/21/22 at 07:15:58.
0001-Back-port-v7-of-gcov-improvements-to-GCC-10.patch (165.4 KB) - added by Sebastian Huber on 06/29/22 at 07:19:49.
0001-Back-port-v8-of-gcov-improvements-to-GCC-10.patch (167.2 KB) - added by Sebastian Huber on 06/29/22 at 08:31:28.

Download all attachments as: .zip

Change History (26)

comment:1 Changed on 12/02/20 at 10:24:27 by Sebastian Huber <sebastian.huber@…>

In 1d9f5d0/rtems-source-builder:

6: Add support for gcov info section

Update #4196.

comment:2 Changed on 06/18/21 at 09:24:45 by Sebastian Huber

Keywords: qualification added

Changed on 07/21/21 at 09:45:10 by Sebastian Huber

comment:3 Changed on 08/06/21 at 05:33:18 by Sebastian Huber

The __gcov_info_to_gcda() function is now integrated in GCC:

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9124bbe1857f0d3a3015d6461d5f8d04f07cab85

Last edited on 08/06/21 at 05:33:41 by Sebastian Huber (previous) (diff)

comment:4 Changed on 08/06/21 at 16:39:49 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 6c0d7b6/rtems-source-builder:

6: Back port gcov_info_to_gcda() to GCC 10

Close #4196.

comment:5 Changed on 08/09/21 at 15:21:01 by Sebastian Huber

There are issues with multi-threaded programs:

https://gcc.gnu.org/pipermail/gcc/2021-August/237058.html

comment:6 Changed on 08/09/21 at 15:59:04 by Sebastian Huber <sebastian.huber@…>

In ca5c27d/rtems-source-builder:

6: Back port v2 of gcov_info_to_gcda() to GCC 10

Update #4196.

comment:7 Changed on 08/09/21 at 19:05:23 by Sebastian Huber <sebastian.huber@…>

In ec495e0/rtems-source-builder:

6: Back port v3 of gcov_info_to_gcda() to GCC 10

Update #4196.

comment:8 Changed on 09/01/21 at 15:50:46 by Sebastian Huber <sebastian.huber@…>

In a1f7b3b/rtems-source-builder:

6: Back port v5 of gcov_info_to_gcda() to GCC 10

Update #4196.

comment:9 Changed on 05/03/22 at 06:01:44 by Sebastian Huber

Description: modified (diff)

comment:10 Changed on 05/04/22 at 05:47:29 by Sebastian Huber <sebastian.huber@…>

In 22e32ec/rtems-source-builder:

7: Back port gcov-tool merge-stream to GCC 12

Update #4196.

comment:11 Changed on 06/21/22 at 14:16:49 by Sebastian Huber <sebastian.huber@…>

In cf0914f/rtems-source-builder:

6: Back port v6 of gcov improvements to GCC 10

Update #4196.

comment:12 Changed on 06/28/22 at 06:38:43 by Sebastian Huber

Blocking: 4670 added

comment:13 Changed on 06/29/22 at 09:29:52 by Sebastian Huber <sebastian.huber@…>

In 9474bb8/rtems-source-builder:

6: Back port v8 of gcov improvements to GCC 10

Update #4196.

Note: See TracTickets for help on using tickets.