[PATCH 3/7] GCOV: add support for lines with an unexecuted lines.
Nathan Sidwell
nathan@acm.org
Mon Oct 30 12:27:00 GMT 2017
On 10/26/2017 04:11 AM, marxin wrote:
> It's possible to have a line of code that has a non-zero coverage.
> However, it can contain unexecuted blocks and I hope adding a
> notification can be usefull. LLVM also does that:
> 1*: 5: int a = b < 1 ? (c < 3 ? d : c) : e;
A useful enhancement.
> function:@var{line_number},@var{execution_count},@var{function_name}
> -lcount:@var{line number},@var{execution_count}
> +lcount:@var{line number},@var{execution_count},@var{has_unexecuted_statement}
Is 'statement' the right phrase. Pedantically it is 'basic block',
which the documentation does discuss. So perhaps 'has_unexecuted_block'?
>
> @@ -341,6 +341,9 @@ used in a compilation unit. Such functions are marked with @samp{-}
> even though they contain a code. Use @option{-fkeep-inline-functions} and
> @option{-fkeep-static-functions} in order to properly
> record @var{execution_count} of such functions.
> +Executed lines having a statement with zero @var{execution_count} end with
> +@samp{*} character and are colored with magenta color with @option{-k}
> +option.
Same comment.
> + unsigned has_unexecuted_block : 1;
Heh, and the code matches my thought :)
Looks good otherwise, WDYT?
nathan
--
Nathan Sidwell
More information about the Gcc-patches
mailing list