From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC0341372; Tue, 29 Oct 2024 00:13:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730160794; cv=none; b=ckgmDPAur//8TndBW7ojas4uBhfni91MOGay4GkG8wXaXehUcjJXQCppZulSwhSBL1I/pY5cN4ulUp6gHyJB3hlfzov8hXBOtI7MdMvFgEXGRIi6OHPF3fIfp+OpgzJNuI93/0U98KRC752V7cOi4I+jHjAFmA0gHQTTyEbV/J0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730160794; c=relaxed/simple; bh=cmDY0hVnN8OMS1CiL9X/xbVl3kpikmf3L9NSWf8EWHM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Yy9FUY6EgxaVJpIqOSl3ujM1/idvnU70DLd+xU2l/jqXGAv97Al0Uz7HXV8GmqkKJyMXJ/n54ght+gOcV03ZGqxs5hq0X1ZYSwqLkAI4EAyYKXw4EvckM2Q9wkCmuCmDoogp4zSPOGVsndUZAyZLE0KdoNI7pCoLxDp1RyNDveY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JurZnXor; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JurZnXor" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76F12C4CEC3; Tue, 29 Oct 2024 00:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730160793; bh=cmDY0hVnN8OMS1CiL9X/xbVl3kpikmf3L9NSWf8EWHM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JurZnXor1Qkel1iP8tzrJ7nyz3apQcnmPW+2bgSqcA+qkpyhh7Qjx/hEx/dVC0WJG d+YCDjAUWPj+QCM7iZttaYsMt5FQE7yIIOZvoGNIs2Kz+OlcxDZzRt6lXfT8fSB+Hs PMeu/ylajOPw2m305+3CJcWMY5ZpWXE++r8vO7VzMN12hp7ScQkyE8nNLrA7wMy2XJ t0dVvBDhh7eCCUPJIVwzkIm/RwLdXFckzOgGb2swQ9Gla3WY4NbL/DPQpNsvkG1RLj 20Ug0SS9+T5GsmpHLEJ4y+vb65y1cnoECSOmEeb7qmCS81Bt43hO98ExguH7qSvYIC nB9M1FjTe/LCA== Date: Mon, 28 Oct 2024 17:13:10 -0700 From: Kees Cook To: Rong Xu Cc: Alice Ryhl , Andrew Morton , Arnd Bergmann , Bill Wendling , Borislav Petkov , Breno Leitao , Brian Gerst , Dave Hansen , David Li , Han Shen , Heiko Carstens , "H. Peter Anvin" , Ingo Molnar , Jann Horn , Jonathan Corbet , Josh Poimboeuf , Juergen Gross , Justin Stitt , Masahiro Yamada , "Mike Rapoport (IBM)" , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , "Paul E. McKenney" , Peter Zijlstra , Sami Tolvanen , Thomas Gleixner , Wei Yang , workflows@vger.kernel.org, Miguel Ojeda , Maksim Panchenko , "David S. Miller" , Andreas Larsson , Yonghong Song , Yabin Cui , Krzysztof Pszeniczny , Sriraman Tallam , Stephane Eranian , x86@kernel.org, linux-arch@vger.kernel.org, sparclinux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v6 6/7] AutoFDO: Enable machine function split optimization for AutoFDO Message-ID: <202410281713.28C1EDCA0@keescook> References: <20241026051410.2819338-1-xur@google.com> <20241026051410.2819338-7-xur@google.com> Precedence: bulk X-Mailing-List: workflows@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241026051410.2819338-7-xur@google.com> On Fri, Oct 25, 2024 at 10:14:08PM -0700, Rong Xu wrote: > Enable the machine function split optimization for AutoFDO in Clang. > > Machine function split (MFS) is a pass in the Clang compiler that > splits a function into hot and cold parts. The linker groups all > cold blocks across functions together. This decreases hot code > fragmentation and improves iCache and iTLB utilization. > > MFS requires a profile so this is enabled only for the AutoFDO builds. > > Co-developed-by: Han Shen > Signed-off-by: Han Shen Reviewed-by: Kees Cook -- Kees Cook