public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: dwz@sourceware.org
Subject: [Bug default/27568] New: Add initial .debug_info reading phase to dwz
Date: Fri, 12 Mar 2021 10:54:12 +0000	[thread overview]
Message-ID: <bug-27568-11298@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27568

            Bug ID: 27568
           Summary: Add initial .debug_info reading phase to dwz
           Product: dwz
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: default
          Assignee: nobody at sourceware dot org
          Reporter: vries at gcc dot gnu.org
                CC: dwz at sourceware dot org
  Target Milestone: ---

Currently dwz is setup such that the .debug_info section is read once (unless
we have low-mem mode).

There is a number of problems with this approach.

I. Forward (pseudo) references. 

When encountering a reference, and it's intra-CU or backward inter-CU, we can
determine whether the reference is to an actual DIE or not, because we've
already processed those DIEs and they're in the off_htab. But when encountering
a forward inter-CU reference, we don't known, because those DIEs haven't been
processed yet. See PR25459 for a pseudo-reference example.

If in all cases we can determine whether a DIE reference is valid or not, we
can handle the invalid ones more gracefully: assume a value of 0 and continue
processing (PR27544).

II. Input error messages are generated on-the-fly (PR 25229)

Input errors are generated when and where they are encountered.
- it may take a long while to find out that we cannot optimize the file.
- the error messages are not deterministic.  An unrelated change in input
  may influence whether the error is triggered or not.
- the errors may have to be handled in more than one location in the source
code

III. Sub-file level parallelization (PR27557)

Things that can and cannot be parallelized are interwoven in the
implementation.    If we'd have two phases or reading .debug_info instead of
one, we could try to move non-parallelizable to the first phase, and
parallelizable parts to the second phase, as well as detect
parallelization-breaking conditions in the first phase.

IV. Ad-hoc determination of optimization scope

Computation of optimization scope (i.e, propagation of CK_BAD,
die_no_multifile) is done in parallel with the optimization.  Some of this
propagation is backwards, and needs to be fixed up after optimization to get
propagation complete (see propagate_multifile, PR25109), which is awkward.

Also, for odr we have the inelegant and expensive solution of calling
checksum_ref_die twice (PR26252), once to do the CK_BAD propagation, which
gives us wrong checksums for the odr DIEs, which we then fixup, after which we
call checksum_ref_die again, to recalculate the checksums for the non-odr DIEs.
 If the CK_BAD propagation was separated from the checksum calculation, we
wouldn't have to redo the checksum calculation for non-odr DIEs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-03-12 10:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 10:54 vries at gcc dot gnu.org [this message]
2021-03-12 10:56 ` [Bug default/27568] " vries at gcc dot gnu.org

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=bug-27568-11298@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=dwz@sourceware.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).