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 ser

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: 17:vo

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 "cond

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 Seba

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: >>> >>> decis

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 (tr

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) Do

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 func

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 89741f637

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 +++ b/l

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 patch

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 7

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: S

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 rest

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 (fallth

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 H

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 erro

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

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 fi

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 8

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 sub-

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 __conditions_accu_tru