Re: Ping [PATCH] Add condition coverage profiling

2022-11-10 Thread Martin Liška
On 11/2/22 07:16, Jørgen Kvalsvik via Gcc-patches wrote: Ping. I would like to see this become a part of gcc 13, will we be able to commit before the window closes? Hello. I'm sorry but I was interrupted by the Sphinx conversion task. Anyway, please update the coding style and I can return

[Ping 2][PATCH] Add condition coverage profiling

2022-11-09 Thread Jørgen Kvalsvik via Gcc-patches
On 02/11/2022 07:16, Jørgen Kvalsvik wrote: > On 25/10/2022 08:33, Jørgen Kvalsvik wrote: >> On 12/10/2022 12:16, Jørgen Kvalsvik wrote: >>> This patch adds support in gcc+gcov for modified condition/decision >>> coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of >>> test/code

Ping [PATCH] Add condition coverage profiling

2022-11-02 Thread Jørgen Kvalsvik via Gcc-patches
On 25/10/2022 08:33, Jørgen Kvalsvik wrote: > On 12/10/2022 12:16, Jørgen Kvalsvik wrote: >> This patch adds support in gcc+gcov for modified condition/decision >> coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of >> test/code coverage and it is particularly important in the

Re: Ping [PATCH] Add condition coverage profiling

2022-10-27 Thread Martin Liška
On 10/25/22 08:33, Jørgen Kvalsvik wrote: Gentle ping. I have a tuned the summary output slightly (decisions covered -> condition outcomes covered) already. Sorry for a small delay, I'm working on it. One general issue I noticed is you use an invalid coding style, where you use 4 spaces for

Ping [PATCH] Add condition coverage profiling

2022-10-25 Thread Jørgen Kvalsvik via Gcc-patches
On 12/10/2022 12:16, Jørgen Kvalsvik wrote: > This patch adds support in gcc+gcov for modified condition/decision > coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of > test/code coverage and it is particularly important in the avation and > automotive industries for

Re: [PATCH] Add condition coverage profiling

2022-10-18 Thread Jørgen Kvalsvik via Gcc-patches
On 18/10/2022 02:17, Hans-Peter Nilsson wrote: > On Wed, 12 Oct 2022, Jørgen Kvalsvik via Gcc-patches wrote: >> This patch adds support in gcc+gcov for modified condition/decision >> coverage (MC/DC) with the -fprofile-conditions flag. > > I'd love improvements in this area. > > But this is a

Re: [PATCH] Add condition coverage profiling

2022-10-17 Thread Hans-Peter Nilsson
On Wed, 12 Oct 2022, Jørgen Kvalsvik via Gcc-patches wrote: > This patch adds support in gcc+gcov for modified condition/decision > coverage (MC/DC) with the -fprofile-conditions flag. I'd love improvements in this area. But this is a serious concern: > gcov --conditions: > > 3:

[PATCH] Add condition coverage profiling

2022-10-12 Thread Jørgen Kvalsvik via Gcc-patches
This patch adds support in gcc+gcov for modified condition/decision coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of test/code coverage and it is particularly important in the avation and automotive industries for safety-critical applications. MC/DC it is required for or

Re: [PATCH] Add condition coverage profiling

2022-08-04 Thread Jørgen Kvalsvik via Gcc-patches
On 04/08/2022 09:43, Sebastian Huber wrote: > On 02/08/2022 09:58, Jørgen Kvalsvik wrote: >> Based on this established terminology I can think of a few good candidates: >> >> condition outcomes covered n/m >> outcomes covered n/m >> >> What do you think? > > Both are fine, but I would prefer

Re: [PATCH] Add condition coverage profiling

2022-08-04 Thread Sebastian Huber
On 02/08/2022 09:58, Jørgen Kvalsvik wrote: Based on this established terminology I can think of a few good candidates: condition outcomes covered n/m outcomes covered n/m What do you think? Both are fine, but I would prefer "condition outcomes covered n/m". -- embedded brains GmbH Herr

Re: [PATCH] Add condition coverage profiling

2022-08-02 Thread Jørgen Kvalsvik via Gcc-patches
On 15/07/2022 15:47, Jørgen Kvalsvik wrote: > On 15/07/2022 15:31, Sebastian Huber wrote: >> On 15.07.22 13:47, Jørgen Kvalsvik via Gcc-patches wrote: >>> 2. New vocabulary for the output - decisions for, well, the decisions. It >>> also >>> writes at most one line per condition: >>> >>>

Re: [PATCH] Add condition coverage profiling

2022-07-15 Thread Jørgen Kvalsvik via Gcc-patches
On 15/07/2022 15:31, Sebastian Huber wrote: > On 15.07.22 13:47, Jørgen Kvalsvik via Gcc-patches wrote: >> 2. New vocabulary for the output - decisions for, well, the decisions. It >> also >> writes at most one line per condition: >> >> decisions covered 1/4 >> condition  0 not covered

Re: [PATCH] Add condition coverage profiling

2022-07-15 Thread Sebastian Huber
On 15.07.22 13:47, Jørgen Kvalsvik via Gcc-patches wrote: 2. New vocabulary for the output - decisions for, well, the decisions. It also writes at most one line per condition: decisions covered 1/4 condition 0 not covered (true false) condition 1 not covered (true)

Re: [PATCH] Add condition coverage profiling

2022-07-15 Thread Jørgen Kvalsvik via Gcc-patches
On 15/07/2022 13:39, Jørgen Kvalsvik wrote: > This patch adds support in gcc+gcov for modified condition/decision > coverage (MC/DC) with the -fprofile-conditions flag. Hello, I have updated this patch based on the feedback from Sebastian and Martin. 1. The description of the masking_vector

[PATCH] Add condition coverage profiling

2022-07-15 Thread Jørgen Kvalsvik via Gcc-patches
This patch adds support in gcc+gcov for modified condition/decision coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of test/code coverage and it is particularly important in the avation and automotive industries for safety-critical applications. MC/DC it is required for or

Re: [PATCH] Add condition coverage profiling

2022-07-12 Thread Jørgen Kvalsvik via Gcc-patches
On 12/07/2022 16:05, Sebastian Huber wrote: > Hello Jørgen, > > thanks for the updated patch. I used it for a test suite run and the results > look quite good. > > Could you please add this hunk to your patch set: > > diff --git a/libgcc/libgcov-merge.c b/libgcc/libgcov-merge.c > index

Re: [PATCH] Add condition coverage profiling

2022-07-12 Thread Sebastian Huber
Hello Jørgen, thanks for the updated patch. I used it for a test suite run and the results look quite good. Could you please add this hunk to your patch set: diff --git a/libgcc/libgcov-merge.c b/libgcc/libgcov-merge.c index 89741f637e1..9e3e8ee5657 100644 --- a/libgcc/libgcov-merge.c +++

[PATCH] Add condition coverage profiling

2022-07-11 Thread Jørgen Kvalsvik via Gcc-patches
This patch adds support in gcc+gcov for modified condition/decision coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of test/code coverage and it is particularly important in the avation and automotive industries for safety-critical applications. MC/DC it is required for or

Re: [PATCH] Add condition coverage profiling

2022-07-11 Thread Jørgen Kvalsvik via Gcc-patches
On 08/07/2022 15:45, Sebastian Huber wrote: > Hello Jørgen, > > some time passed. It would be nice if you could give a status update. I am > quite > interested in your work. > > Best regards, >     Sebastian > I'm sorry for the late updates. There have have been a lot of issues (with the

Re: [PATCH] Add condition coverage profiling

2022-07-08 Thread Sebastian Huber
Hello Jørgen, some time passed. It would be nice if you could give a status update. I am quite interested in your work. Best regards, Sebastian -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94

Re: [PATCH] Add condition coverage profiling

2022-04-22 Thread Jørgen Kvalsvik via Gcc-patches
On 22/04/2022 07:37, Sebastian Huber wrote: > > > On 17/04/2022 13:27, Jørgen Kvalsvik wrote: >>> In theory, would it be possible to print the state of the truth table with >>> the >>> information available in the gcda and gcno files? For example: >>> >>> Truth table for: a && (b || c)) && d

Re: [PATCH] Add condition coverage profiling

2022-04-21 Thread Sebastian Huber
On 17/04/2022 13:27, Jørgen Kvalsvik wrote: In theory, would it be possible to print the state of the truth table with the information available in the gcda and gcno files? For example: Truth table for: a && (b || c)) && d 0 | 1 | 2 | 3 || covered --+---+---+---++ 0 | X | X | X || Y

Re: [PATCH] Add condition coverage profiling

2022-04-19 Thread Jørgen Kvalsvik via Gcc-patches
On 07/04/2022 14:04, Martin Liška wrote: > On 3/28/22 16:40, Jørgen Kvalsvik via Gcc-patches wrote: >> ... And with another tiny change that fixes Martin's while (1); case. > > Hello. > > Back to this ;) Thank you for the updated version of the patch. I have a > couple > of comments/requests:

Re: [PATCH] Add condition coverage profiling

2022-04-17 Thread Jørgen Kvalsvik via Gcc-patches
On 06/04/2022 09:35, Sebastian Huber wrote: > Ok, for the default output this is good. The output can be explained in the > documentation. I will try to help here. Splendid, thanks! I would be perfectly happy with better and/or more intuitive messages too, but I figured it shouldn't delay the

Re: [PATCH] Add condition coverage profiling

2022-04-08 Thread Sebastian Huber
On 08/04/2022 09:33, Jørgen Kvalsvik wrote: On 08/04/2022 09:28, Jørgen Kvalsvik wrote: On 07/04/2022 18:53, Sebastian Huber wrote: Hello Jørgen, there could be an issue with conditions in for loops:     3:  189:  for (int a = 0; a <= 1; ++a) { branch  0 taken 2 branch  1 taken 1

[PATCH] Add condition coverage profiling

2022-04-08 Thread Jørgen Kvalsvik via Gcc-patches
On 08/04/2022 09:28, Jørgen Kvalsvik wrote: > On 07/04/2022 18:53, Sebastian Huber wrote: >> Hello Jørgen, >> >> there could be an issue with conditions in for loops: >> >>     3:  189:  for (int a = 0; a <= 1; ++a) { >> branch  0 taken 2 >> branch  1 taken 1 (fallthrough) >> conditions

[PATCH] Add condition coverage profiling

2022-04-08 Thread Jørgen Kvalsvik via Gcc-patches
On 07/04/2022 18:53, Sebastian Huber wrote: > Hello Jørgen, > > there could be an issue with conditions in for loops: > >     3:  189:  for (int a = 0; a <= 1; ++a) { > branch  0 taken 2 > branch  1 taken 1 (fallthrough) > conditions covered 0/2 > condition  0 not covered (true) > condition 

Re: [PATCH] Add condition coverage profiling

2022-04-07 Thread Sebastian Huber
Hello Jørgen, there could be an issue with conditions in for loops: 3: 189: for (int a = 0; a <= 1; ++a) { branch 0 taken 2 branch 1 taken 1 (fallthrough) conditions covered 0/2 condition 0 not covered (true) condition 0 not covered (false) -- embedded brains GmbH Herr Sebastian

Re: [PATCH] Add condition coverage profiling

2022-04-07 Thread Martin Liška
On 3/28/22 16:40, Jørgen Kvalsvik via Gcc-patches wrote: ... And with another tiny change that fixes Martin's while (1); case. Hello. Back to this ;) Thank you for the updated version of the patch. I have a couple of comments/requests: 1) I noticed the following cannot be linked: $ cat

Re: [PATCH] Add condition coverage profiling

2022-04-06 Thread Sebastian Huber
On 05/04/2022 22:07, Jørgen Kvalsvik wrote: In action it looks pretty similar to the branch coverage. The -g short opt carries no significance, but was chosen because it was an available option with the upper-case free too. gcov --conditions: 3:   17:void fn (int a, int b, int c, int

[PATCH] Add condition coverage profiling

2022-04-05 Thread Jørgen Kvalsvik via Gcc-patches
On 04/04/2022 10:14, Sebastian Huber wrote: > Hello Jørgen, > > having support for MC/DC coverage in GCC would be really nice. I tried out > your > latest patch on an arm cross-compiler with Newlib (inhibit_libc is defined). > Could you please add the following fix to your patch: > > diff --git

Re: [PATCH] Add condition coverage profiling

2022-04-05 Thread Sebastian Huber
Hello Jørgen, On 04/04/2022 10:14, Sebastian Huber wrote: It seems that support for the new GCOV_TAG_CONDS is missing in gcov-tool and gcov-dump, see "tag_table" in gcc/gcov-dump.c and libgcc/libgcov-util.c. it seems that for gcov-tool no changes are necessary. You added the condition bit

Re: [PATCH] Add condition coverage profiling

2022-04-04 Thread Sebastian Huber
Hello Jørgen, having support for MC/DC coverage in GCC would be really nice. I tried out your latest patch on an arm cross-compiler with Newlib (inhibit_libc is defined). Could you please add the following fix to your patch: diff --git a/libgcc/libgcov-merge.c b/libgcc/libgcov-merge.c index

Re: [PATCH] Add condition coverage profiling

2022-03-28 Thread Martin Liška
On 3/25/22 20:44, Jørgen Kvalsvik wrote: Hello, and thanks for the review! 1) Do I correctly understand that __conditions_accu_true/false track every short-circuit sub-expression of a condition and record if a given sub-expr is seen to be true or false? Sort-of. It is not really aware of

[PATCH] Add condition coverage profiling

2022-03-25 Thread Jørgen Kvalsvik via Gcc-patches
Hello, and thanks for the review! > 1) Do I correctly understand that __conditions_accu_true/false track > every short-circuit sub-expression of a condition and record > if a given sub-expr is seen to be true or false? Sort-of. It is not really aware of sub-expressions at all, but tracks every

Re: [PATCH] Add condition coverage profiling

2022-03-24 Thread Martin Liška
On 3/21/22 12:55, Jørgen Kvalsvik via Gcc-patches wrote: Hello. Thanks for very interesting extension of the existing GCOV profiling. I briefly read the patch and investigated what happens and I've got various questions/comments about it: 1) Do I correctly understand that

[PATCH] Add condition coverage profiling

2022-03-21 Thread Jørgen Kvalsvik via Gcc-patches
.cc| 838 + 11 files changed, 2248 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/g++.dg/gcov/gcov-18.C create mode 100644 gcc/testsuite/gcc.misc-tests/gcov-19.c From 6d0650340e538d8dd0ccc8369a89ba9b99d7904c Mon Sep 17 00:00:00 2001 From: =?U