public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: Torsten Duwe <duwe@suse.de>,
	nd@arm.com, Li Bin <huawei.libin@huawei.com>,
	Jiri Kosina <jkosina@suse.cz>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Marcus Shawcroft <Marcus.Shawcroft@arm.com>,
	Takahiro Akashi <takahiro.akashi@linaro.org>
Subject: Re: [PATCH] add -fprolog-pad=N option to c-family
Date: Thu, 28 Apr 2016 08:48:00 -0000	[thread overview]
Message-ID: <7134BE21-ACFB-4C45-871A-FADFA2973040@linaro.org> (raw)
In-Reply-To: <5720E81D.9060409@arm.com>

> On Apr 27, 2016, at 7:26 PM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> 
> On 27/04/16 16:22, Torsten Duwe wrote:
>> Hi Maxim,
>> 
>> thanks for starting the work on this; I have added the missing
>> command line option. It builds now and the resulting compiler generates
>> a linux kernel with the desired properties, so work can continue there.
>> 
>> 	Torsten
> 
> i guess the flag should be documented in invoke.texi
> 
> it's not clear what N means in -fprolog-pad=N, how
> location recording is enabled and how it interacts
> with -fipa-ra. (-pg disables -fipa-ra, but -fprolog-pad
> works without -pg.)

I think, it should be responsibility of the user to disable -fipa-ra if code intended to be patched-in will be incompatible with IPA-RA.  I agree, though, that documentation of -fprolog-pad= should make a special note of this fact and recommend inclusion of -fno-ipa-ra to the cflags whenever -fprolog-pad= is used..

> 
> with -mfentry, by default the user only has to
> implement the fentry call (linux wants nops there, but
> e.g. glibc could use -pg -mfentry for profiling on
> aarch64 and the target specific details are easier to
> document for an -m option than for something general).

I don't understand your point here, could you elaborate, please?

> 
> the nop-padding is more general, but the size and
> layout of nops and the call abi will be target
> specific and the user will most likely need to modify
> the binary (to get the right sequence) which needs
> additional tooling.  i don't know who might use it
> other than linux (which already has tools to deal with
> -mfentry).

Right, but this tooling will require minimal (if any) changes to be adapted to nop-pad approach.  If I remember correctly, recent versions of GCC and kernel for x86_64 generate NOPs, not the call sequence in the prologs when -mfentry is used.

> 
> i'm not against nop-padding, but i think more evidence
> is needed that the generalization is a good idea and
> users can deal with the resulting issues.

--
Maxim Kuvyrkov
www.linaro.org





  reply	other threads:[~2016-04-28  8:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 15:22 Torsten Duwe
2016-04-27 16:26 ` Szabolcs Nagy
2016-04-28  8:48   ` Maxim Kuvyrkov [this message]
2016-04-28 10:58     ` Szabolcs Nagy
2016-04-28 11:32       ` Torsten Duwe
2016-05-09  5:53       ` AKASHI Takahiro
2016-09-29 15:18     ` [PATCH v2] " Torsten Duwe
2016-09-30  9:59       ` Jose E. Marchesi
2016-09-30 10:22         ` Torsten Duwe
2016-10-03  9:45         ` AKASHI Takahiro
2016-10-04 21:46       ` Maxim Kuvyrkov
2016-12-06 14:02         ` Maxim Kuvyrkov
2016-04-28  8:40 ` [PATCH] " Maxim Kuvyrkov
2016-04-28 11:18   ` Torsten Duwe
2016-04-28 15:07     ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7134BE21-ACFB-4C45-871A-FADFA2973040@linaro.org \
    --to=maxim.kuvyrkov@linaro.org \
    --cc=Marcus.Shawcroft@arm.com \
    --cc=duwe@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=huawei.libin@huawei.com \
    --cc=jkosina@suse.cz \
    --cc=nd@arm.com \
    --cc=szabolcs.nagy@arm.com \
    --cc=takahiro.akashi@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).