From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28962 invoked by alias); 30 Oct 2017 12:15:42 -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 20552 invoked by uid 89); 30 Oct 2017 12:15:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-HELO:sk:mail-yw, H*r:sk:mail-yw, H*RU:sk:mail-yw, Hx-spam-relays-external:sk:mail-yw X-HELO: mail-yw0-f176.google.com Received: from mail-yw0-f176.google.com (HELO mail-yw0-f176.google.com) (209.85.161.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Oct 2017 12:15:33 +0000 Received: by mail-yw0-f176.google.com with SMTP id l32so11294806ywh.13 for ; Mon, 30 Oct 2017 05:15:33 -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=sjzlYGukukrkOlP+w/bUUyK8lTxDXlTHrrMfAdss5WQ=; b=n3F4/6f8fekqWCa2QwMIMXiVXCprLmmvYPHCQqTvWed0dI9zA7XSQqxjQh0TO9vxaQ P0sp98x9q9uNhU94PGPYW7SfT1RsqC1uQUKSVfeJSMLHOGSM6PbBKUpEjrOEk8M7PMLn QVlqQfQE4Nw2jIyEF0fdZUHABO3muxuPRIP3dMm71SToLoBSiLrSaeJucu/TdKnuKC3i 1+iB16gj7f993lMUngNmZqDDh9+mqIKE1QEafjD7ZY78UqBRQPy3ofzUxUz1NjMf73J1 G2sNcryuyakiJOS2iV7/w+OA8sqnkxb7waov0atRLoBT6CaIXhIsLTQxS4T2z6BTO5E9 KEgA== X-Gm-Message-State: AMCzsaUeDZfGEmeQTYEZ1abBJcL4pmHktCD0EH0fFU+oyVBX/wWlI53Y erjNar7pu0ZlX2qk76383YQ= X-Google-Smtp-Source: ABhQp+QYiFA2iPS2MrZhtpSLAOjn40WEt4U8CdIumQfX+N65f+Zx1YVUkc1TaCk8iiakECdCDnRSmA== X-Received: by 10.37.131.131 with SMTP id t3mr5857736ybk.9.1509365732028; Mon, 30 Oct 2017 05:15:32 -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 n134sm7647558ywn.27.2017.10.30.05.15.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Oct 2017 05:15:31 -0700 (PDT) Subject: Re: [PATCH 1/7] GCOV: document behavior of -fkeep-{static,inline}-functions (PR gcov-profile/82633). To: marxin , gcc-patches@gcc.gnu.org References: <22f49725f56049abf9bf99edd7e79728b180fad1.1509005504.git.mliska@suse.cz> From: Nathan Sidwell Message-ID: Date: Mon, 30 Oct 2017 12:17: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: <22f49725f56049abf9bf99edd7e79728b180fad1.1509005504.git.mliska@suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-10/txt/msg02184.txt.bz2 On 10/26/2017 04:11 AM, marxin wrote: > gcc/ChangeLog: > +++ b/gcc/doc/gcov.texi > @@ -327,6 +327,11 @@ non-exceptional paths or only exceptional paths such as C++ exception > handlers, respectively. Given @samp{-a} option, unexecuted blocks are > marked @samp{$$$$$} or @samp{%%%%%}, depending on whether a basic block > is reachable via non-exceptional or exceptional paths. > +Note that GCC can perform function removal for functions obviously not > +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. This reads a little oddly. How about: Note that GCC can completely remove the bodies of functions that are not needed -- for instance if they are inlined everywhere. Such functions are marked with @samp{-}, which can be confusing. Use the @option{-fkeep-inline-functions} and @option{-fkeep-static-functions} options to retain these functions and allow gcov to properly show their @var{execution_count}. Ok with that (or something approximating it). nathan -- Nathan Sidwell