Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp803757pxy; Fri, 30 Apr 2021 17:26:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtF/M37Hi6ELQai2G69sKa8yJvxN4nSGVKSZ6G1ueLNImXJpdtL32bVrAkqEsfIV6iWMD9 X-Received: by 2002:a17:906:1519:: with SMTP id b25mr6985448ejd.254.1619828782776; Fri, 30 Apr 2021 17:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619828782; cv=none; d=google.com; s=arc-20160816; b=H18PSmnis+leP3RREcUBkwZh1NaeJdq2qrldMZDFDDVo/a5vSNGKS0V7LE/XJVFkNr D/LiU2HN8aUXc1za72UNs85QjRV+yAhVvnjb/3pbq27XmhCZFrwkjG+GnmISw9YeXQek xlWnTqKdosePV1xwK4KjOs66kuxXlf3AKU5deQF+pGB/450mpvllKT8qFVzSzaJD8/0S AZgnAYwNO/jLqIhXAK7bh1aDM4sa1ndQOAs1AQzZukxfPSpfX1UXZuRkCeuJkzxERcCF u54PYRjAegnOyTX/g7OASYzT+eLJGoDVKNbixaCuVTBR3GOc/Ru/K4dqqzA4CXMvk2Zu KF4Q== 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=AVLNT3W+pl6I0XltrmL8EoY5HYXwqNz1G5YBmw1lrjM=; b=nBpHpTaviFM/O3DUpIyZmtdLdv3WMEcK5xjvnWqku/UredszRu22PPxE4Wl/IK80JD kDE5LUabnaVJNzB7/vCUAaxXZmmAwmlHh83hDVKWG1hn1qYk1Ui9anaUUlHgMS+keGSz y2LYqO3GJcJIzhodLXQBqaCxjpVeugUycj3VjDE4j0wad7z3XAjwk2GQsPxuEFCE/uRZ 9rBanGwlCkSNwudMAVbATtnOvlt2NG4nhVcJZJcZTwQCWECiNwjaNatwodi1T3jckiXn Z/LWD4KvsAE92oEDWL39Xlae7ZpRITKNfEUZfhtOGPhkXUbmnSZktyA1KqXkur6Ss7bs AFMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QnbdpOIi; 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 o5si3577812edv.77.2021.04.30.17.25.58; Fri, 30 Apr 2021 17:26: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=QnbdpOIi; 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 S231268AbhEAAYo (ORCPT + 99 others); Fri, 30 Apr 2021 20:24:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230298AbhEAAYn (ORCPT ); Fri, 30 Apr 2021 20:24:43 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EB15C06174A for ; Fri, 30 Apr 2021 17:23:54 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id z13so31688444lft.1 for ; Fri, 30 Apr 2021 17:23:54 -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=AVLNT3W+pl6I0XltrmL8EoY5HYXwqNz1G5YBmw1lrjM=; b=QnbdpOIiL+Wx63dWMjs3T0xwgF9xUMknZpk83NWFCvFAuAB4WjdLQYrShh45R4I7Cl W3fUFPnbmEklfWLTzAYqQROGnxgkDC3QcVJwWIUxRr57Ef1EzEmMw+R1G+4YVVtiQ2iy jhAoXmiWFXm7aGv8r0uVzISEtF5DjR9BPSOa1bFDRtbU3TkDWexPoeYKdkLTbu9FpgNQ yRalgj3JafNuYOLIU4ZJWIquMHerDJmy4Yz9Pj5/omjHExP2Zz/XHrYJ8wVoQ9bekKpV p9Mfq7ty0bNfTkqqNNRMiFDSskaYkUbzD0ysSKcJNSFUoKDuP8asBuf/SwZFlfiNz3Qm IK9A== 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=AVLNT3W+pl6I0XltrmL8EoY5HYXwqNz1G5YBmw1lrjM=; b=oqDItf/FNJ/3sJ11WpEEKgiCKZToQHznvACSdGZ5wXi03ITPsSupR2lZfAJREUgQ+G 71j5ZS6A4Rhg0SDU/lmfUTHa9Wb+7HdxDpL88t8swQ7P0XPeVIbcXY4tJuOWYuF+jVSy OyKMzJUzQx1+O/0kNxm3Gd6vOBjOPK92Tz7Jml12zol8n2+UHsPtGRhlEEZO0IiLFsAh 9xLmtR+e27p2hdWWipBA49Ch9Ch8Z8XL5LTcNWvO2oa8WuMOQtqLjBeRnKG8n01De3n5 B3yEcT5L7dr7EDjCKEWBzZyNX28XmOxLBPjr3asYe4fQBH3lSKLnXv73lNtOxHMmwq2o Wluw== X-Gm-Message-State: AOAM532iSqZCz19UU70M1p5lUWzwUhLGXTYmTZmufaIpnla2kufME8J1 EmFXirHlsJKC6DOuAKARitYssOJFE6qC5sC3T/sCIg== X-Received: by 2002:ac2:5979:: with SMTP id h25mr5078255lfp.297.1619828631049; Fri, 30 Apr 2021 17:23:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Fri, 30 Apr 2021 17:23:40 -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: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 > + 1.14% libc-2.31.so [.] __strlen_avx2 > + 1.06% libc-2.31.so [.] malloc > + 1.03% clang-13 [.] llvm::StringMapImpl::LookupBucketFor > 1.01% libc-2.31.so [.] __memmove_avx_unaligned_erms > + 0.76% conf [.] yylex ^ kconfig > + 0.68% clang-13 [.] llvm::Instruction::getNumSuccessors > + 0.63% libbfd-2.35.2-system.so [.] bfd_hash_lookup ^ bfd > + 0.63% clang-13 [.] llvm::PMDataManager::findAnalysisPass ^ this is another suspect one to me, though perhaps I should isolate out the HOSTCC invocations vs cc-option checks. Should retest with just CC=clang rather than HOSTCC=clang set via LLVM=1. > + 0.63% ld-2.31.so [.] _dl_lookup_symbol_x ^ bfd > 0.62% libc-2.31.so [.] __memcmp_avx2_movbe > 0.60% libc-2.31.so [.] __strcmp_avx2 > + 0.56% clang-13 [.] llvm::ValueHandleBase::AddToUseList > + 0.56% clang-13 [.] > llvm::operator== llvm::DenseMapInfo, llvm::detail::Dense > 0.53% clang-13 [.] > llvm::SmallPtrSetImplBase::insert_imp_big -- Thanks, ~Nick Desaulniers