From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3703A3858413 for ; Mon, 14 Feb 2022 14:18:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3703A3858413 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-jDGzyIH0OyWtxPVG_aIwJw-1; Mon, 14 Feb 2022 09:18:22 -0500 X-MC-Unique: jDGzyIH0OyWtxPVG_aIwJw-1 Received: by mail-wr1-f71.google.com with SMTP id k3-20020adfb343000000b001e463e6af20so6943934wrd.8 for ; Mon, 14 Feb 2022 06:18:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=2Pjoh2haNBtgmG8hpsP9Yf9YCrPR9lce95yNbSEEWUY=; b=wLxGSt7tfA/wVh614qbGQ8LIETOj2wVIxBlFG6jJLaNLeL9o162KKzi1mgs54Vvggv HtYB8j7MjHcibXD7ekqhE2gw51c3las0MiNECFx+/kr5Fxg9dCccIWSU8c1sE1t5A1Ls kCy/AkWLf1rZK/PHxa8vIEhw3oXkTuf0axsTxdj7yHp+qObmWDgWNVf9hcStbsnMeSuc KHyrHqxi7EreWWTC8lpFE/0ip77jzJawJ7czPp1q/drgNh8B5ZeMZP3QDt8/N4OXjWyR +judfHFclp8tbPq8lfU3mQ8XYLyqU7GqYHs0zwKh1eGY6WgpCLJ/PyEEE7V3P9HWAxnR 6b3A== X-Gm-Message-State: AOAM530/eqFjTD2QOmWuFPYKfxkYj+ncmHdCsL08vfxUfh11DNeoUjqs 6YDlP0824nP54aFiXJL/3FjbGAVYdQ55QGpDQoW/tmnDsbigBJS1Ro+e7pCoOnaVL68AGlc3kEd 8Zd2jifw+e/q/pnk1Fw== X-Received: by 2002:a1c:35c9:: with SMTP id c192mr10935833wma.168.1644848301406; Mon, 14 Feb 2022 06:18:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxmrQ4G059XhU7hXlxdwyGvzequLyP+ru+LNU9woXw9vYlIRXkQd3kzsAgprKW6kIx6tedcg== X-Received: by 2002:a1c:35c9:: with SMTP id c192mr10935830wma.168.1644848301255; Mon, 14 Feb 2022 06:18:21 -0800 (PST) Received: from [192.168.1.6] (adsl-2-solo-173-39.claranet.co.uk. [80.168.173.39]) by smtp.gmail.com with ESMTPSA id e8sm14509825wru.37.2022.02.14.06.18.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Feb 2022 06:18:20 -0800 (PST) Message-ID: <5f5fb138-c0a7-83e6-827a-eea7f6cc5ff4@redhat.com> Date: Mon, 14 Feb 2022 14:18:20 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Noted slowness in profile loading with binutils 2.37 To: Alexander Lindsay Cc: Binutils References: <9b561d25-fcfd-eb52-6237-472d12ead934@redhat.com> From: Nick Clifton In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: Mon, 14 Feb 2022 14:18:26 -0000 Hi Alexander, > So it looks like you were spot-on Yay! The sad news is that the patch is needed for correct functionality. >             PR 27484 >             * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate >             function and variable tags and a second time to resolve their >             attributes. It is a "feature" of the DWARF spec that the debug info can refer to functions and variables before their definitions are provided, so a two pass scan is needed. If you are feeling brave, please feel free to investigate the code in dwarf2.c and see if there is a faster way to solve the problem. Maybe by implementing a lazy evaluation of attributes where a function tag is only searched for when it is referenced ? Just an idea... Cheers Nick