Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp813001pxy; Fri, 30 Apr 2021 17:42:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqIWHLa4aZix1nqqh11aWuwwuiOS07NSK0uZeMw0HLmlgwM0fuhrUb52Ycuu2e3RReISxJ X-Received: by 2002:a17:907:1181:: with SMTP id uz1mr4671473ejb.194.1619829742734; Fri, 30 Apr 2021 17:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619829742; cv=none; d=google.com; s=arc-20160816; b=HeCyPkubjC1VcdtpYFA44JaEpJQ1BhnpWurQz/vQfwFmOF36fwom1iZ8ssY+0jEY3+ P+IGsiZO/cPNmvsXp4kY6vd6GssYAlph3iDzlp26Nm9UBHljCv6iaXk/L8KUb0CV5EmL btVA8sRyvR76vN/YvYc3vW9KRxcrEHR8Gk+fsmuhtZkhDlcxhRF2XBjsZU+DkaRWEcVE H9N+45444t6t8FwKNyaD1pnHya4WS+4TYRrBMdJn8lxuh+Y1NDmlmZ5tUycNHwLdpOT2 S0QYwJ31rSFyef6GVnzFdDcVrrxp6D/SAb1VYbL/iGn9Gi4UNP1RO7cstW2vKFVAqOS8 vK5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=94RJ8Mzed9hEK2GvRJDwkdGFD+7EIt8LpelWc7KS5BY=; b=y/WKQLee0sb6nyVLYdaCkdGsr9p/HMiBs2LtlyXWYfdIq3ZHPouq15KBEIM7P5bzMh 7Li0HXdx3WKpU4aw1wg/TeJQTKzQ5R+n+0oVyf1ScopmDnJTR6efESIFG9zVp8iISr3T euYNa0k2aPKNfytSxkxJbt/xm1CfWzXrKvZ73BMf+WT4ruWKU0ErlcQ6vxAxkie/K6f6 zU0SqhUXH2RtVxVw0sRvDGzePPjmLPbJsXcV6F9iobAoipIYdwfeZyNc1LTZQ3W0keWu ZtSZYqW9hKcAggZpA4sFFS+5/eqv9JXXUjDXwDuVZccRAN6q6As673OFQzXdm8GwPqX3 YINg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=s+Jgcfoh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si4579080ejb.479.2021.04.30.17.41.59; Fri, 30 Apr 2021 17:42:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=s+Jgcfoh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbhEAAl7 (ORCPT + 99 others); Fri, 30 Apr 2021 20:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbhEAAl7 (ORCPT ); Fri, 30 Apr 2021 20:41:59 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3640BC06174A for ; Fri, 30 Apr 2021 17:41:09 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id d15so240118ljo.12 for ; Fri, 30 Apr 2021 17:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=94RJ8Mzed9hEK2GvRJDwkdGFD+7EIt8LpelWc7KS5BY=; b=s+JgcfohLFxD7FqELgsoPWVdWhFWfC1e/LMCWf3K23GImmi66swaqfCpEjg9gEM15o shX8gIHcpeYztZENwdwsnj6xrYDUCI7evFWc3XyuWlThFqfe4ZDVklCu/Td6+JYXaFIt TVAe8xJIVCiNsZ0kuk4/O7w3PA7TzVaPesMOpjUwJ47xVsIrLIAYESSy2R48Ab0QkHK3 KxnNe8duLUiC5Tsswy1f+zTxZc7LbiZ/9gZtOGTIFtdPgJBPZNARYH7PSSuvg1gCt94C bC+G7SO5G4f2Q4zPGkROgzvj6FDU1soI5LAefOkuiLu+Cf4EPDJm3KTPNQKoULYT4LJH 2mBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=94RJ8Mzed9hEK2GvRJDwkdGFD+7EIt8LpelWc7KS5BY=; b=XTA2JY5WhWKOY9nVRDfPZfRSxZEkD9i1ugvsb8rqLdipq4ON6qd6M64Yj3YfRv37qu IUmTAte0l06j+VeR8WLiudSlhLSF/6iPb2U38tvXq9qOkA5/PCnQ1gmVWfhZwPb+hvyV gsEKUGH3w1HP/syS8YOGCv6psjL21I2fg1chMCHonGuwJer5txK9SMPIF/y185rWIKXp cjbEPx2yXH/9oxHIIxsbvLxq/uhB8x/JezATRe+kVKQUaf7EBMBZD5Xc+ttgCxEA0qTa NkP2Lq3dveRG7FhfJmJwuCEsym5KHD/XuG0hGwwSenHwFpP2oH4qm+/WjQvVC9P5vOVo EjLQ== X-Gm-Message-State: AOAM532+/F0Md7WK5KqIBYPsWtvxNHTyRWNHXpX5dZAewzjY01ZUEiJA LV31GuGfuh0QC3Wl9r1C1OTlKnKxx76sl8bDV9CtAV1AyRtZEw== X-Received: by 2002:a2e:7f1c:: with SMTP id a28mr5587921ljd.341.1619829667567; Fri, 30 Apr 2021 17:41:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Fri, 30 Apr 2021 17:40:56 -0700 Message-ID: Subject: Re: Very slow clang kernel config .. To: Linus Torvalds , Masahiro Yamada Cc: Nathan Chancellor , Linux Kernel Mailing List , clang-built-linux Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 30, 2021 at 5:25 PM Nick Desaulniers wrote: > > On Fri, Apr 30, 2021 at 5:23 PM Nick Desaulniers > wrote: > > > > On Fri, Apr 30, 2021 at 5:19 PM Nick Desaulniers > > wrote: > > > > > > A quick: > > > $ perf record -e cycles:pp --call-graph lbr make LLVM=1 LLVM_IAS=1 > > > -j72 allmodconfig > > > $ perf report --no-children --sort=dso,symbol > > > shows: > > > 2.35% [unknown] [k] 0xffffffffabc00fc7 > > > + 2.29% libc-2.31.so [.] _int_malloc > > > 1.24% libc-2.31.so [.] _int_free > > > + 1.23% ld-2.31.so [.] do_lookup_x > > > > ^ bfd > > > > > + 0.63% ld-2.31.so [.] _dl_lookup_symbol_x > > > > ^ bfd > > Ah, no, sorry, these are the runtime link editor/loader. So probably > spending quite some time resolving symbols in large binaries. I don't see NOW in: $ llvm-readelf -Wd `which clang` so I don't think clang was linked as `-Wl,-z,now`. I also see both .hash and .gnu.hash in $ llvm-readelf -S `which clang`. The presence of NOW or lack of .gnu.hash would have been my guess for symbol lookup issues. Perhaps the length of C++ mangled symbols doesn't help. -- Thanks, ~Nick Desaulniers