public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
Cc: "Fangrui Song" <i@maskray.me>,
	"Joseph Myers" <joseph@codesourcery.com>,
	"GCC Patches" <gcc-patches@gcc.gnu.org>,
	"Martin Liška" <mliska@suse.cz>
Subject: Re: [PATCH v2 0/3] Introduce a new GCC option, --record-gcc-command-line
Date: Thu, 05 Mar 2020 07:36:00 -0000	[thread overview]
Message-ID: <CAFiYyc2bghz6FZEQ3Sm+iofJ-En7MhmYTHHB0HpfKB1YnnBwgg@mail.gmail.com> (raw)
In-Reply-To: <955a5967-8423-58f8-4f8c-2af89992d1cc@oracle.com>

On Wed, Mar 4, 2020 at 5:28 PM Egeyar Bagcioglu
<egeyar.bagcioglu@oracle.com> wrote:
>
>
>
> On 3/4/20 1:18 AM, Fangrui Song wrote:
> > On 2020-03-03, Joseph Myers wrote:
> >> On Tue, 3 Mar 2020, Egeyar Bagcioglu wrote:
> >>
> >>> Although we discussed after the submission of the first version that
> >>> there are several other options performing similar tasks, I believe we
> >>> established that there is still a need for this specific functionality.
> >>> Therefore, I am skipping in this email the comparison between this
> >>> option and the existing options with similarities.
> >
> > Mentioning -frecord-gcc-switches will be much appreciated.
> >
> > How is the new .GCC.command.line different?
> >
> > Does it still have the SHF_MERGE | SHF_STRINGS flag?
> > If you change the flags, the .GCC.command.line section may not play with
> > another object file (generated by -frecord-gcc-switches) whose
> > .GCC.command.line is
> > SHF_MERGE | SHF_STRINGS.
> >
> > When both -frecord-gcc-switches and --record-command-line are specified,
> > is it an error?
>
> This option is similar to -frecord-gcc-switches. However, they have
> three fundamental differences: Firstly, -frecord-gcc-switches saves the
> internal state after the argv is processed and passed by the driver. As
> opposed to that, --record-gcc-command-line saves the command-line as
> received by the driver, with the exception of extending @files first.
> Secondly, -frecord-gcc-switches saves the switches as separate entries
> into a mergeable string section. Therefore, the entries belonging to
> different object files get mixed up after being linked. The new
> --record-gcc-command-line, on the other hand, creates one entry per
> invocation. By doing so, it makes it clear which options were used
> together in a single gcc invocation. Lastly, --record-gcc-command-line
> also adds the version of the gcc into this single entry to make it clear
> which version of gcc was called with any given command line. This is
> useful in cases where .comment section reports multiple versions.
>
> While there are also similarities between the implementations of these
> two options, those implementations are completely independent. These
> commands can be used separately or together without issues. I used the
> same section that -frecord-gcc-switches uses on purpose, so that they
> can also be used together to save both the command line given to GCC and
> the internal switches passed by GCC.
>
> The option -grecord-gcc-switches is similar to -frecord-gcc-switches,
> but saves the internal GCC switches into DWARF. Lastly, -fverbose-asm
> option saves the switches into the assembly file but that information
> never makes it to the object files.

-grecord-gcc-switches also allows to match the options used to the
actual generated code while both -frecord-gcc-switches and
--record-gcc-command-line
end up as ELF comment sections not associated with particular
code pieces.

So IMHO anything but -grecord-gcc-switches is quite useless in case options
used do not match for all object files.

Richard.

> >
> >> We're now using git-style commit messages with self-contained
> >> explanation
> >> / justification of the change being committed.
> >>
> >> This means that one of the commit messages (not just message 0, whose
> >> contents don't go in a commit message) for an individual patch should
> >> have
> >> the explanation, which should include the self-contained
> >> justification by
> >> reference to comparison with other existing similar options. People
> >> should be able to find the relevant information in the commit without
> >> needing to search the list archives for reviews of a previous patch
> >> version.
>
> Thanks for telling me. I will extend the above comparison according to
> the questions I might receive. Then I'll add it, together with the
> explanation in the cover letter, into the commit message of the second
> patch.
>
> Regards
> Egeyar

  parent reply	other threads:[~2020-03-05  7:36 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 16:41 Egeyar Bagcioglu
2020-03-03 16:41 ` [PATCH v2 1/3] Introduce dg-require-target-object-format Egeyar Bagcioglu
2020-03-03 16:41 ` [PATCH v2 2/3] Introduce the gcc option --record-gcc-command-line Egeyar Bagcioglu
2020-03-03 16:41 ` [PATCH v2 3/3] Keep .GCC.command.line sections of LTO objetcs Egeyar Bagcioglu
2020-03-04  9:01   ` Richard Biener
2020-03-04 15:26     ` Egeyar Bagcioglu
2020-03-04 17:23       ` Martin Liška
2020-03-04 17:33         ` Jakub Jelinek
2020-03-04 17:42           ` Martin Liška
2020-03-04 17:47             ` Jakub Jelinek
2020-03-04 22:43           ` Egeyar Bagcioglu
2020-03-05  8:54             ` Martin Liška
2020-03-05 13:17               ` Egeyar Bagcioglu
2020-03-17 13:53               ` [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format Martin Liška
2020-03-17 18:43                 ` Egeyar Bagcioglu
2020-03-18  9:05                   ` Martin Liška
2020-04-03 18:15                     ` Egeyar Bagcioglu
2020-04-06  7:09                       ` Martin Liška
2020-05-15  9:58                       ` Martin Liška
2020-06-02  9:16                         ` Martin Liška
2020-06-16 12:49                           ` Martin Liška
2020-07-21 16:24                             ` Qing Zhao
2020-07-23 10:07                               ` Martin Liška
2020-07-23 15:01                                 ` Qing Zhao
2020-07-24 13:43                                   ` Martin Liška
2020-09-25 14:55                               ` Martin Liška
2020-09-25 19:36                                 ` Qing Zhao
2020-10-27 10:56                                 ` Martin Liška
2020-11-10 20:53                                   ` Qing Zhao
2020-11-13 16:19                                     ` Jose E. Marchesi
2020-11-16 10:29                                     ` Martin Liška
2020-11-16 17:03                                       ` Qing Zhao
2020-11-20  9:49                       ` Richard Biener
2020-11-23  8:59                         ` Martin Liška
2020-11-23 11:00                           ` Richard Biener
2020-11-23 13:02                             ` Martin Liška
2020-11-23 14:52                               ` Martin Liška
2020-11-25 13:48                               ` Richard Biener
2020-11-26 13:55                                 ` Martin Liška
2020-12-02 10:46                                   ` Martin Liška
2020-12-03 13:12                                   ` Richard Biener
2020-12-04  8:08                                     ` Martin Liška
2020-12-04  9:03                                       ` Richard Biener
2020-12-04 13:30                                         ` Martin Liška
2020-12-04 13:34                                           ` Jakub Jelinek
2020-12-04 13:50                                             ` Richard Biener
2020-12-15  8:01                                               ` [PATCH 1/2] Remove Report keyword for options Martin Liška
2020-12-15  8:02                                                 ` [PATCH 2/2] opts: Remove all usages of Report keyword Martin Liška
2020-12-15 19:43                                                   ` Jeff Law
2020-12-15 21:21                                                     ` Martin Liška
2020-12-15 19:42                                                 ` [PATCH 1/2] Remove Report keyword for options Jeff Law
2020-12-16 11:46                                                   ` Martin Liška
2021-01-06 14:21                                           ` [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format Martin Liška
2021-01-14  9:03                                             ` Martin Liška
2021-01-22 13:33                                               ` Martin Liška
2021-01-29 13:35                                                 ` Martin Liška
2021-02-05  9:34                                                   ` [PATCH] " Martin Liška
2021-02-16 21:17                                                     ` Qing Zhao
2021-02-18  9:18                                                       ` Martin Liška
2021-03-01 12:07                                                         ` Martin Liška
2021-03-12 12:39                                                           ` Martin Liška
2021-01-15 19:14                                       ` [stage1][PATCH] " Alexandre Oliva
2021-01-18  9:03                                         ` Martin Liška
2020-03-04 19:39         ` [PATCH v2 3/3] Keep .GCC.command.line sections of LTO objetcs Egeyar Bagcioglu
2020-03-05  7:40           ` Richard Biener
2020-03-04 15:34     ` Andreas Schwab
2020-03-04 15:58       ` Egeyar Bagcioglu
2020-03-03 17:43 ` [PATCH v2 0/3] Introduce a new GCC option, --record-gcc-command-line Egeyar Bagcioglu
2020-03-03 22:57 ` Joseph Myers
2020-03-04  0:18   ` Fangrui Song
2020-03-04 16:28     ` Egeyar Bagcioglu
2020-03-04 16:51       ` Egeyar Bagcioglu
2020-03-05  7:36       ` Richard Biener [this message]
2020-03-05 13:43         ` Egeyar Bagcioglu
2020-03-04  9:07 ` Martin Liška

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=CAFiYyc2bghz6FZEQ3Sm+iofJ-En7MhmYTHHB0HpfKB1YnnBwgg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=egeyar.bagcioglu@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@maskray.me \
    --cc=joseph@codesourcery.com \
    --cc=mliska@suse.cz \
    /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).