From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 0552E3858D3C for ; Thu, 24 Mar 2022 23:30:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0552E3858D3C Received: by mail-pg1-x52b.google.com with SMTP id z128so5056764pgz.2 for ; Thu, 24 Mar 2022 16:30:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Nyqy7tee9/yfuB5qS0lt4b2YTsGK9sf3qurzEPlz/zs=; b=pf1wRf1BueryrXR0s1o7MQjzONqOo7KL/+YVOel9LF+GOacD4UjM6aenF/uVcoYZIw jeWUJfmWk1YVU0iww22YITTt3F4mMgue3aCeiAmRvDsrLVgwIyw1XC/1dPjpRIxp07jj O+ixc57WJjHl/G/N9WPnVQ9B/54zzB6DugZ0hFpgsZeKGrrCaSxpmEW8TsJcmIPLuWXO dt62xBGj77eb69ryvQiNS6pD2MhJaj2Ll2dTOJW7bU9yYaWLEC/LedKpmZHWpGPbaojw bbzeYHXc63ncSLLVK0eK4Hsly1C2TLJo52QVkQ1pO3aHhZtt+V0iDTlI+hEjQw9kAoqa mVHQ== X-Gm-Message-State: AOAM532b/KNc0q1/Lm7D47Z0mpzK2+tDssfuo0CmfuCDHU+fYeNbMET7 GXYC0Ox2+jPMRwn5nXizyYc= X-Google-Smtp-Source: ABdhPJxgTmm+YcLc0L1nRKs4xmeYzGpdC1GYhiWNWrTxxlf7/mSAC/0geGZfaiFqM2FSXMJfEWvLEA== X-Received: by 2002:a65:6082:0:b0:382:712b:56c7 with SMTP id t2-20020a656082000000b00382712b56c7mr5850273pgu.563.1648164633016; Thu, 24 Mar 2022 16:30:33 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:9299:db88:6970:edec]) by smtp.gmail.com with ESMTPSA id l27-20020a63701b000000b0038233e59422sm3400664pgc.84.2022.03.24.16.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 16:30:32 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 4E60B1140066; Fri, 25 Mar 2022 10:00:29 +1030 (ACDT) Date: Fri, 25 Mar 2022 10:00:29 +1030 From: Alan Modra To: "Steinar H. Gunderson" Cc: Nick Clifton , binutils@sourceware.org, sesse@chromium.org Subject: Re: [PATCH] Add a trie to map quickly from address range to compilation unit. Message-ID: References: <20220321094030.1256430-1-sesse@google.com> <63191455-2374-5db9-f55e-ddf794c7d88e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-3029.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2022 23:30:35 -0000 On Thu, Mar 24, 2022 at 09:01:38AM +0100, Steinar H. Gunderson wrote: > On Thu, Mar 24, 2022 at 03:52:27PM +1030, Alan Modra wrote: > > Huh, I remember looking at this code a while ago and finding it > > confusing. I think the code would be clearer, and behave the same on > > normal line number info with the following patch: > > An interesting question is: Do you want to keep searching through > compilation units once you've found a match with a line number? > Should we go straight to “goto done” then? This would be reverting commit 240d6706c6a2. In https://sourceware.org/bugzilla/show_bug.cgi?id=15935#c3 I came to the conclusion that the pr15935 testcase had bogus debug info and closed the bug as invalid. The reporter apparently opened another bug, https://sourceware.org/bugzilla/show_bug.cgi?id=15994 a month later that Nick fixed by making _bfd_dwarf2_find_nearest_line do extra work. Which of course is unnecessary with good debug info, but in many cases we try to make binutils give the best result even with bad input. I don't know the details beyond that. It might have been that the compiler producing the bad debug info was one supported by RedHat. Now we have pr28592 and others complaining that objdump or addr2line have significantly slowed. Given that pr15935 dates back to 2013, I would presume that people have moved on from whatever broken compiler produced bad line info, and that we should indeed revert commit 240d6706c6a2. Nick? -- Alan Modra Australia Development Lab, IBM