Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1717215ybh; Sun, 15 Mar 2020 09:19:16 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsGxw4uIHGXgzuifMhw7T5o3IK3Esv8iEdAsBugkYpp0fcC1N+7zgSoGvBo3oHy35rTxVTG X-Received: by 2002:a9d:4798:: with SMTP id b24mr19346377otf.243.1584289156688; Sun, 15 Mar 2020 09:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584289156; cv=none; d=google.com; s=arc-20160816; b=gy6crRQrKNdkx/93ZqZsfZRsT4Ti9F1wCwJM0fAnCKLtAGplILbVEgdWAWwlcsbGQ5 NI8zCo4TZlxHJU7URAoY4mY2pQNZGeO/dvfG8+Zxm3/ajt7qinHdcSF+1AkqbQwtmEeE Z5Nkr/EVrolkhhZcQlAIlA3Iu5TnJUS/WGuQyjMm8uvtTk25JbBeALtt8D9iLBr3EWFS 1oBp5qXqqDZBNhPB8BLTdIHvVr75ojJBfm7ssIt6wVDxnAoUFbStjUKrU0k+oNQYx3LV 0hlMwMMyA8x59neUWRzRj69tfEirvV8iUE5142s8e8sAp0ECev1WI4xHwi/EhoVeofIg X0sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5YpxgrgZOFhG1ZE1mY604BOqcsKDnPAATI2kwFlaiNA=; b=LDYP+FN2a4bld/5S8L4TJtG6ySj2pYvMuWCeuVvGwZNUZkDC2bAGYx1ofYMolwqI4F COz7gG3DNhHWTvPmWEn2ZhBBdn7qyNYePTDzUsTOjuM3KtYSxYhkm/2+YHZot7gV2+9Q diFGE3ifwZ5GTrQmp7mwDujV0xFEkfNrXA4aoD/bK5UPQsBPM6k+9uQ1GQBJl+NrxxfD DB41gyF6e9M0UZxIe175GHRwxwC5IWRoxhOCezs7PEWfCDdFGa4ULeSNE/CYV5DjdQsL QasyciRN1gdeuxN57NXIpxMLwegY4pNFZDOLv6VPAWZyGwq5AO6RoHV+9Eo/ZD6OR7c5 cXVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MYIP8PmA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si8030934otc.192.2020.03.15.09.19.03; Sun, 15 Mar 2020 09:19:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MYIP8PmA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728861AbgCOQSi (ORCPT + 99 others); Sun, 15 Mar 2020 12:18:38 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:42535 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728628AbgCOQSi (ORCPT ); Sun, 15 Mar 2020 12:18:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584289117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5YpxgrgZOFhG1ZE1mY604BOqcsKDnPAATI2kwFlaiNA=; b=MYIP8PmABsu/JkP9kE4F/V/vw9FjYkKuD8PDe3xWe115iWU53IqxnNYbFUyvHR6FwnPZfj XKrw8GkskWZI20lobnDJAUg5S7a35E7MJmB8v+Aj4iGsN+AD5wb6SBDQGsaAvelDjS19a6 fDPG0LPxEiVHpGttXWOFHM+e/aVgeFg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-446-1yBuZoANNFmak75wwj7oIA-1; Sun, 15 Mar 2020 12:18:35 -0400 X-MC-Unique: 1yBuZoANNFmak75wwj7oIA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C692800D4E; Sun, 15 Mar 2020 16:18:34 +0000 (UTC) Received: from treble (ovpn-120-135.rdu2.redhat.com [10.10.120.135]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A6B565DA76; Sun, 15 Mar 2020 16:18:33 +0000 (UTC) Date: Sun, 15 Mar 2020 11:18:31 -0500 From: Josh Poimboeuf To: Peter Zijlstra Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [RFC][PATCH 05/16] objtool: Optimize find_symbol_by_index() Message-ID: <20200315161831.perix63awlsfj2bl@treble> References: <20200312134107.700205216@infradead.org> <20200312135041.699859794@infradead.org> <20200315160919.zd7phtq7ejyq4kva@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200315160919.zd7phtq7ejyq4kva@treble> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 15, 2020 at 11:09:19AM -0500, Josh Poimboeuf wrote: > On Thu, Mar 12, 2020 at 02:41:12PM +0100, Peter Zijlstra wrote: > > The symbol index is object wide, not per section, so it makes no sense > > to have the symbol_hash be part of the section object. By moving it to > > the elf object we avoid the linear sections iteration. > > I remember there was a specific reason for this oddity, but it eludes me > now. > > This does make sense, assuming it doesn't break anything. On second thought I guess it was the symbol_list which had this intentional per-section structure (for a still unremembered reason). Then the symbol_hash came later, and it just parroted the symbol_list structure. So yeah, this change should be fine. -- Josh