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?

Should templates with multiple instantiations contribute to summaries in gcov?

2022-08-03 Thread Jørgen Kvalsvik
I have this program: #include template T add (T x, T y) { if (x > y) return x + y; else return x; } template T sub (T x, T y) { if (x > y) return x - y; else return x; } int main() { int i1 = 10; int i2 = 12; double d1 = 10.0;

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

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/

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_

[PATCH] Add condition coverage profiling

2022-07-15 Thread Jørgen Kvalsvik via Gcc-patches
rams functions. Some of these were designed by hand to test for specific behaviours and graph shapes, and some are previously-failed test cases in other programs adapted into the test suite. Alternative author email: Jørgen Kvalsvik gcc/ChangeLog: * builtins.cc (expand_builtin_fork_or_exec

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

[PATCH] Add condition coverage profiling

2022-07-11 Thread Jørgen Kvalsvik via Gcc-patches
ntains a lot of small programs functions. Some of these were designed by hand to test for specific behaviours and graph shapes, and some are previously-failed test cases in other programs adapted into the test suite. Alternative author email: Jørgen Kvalsvik gcc/ChangeLog: * builtins.cc

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

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

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

[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 >&g

[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 

[PATCH] Add condition coverage profiling

2022-04-05 Thread Jørgen Kvalsvik via Gcc-patches
f L_gcov_merge_topn >  void __gcov_merge_topn (gcov_type *counters  __attribute__ ((unused)), >     unsigned n_counters __attribute__ ((unused))) {} > > It seems that support for the new GCOV_TAG_CONDS is missing in gcov-tool and > gcov-dump, see "tag_table"

[PATCH] Add condition coverage profiling

2022-03-25 Thread Jørgen Kvalsvik via Gcc-patches
asp when supported by a lot of example graphs and stepping. I will try to type up a bunch with the paper and publish, but for now all I have is the code (which I hope for the most part is easy to follow). I'll update this with style updates and atomics support, but I would prefer a maintainer to mak

[PATCH] Add condition coverage profiling

2022-03-21 Thread Jørgen Kvalsvik via Gcc-patches
u would expect coverage, but it gets neither branch nor condition coverage. For completeness, it could be achieved by scanning all gimple statements for comparisons, and insert an extra instruction for recording the outcome. The test suite consists of all different CFG kinds and control flow structu

<    1   2