Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5005704ybb; Tue, 24 Mar 2020 09:13:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt3UR82Y8g3KBFZyRlmFKnSkeidCskwiVuMfj9Ek0snHh1w2nD5AaQATKmNfpdoAb03xOkh X-Received: by 2002:aca:57cd:: with SMTP id l196mr4083511oib.1.1585066394812; Tue, 24 Mar 2020 09:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585066394; cv=none; d=google.com; s=arc-20160816; b=g1Q1NyGpDNohKvt3FPnVBMAhB0rE8vu0o9cdIRbiK25CJa9ICkZERsa/VyjJVyx+t1 Bb5F9+mXsUDqOcaW6043DvYQqsWTMGwnBFZEkt9jj4D9UMYA09LEH6C5iH2uISNIrU3z /ZqdHjv8Hf4XeLuGMjPZIIgjqd4+9gYt1GPnLMdLUfHeN4BPT1Pj+BpGRUJqtjtclyzW FiGqHY1TngOADMDOhjtLUmD0ftKy6ptK1JC6LXgR2LrvcLGM83uMNm7XP93u3GXbGojS qWN0/+6or2Kd/TIitYIU+Me1bhArqdkfhpqPNVoGqpxvl0tWk8DUwlTdO6Um0F+jgJgS HrQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id:dkim-signature; bh=MFEnZD0+4OUY81BkhDMbicOfY7KqrMse//Q9aHGwF/E=; b=uHNK9ktVr1qJPDxKjdwDzVZ0D2+oVdaM7Oy34V26qebxD3O9ypgafzJ/AnLL2n4XbI jW+a7wiQ2LZWGtO3w/cP7a49kaVa8cidmztTfJCiMrAT0sHq/d3xOeQ8Qj90yPW+bvAT N1nlZ9gevrEo9HNuGrxBPWwl43Ag9fndY04/VBIv8C0Z2DMo55nQHIunFJzvjUHAKSkN VpaWFPCBoNA/Iw1RVKedMT8gafAeYMmZgVz1OwdwrVd1iXH1WqJa4uxlDGPMauBZNWod /cRShWSzY5ggPcI+74pYnQQ3C0bkBfmsiLC4Ga/0aCRiyvM/GSXqfBWgGh1xcydBL/tA FDJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=S+8QJCQR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si777883ooq.37.2020.03.24.09.13.01; Tue, 24 Mar 2020 09:13:14 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=S+8QJCQR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728534AbgCXQLi (ORCPT + 99 others); Tue, 24 Mar 2020 12:11:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36908 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728289AbgCXQLf (ORCPT ); Tue, 24 Mar 2020 12:11:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-Id:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=MFEnZD0+4OUY81BkhDMbicOfY7KqrMse//Q9aHGwF/E=; b=S+8QJCQRCZeKwu2o9+iBLxSezr LR92FwnmoJGpvcACkudtPCfE40CIlHGxwtgunp8Gd43eQcc+/yqXKhjfxR7RLpw1qZZuDJOLdRY3I NNIdnkKkfpJNUumUjtALm+bVKG7IH8tFqH645/lxL4kg/p7ZNXZwLWqfOMviPv+hxm5dT/5WJ376b qRQ9v1y/IgugNd13FiY0w7rIAFf7/U1U6hlOdXamf59TTk8BAtWwQcVpeyAX4tuS4UC8SiNl4XETI XmNqTRQX14sFFUb6vaQm2Y//h8EceeE9aGRfNKkflKrUmxbvfqz7JJNhU5fLiRSkbF7B1ypkotl6u Wc2vLDlg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGm9L-0006bY-Lr; Tue, 24 Mar 2020 16:11:31 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 5E1E5307276; Tue, 24 Mar 2020 17:11:28 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 3E95220250FC4; Tue, 24 Mar 2020 17:11:28 +0100 (CET) Message-Id: <20200324160924.617882545@infradead.org> User-Agent: quilt/0.65 Date: Tue, 24 Mar 2020 16:31:25 +0100 From: Peter Zijlstra To: tglx@linutronix.de, jpoimboe@redhat.com Cc: linux-kernel@vger.kernel.org, x86@kernel.org, peterz@infradead.org, mhiramat@kernel.org, mbenes@suse.cz, brgerst@gmail.com Subject: [PATCH v3 12/26] objtool: Resize insn_hash References: <20200324153113.098167666@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Perf shows we're spending a lot of time in find_insn() and the statistics show we have around 3.2 million instruction. Increase the hash table size to reduce the bucket load from around 50 to 3. This shaves about 2s off of objtool on vmlinux.o runtime, down to 16s. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf --- tools/objtool/check.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/objtool/check.h +++ b/tools/objtool/check.h @@ -50,7 +50,7 @@ struct instruction { struct objtool_file { struct elf *elf; struct list_head insn_list; - DECLARE_HASHTABLE(insn_hash, 16); + DECLARE_HASHTABLE(insn_hash, 20); bool ignore_unreachables, c_file, hints, rodata; };