From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8771 invoked by alias); 22 Jan 2020 13:04:12 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 8487 invoked by uid 48); 22 Jan 2020 13:04:08 -0000 From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/25439] namespace DIE added to duplicate chain list (--odr-mode=basic) Date: Wed, 01 Jan 2020 00:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal 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: Message-ID: In-Reply-To: References: 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-SW-Source: 2020-q1/txt/msg00036.txt https://sourceware.org/bugzilla/show_bug.cgi?id=3D25439 --- Comment #2 from Tom de Vries --- Tentative patch: ... index 08e3df4..e2a4ec4 100644 --- a/dwz.c +++ b/dwz.c @@ -3370,24 +3370,31 @@ checksum_ref_die (dw_cu_ref cu, dw_die_ref top_die, dw_die_ref die, } } - if (!only_hash_name_p - && (top_die =3D=3D NULL || top_die->die_ck_state !=3D CK_BAD)) - for (child =3D die->die_child; child; child =3D child->die_sib) - { - unsigned int r - =3D checksum_ref_die (cu, - top_die ? top_die - : child->die_named_namespace - ? NULL : child, child, - second_idx, second_hash); - if (top_die =3D=3D NULL) - assert (r =3D=3D 0 && obstack_object_size (&ob) =3D=3D 0); - - if (ret =3D=3D 0 || (r && r < ret)) - ret =3D r; - if (top_die && top_die->die_ck_state =3D=3D CK_BAD) - break; - } + if (top_die =3D=3D NULL || top_die->die_ck_state !=3D CK_BAD) + { + hashval_t save_checksum; + if (top_die) + save_checksum =3D top_die->u.p1.die_ref_hash; + for (child =3D die->die_child; child; child =3D child->die_sib) + { + unsigned int r + =3D checksum_ref_die (cu, + top_die ? top_die + : child->die_named_namespace + ? NULL : child, child, + second_idx, second_hash); + if (top_die =3D=3D NULL) + assert (r =3D=3D 0 && obstack_object_size (&ob) =3D=3D 0); + + if (ret =3D=3D 0 || (r && r < ret)) + ret =3D r; + if (top_die && top_die->die_ck_state =3D=3D CK_BAD) + break; + } + if (top_die + && top_die->die_ck_state !=3D CK_BAD && only_hash_name_p) + top_die->u.p1.die_ref_hash =3D save_checksum; + }-- if (top_die =3D=3D die) { ... However, that also drops effectiveness to less than 1%: ... $ rm -f 1; ./dwz -Lnone -lnone -o 1 cc1 --no-odr $ rm -f 2; ./dwz -Lnone -lnone -o 2 cc1 --odr-mode=3Dbasic $ diff.sh cc1 1 .debug_info red: 44.84% 111527248 61527733 .debug_abbrev red: 40.28% 1722726 1028968 .debug_str red: 0% 6609355 6609355 total red: 42.30% 119859329 69166056 $ diff.sh cc1 2 .debug_info red: 45.44% 111527248 60860046 .debug_abbrev red: 42.87% 1722726 984340 .debug_str red: 0% 6609355 6609355 total red: 42.89% 119859329 68453741 ... --=20 You are receiving this mail because: You are on the CC list for the bug.