public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: "Jonathan Wakely" <jwakely.gcc@gmail.com>, "Søren Holm" <sgh@sgh.dk>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Bisecting
Date: Sun, 30 Jan 2022 13:59:09 -0500	[thread overview]
Message-ID: <1022f2067c88acf4d708f9a8b7793b57168c74a9.camel@redhat.com> (raw)
In-Reply-To: <CAH6eHdTYtwjaxoip-w00nYBpOTp0fo6=Cfc4shJiD553tn1Zcg@mail.gmail.com>

On Sun, 2022-01-30 at 01:09 +0000, Jonathan Wakely via Gcc wrote:
> On Sat, 29 Jan 2022, 20:25 Søren Holm via Gcc, <gcc@gcc.gnu.org> wrote:
> 
> > Hi
> > 
> > I believe I have found some kind of bug in GCC. The target is a
> > cortex-m7 CPU. I do not have an isolated test software so I'm
> > thinking
> > of bisecting GCC between GCC 9.4 and 10.1.
> > 
> > Are there any easy way do do a fast "change - compile - test"- cycle
> > -
> > and how do I do that? All the guide on building GCC is using huge
> > scripts with installs and such. I'm sure the main developers does not
> > do
> > that.
> > 
> 
> 
> 
> https://gcc.gnu.org/wiki/InstallingGCC is not a huge script, it's a
> very
> small number of commands.
> 
> You can use git bisect to simplify things, but if you don't have a
> small
> reproducer for the problem then I don't see how you can avoid doing a
> full
> build and install. With a simple reproducer, you can just great using
> the
> cc1 or cc1plus binary in the build tree, without installing anything.
> 

Indeed: try to come up with a minimal reproducer demonstrating the
issue (or its absence) deterministically, one that involves a simple
invocation of cc1 (or cc1plus if C++).

Some tips for speeding builds up:

* configure gcc with --disable-bootstrap
* configure gcc with --enable-languages containing just the languages
you need
* you may be able to get away with just "make cc1" in the BUILDDIR/gcc
subdirectory each time; you might need to rebuild BUILDDIR/libcpp
sometimes though, since the API/ABI exposed by BUILDDIR/libcpp to
BUILDDIR/gcc/cc1 changes in some commits
* do the build on a machine with plenty of cores and use an appropriate
-j option to "make"

Might be an idea to configure with --enable-checking=debug since the
versions you refer to straddle the boundaries between released versions
(where --enable-checking=release is the default) and development
versions (where --enable-checking=debug is the default).  --enable-
checking=debug adds lots of extra checking, which is likely to identify
problems in a more controlled fashion even though the built compiler
will be slower.

How deterministic is the failure?  If you're seeing randomness, it
could be an issue with garbage collector markings, in which case 
  --param=ggc-min-expand=0 --param=ggc-min-heapsize=0
will fully run the garbage collector at every GC opportunity (which is
*slow*, but very good at quickly pinpointing the problem if it's a
issue with the GC, which otherwise are a major pain to track down).

Hope this is helpful
Dave


      reply	other threads:[~2022-01-30 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29 20:24 Bisecting Søren Holm
2022-01-30  1:09 ` Bisecting Jonathan Wakely
2022-01-30 18:59   ` David Malcolm [this message]

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=1022f2067c88acf4d708f9a8b7793b57168c74a9.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=sgh@sgh.dk \
    /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).