From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 80587398B85D; Fri, 12 Mar 2021 10:54:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80587398B85D From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2021 10:54:12 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27568 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 (unle= ss we have low-mem mode). There is a number of problems with this approach. I. Forward (pseudo) references.=20 When encountering a reference, and it's intra-CU or backward inter-CU, we c= an 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 encounte= ring a forward inter-CU reference, we don't known, because those DIEs haven't be= en 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 contin= ue 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 D= IEs. If the CK_BAD propagation was separated from the checksum calculation, we wouldn't have to redo the checksum calculation for non-odr DIEs. --=20 You are receiving this mail because: You are on the CC list for the bug.=