From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24696 invoked by alias); 1 Oct 2011 04:15:54 -0000 Received: (qmail 24688 invoked by uid 22791); 1 Oct 2011 04:15:51 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 Oct 2011 04:15:30 +0000 Received: from hpaq7.eem.corp.google.com (hpaq7.eem.corp.google.com [172.25.149.7]) by smtp-out.google.com with ESMTP id p914FSGJ031230 for ; Fri, 30 Sep 2011 21:15:28 -0700 Received: from yxl31 (yxl31.prod.google.com [10.190.3.223]) by hpaq7.eem.corp.google.com with ESMTP id p914FQBq015846 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 30 Sep 2011 21:15:27 -0700 Received: by yxl31 with SMTP id 31so2129550yxl.19 for ; Fri, 30 Sep 2011 21:15:26 -0700 (PDT) Received: by 10.150.166.1 with SMTP id o1mr2115779ybe.315.1317442526288; Fri, 30 Sep 2011 21:15:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.166.1 with SMTP id o1mr2115772ybe.315.1317442525971; Fri, 30 Sep 2011 21:15:25 -0700 (PDT) Received: by 10.151.109.17 with HTTP; Fri, 30 Sep 2011 21:15:25 -0700 (PDT) In-Reply-To: <20111001011237.1CF69A6832@nabu.mtv.corp.google.com> References: <20111001011237.1CF69A6832@nabu.mtv.corp.google.com> Date: Sat, 01 Oct 2011 04:15:00 -0000 Message-ID: Subject: Re: Disable early inlining while compiling for coverage (issue5173042) From: Xinliang David Li To: Sharad Singhai Cc: reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2011-10/txt/msg00005.txt.bz2 Yes, this will improve test coverage option's usability, but please provide the example to explain the issues. David On Fri, Sep 30, 2011 at 6:12 PM, Sharad Singhai wrote: > This patch disables early inlining when --coverage option is > specified. This improves coverage data in presence of other > optimizations, specially with -O2 where early inlining changes the > control flow graph sufficiently enough to generate seemingly very odd > source coverage. > > Bootstrapped okay and regression tests passed. > > Okay for google/gcc-4_6? > > 2011-09-30 =A0 Sharad Singhai =A0 > > =A0 =A0 =A0 =A0* gcc.c (cc1_options): Added -fno-early-inlining for cover= age. > > Index: gcc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- gcc.c =A0 =A0 =A0 (revision 179402) > +++ gcc.c =A0 =A0 =A0 (working copy) > @@ -776,7 +776,7 @@ > =A0%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\ > =A0%{fsyntax-only:-o %j} %{-param*}\ > =A0%{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\ > - %{coverage:-fprofile-arcs -ftest-coverage}"; > + %{coverage:-fprofile-arcs -ftest-coverage -fno-early-inlining}"; > > =A0/* If an assembler wrapper is used to invoke post-assembly tools > =A0 =A0like MAO, --save-temps need to be passed to save the output of > > -- > This patch is available for review at http://codereview.appspot.com/51730= 42 >