From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10853 invoked by alias); 19 Nov 2018 15:53:18 -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 9874 invoked by uid 89); 19 Nov 2018 15:53:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,BODY_8BITS,GARBLED_BODY,GIT_PATCH_2,HTML_MESSAGE,KAM_SHORT,SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=H*MI:sk:2018110, H*r:Gateway, Instrument, displayed X-HELO: aserp2120.oracle.com Received: from aserp2120.oracle.com (HELO aserp2120.oracle.com) (141.146.126.78) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Nov 2018 15:53:02 +0000 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAJFnTg9098877; Mon, 19 Nov 2018 15:53:00 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2ntaxpxv3p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Nov 2018 15:52:59 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wAJFqxQj005982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Nov 2018 15:52:59 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wAJFqwSu023463; Mon, 19 Nov 2018 15:52:59 GMT Received: from dhcp-10-159-242-238.vpn.oracle.com (/10.159.242.238) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Nov 2018 07:52:58 -0800 From: Qing Zhao Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH]Come up with -flive-patching master option. Date: Mon, 19 Nov 2018 15:53:00 -0000 In-Reply-To: Cc: Jan Hubicka , Miroslav Benes , Martin Jambor , live-patching@vger.kernel.org, gcc Patches To: =?utf-8?Q?Martin_Li=C5=A1ka?= References: <1a023bdc-28a6-eb41-b449-4d096f12064f@suse.cz> <20181105095135.j3mnzox6rkktkoto@kam.mff.cuni.cz> <629b20d2-7b0b-9342-a64a-d12eb6e6a6b7@suse.cz> <20181108145909.5eh5ccen7a7elspe@kam.mff.cuni.cz> <173116c6-d51c-3bef-5382-38593e032f82@suse.cz> <8f467934-c088-9b60-c4d3-c19c2e03defd@suse.cz> <2F74DD05-E807-4FB4-80B1-3BBC6FEDF6E8@oracle.com> <7FA7E4B3-BF39-4E60-84AD-91161CC4867F@oracle.com> <8F7AEFF2-5DCE-49B6-BC9E-34FC0DEF2A55@oracle.com> <568496ae-! 24cf-7453-57db-a2188d5d11c2@suse.cz> <49B97110-C7FD-4569-AE26-1B37951D802B@oracle.com> <30e99713-0a96-3acb-ea5f-8f0996be69a6@suse.cz> <5A3304F6-2084-44BA-86CB-88A657AAF741@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg01640.txt.bz2 > On Nov 19, 2018, at 2:11 AM, Martin Li=C5=A1ka wrote: >=20 > On 11/16/18 5:04 PM, Qing Zhao wrote: >>=20 >>> On Nov 16, 2018, at 9:26 AM, Martin Li=C5=A1ka > wrote: >>>=20 >>> On 11/16/18 2:36 AM, Qing Zhao wrote: >>>> Hi, >>>>=20 >>>> this is the new version of the patch. >>>>=20 >>>> I have bootstrapped it on both aarch64 and x86, no regression. >>>>=20 >>>> please take a look. >>>=20 >>> Thanks for the updated version of the patch. >>> I have last small nits I see: >>>=20 >>> - gcc/common.opt: when running --help=3Dcommon, the line is too long >>=20 >> the following is the output for ./gcc =E2=80=94help=3Dcommon: >> -flive-patching Same as -flive-patching=3D. Use the latte= r option >> instead. >> -flive-patching=3D[inline-only-static|inline-clone] Control IPA optimi= zations >> to provide a safe compilation for live-pat= ching. >> At the same time, provides multiple-level = control >> on the enabled IPA optimizations. >>=20=20 >> Not sure what=E2=80=99s you mean of =E2=80=9Cthe line is too long=E2=80= =9D? could you please specify the above which line? >=20 > You are probably using a console that has quite small column limit, so th= at you see it automatically > wrapped. >=20 > I see: >=20 > ... > -flimit-function-alignment This option lacks documentation. > -flive-patching Same as -flive-patching=3D. Use the latter = option instead. > -flive-patching=3D[inline-only-static|inline-clone] Control IPA optimiza= tions to provide a safe compilation for live-patching. At the same time, pr= ovides multiple-level control on the enabled IPA optimizations. >=20 > ^--- the long line Okay, I see. >From the documentation: https://gcc.gnu.org/onlinedocs/gcc-4.3.4/gccint/Op= tion-file-format.html#Option-file-format " An option definition record. =EF=BF=BDThese records have the following fiel= ds: =E2=80=A2 the name of the option, with the leading =E2=80=9C-=E2=80=9D rem= oved =E2=80=A2 a space-separated list of option properties (see Option properti= es) =E2=80=A2 the help text to use for --help (omitted if the second field con= tains the Undocumented property). =E2=80=A6. The help text is automatically line-wrapped before being displayed. Normall= y the name of the option is printed on the left-hand side of the output and= the help text is printed on the right. However, if the help text contains = a tab character, the text to the left of the tab is used instead of the opt= ion's name and the text to the right of the tab forms the help text. This a= llows you to elaborate on what type of argument the option takes.=20=20=20= =20=20=20=20 =E2=80=9C Looks like that by design, the help text will be automatically line-wrapped= before being displayed to fit on the current console. So, I think that the= long line should be fine? (the only way to make the help text shorter line is to cut the help text).=20 I also see some other options have even longer help text: -fcf-protection=3D[full|branch|return|none] Instrument functions with che= cks to verify jump/call/return control-flow transfer instructions have vali= d targets. -fisolate-erroneous-paths-attribute Detect paths that trigger erroneous o= r undefined behavior due to a null value being used in a way forbidden by a= returns_nonnull or nonnull attribute. Isolate those paths from the main= control flow and turn the statement with erroneous or undefined behavior i= nto a trap. -fisolate-erroneous-paths-dereference Detect paths that trigger erroneous= or undefined behavior due to dereferencing a null pointer. Isolate those = paths from the main control flow and turn the statement with erroneous or unde= fined behavior into a trap. > ... >=20 >>=20 >>> - gcc/doc/invoke.texi - 2 spaces in between sentences + better gol >>> - gcc/opts.c - do not mix spaces + tabs >>=20 >> I have used contrib/check_GNU_style.sh to check the patch, I did see one= place that complains about 2 spaces in between sentences, fixed it. >=20 > I see it: >=20 > =3D=3D=3D ERROR type #3: dot, space, space, new sentence (3 error(s)) =3D= =3D=3D > gcc/common.opt:2190:62:optimizations to provide a safe compilation for li= ve-patching.=E2=96=88At the same > gcc/doc/invoke.texi:9291:14:optimizations.=E2=96=88For example, inlining = a function into its caller, cloning > gcc/doc/invoke.texi:9297:37:impacted functions for each function.=E2=96= =88In order to control the number of fixed. >=20 >> but I didn=E2=80=99t see spaces + tabs mix issue with the script. could = you please specify? >=20 > This is a new check that I've just installed: >=20 > =3D=3D=3D ERROR type #1: a space should not precede a tab (1 error(s)) = =3D=3D=3D > gcc/opts.c:2350:0: =E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96= =88=E2=96=88=E2=96=88control_optimizations_for_live_patching (opts, opts_se= t, Okay, I see, fixed.=20 thanks. Qing >=20 > Martin >=20 >>=20 >> thanks. >>=20 >> Qing >> * >> *