From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86892 invoked by alias); 30 Oct 2017 12:21:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 86853 invoked by uid 89); 30 Oct 2017 12:21:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=coverage X-HELO: mail-yw0-f195.google.com Received: from mail-yw0-f195.google.com (HELO mail-yw0-f195.google.com) (209.85.161.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Oct 2017 12:21:43 +0000 Received: by mail-yw0-f195.google.com with SMTP id q126so11315223ywq.10 for ; Mon, 30 Oct 2017 05:21:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r3aTAS1u7ECQT6/LcAMHluXpzc2oBXoZ3j4KSm36ukE=; b=MbYChjek9rVakzYoE81Tf9AYJ3nutVhL2Wc1OTDhiA/Gon/rjbUkTlkHXFLzwQaEBa lTlKpdtNxsSwj6UsQBJvKBbPrkyo4In5yvM4ALlm+xexbPhjAsd75OB5xW5FQVqeccaY 0K87HnlMbTCRHW1OX2cBOLmttpOgR/Y2QGDEmQJxsO5k/STMyiHeQTeYdgdW/KXmoH2X sxI4uauFd5C6igjSya1FeI4WZORH7bGzAc8BkNRjpjodAC6CRTPk8Dryy7CQCctoMRJE kmbTa1sHrzsfRGwUScVjPoaNrDymbQkEQrmHfOLTds9jONY0ps34tLcs/JmI6j4zbYNr Cs7Q== X-Gm-Message-State: AMCzsaW4SHhSSXuza0apUrp1ipu5tmV5llWGT8iC2IDGoqc9i5MKJa7A Mjka26pB+GMQTnP2+R/c1vc= X-Google-Smtp-Source: ABhQp+SldO188r+4rkhDfNvxAHOTEtaiaDp302GEJ00G0ru81k3akvxtak/nntxDcju4fiiMI8UXFQ== X-Received: by 10.13.229.131 with SMTP id o125mr5564978ywe.377.1509366101116; Mon, 30 Oct 2017 05:21:41 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254? ([2620:10d:c091:200::3:68fe]) by smtp.googlemail.com with ESMTPSA id k16sm7091253ywh.18.2017.10.30.05.21.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Oct 2017 05:21:40 -0700 (PDT) Subject: Re: [PATCH 3/7] GCOV: add support for lines with an unexecuted lines. To: marxin , gcc-patches@gcc.gnu.org References: From: Nathan Sidwell Message-ID: Date: Mon, 30 Oct 2017 12:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-10/txt/msg02187.txt.bz2 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