<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile.autofdo</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>2fd65f7a - AutoFDO: Enable machine function split optimization for AutoFDO</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Makefile.autofdo#2fd65f7a</link>
        <description>AutoFDO: Enable machine function split optimization for AutoFDOEnable the machine function split optimization for AutoFDO in Clang.Machine function split (MFS) is a pass in the Clang compiler thatsplits a function into hot and cold parts. The linker groups allcold blocks across functions together. This decreases hot codefragmentation and improves iCache and iTLB utilization.MFS requires a profile so this is enabled only for the AutoFDO builds.Co-developed-by: Han Shen &lt;shenhan@google.com&gt;Signed-off-by: Han Shen &lt;shenhan@google.com&gt;Signed-off-by: Rong Xu &lt;xur@google.com&gt;Suggested-by: Sriraman Tallam &lt;tmsriram@google.com&gt;Suggested-by: Krzysztof Pszeniczny &lt;kpszeniczny@google.com&gt;Tested-by: Yonghong Song &lt;yonghong.song@linux.dev&gt;Tested-by: Yabin Cui &lt;yabinc@google.com&gt;Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Makefile.autofdo</description>
        <pubDate>Sat, 02 Nov 2024 17:51:13 +0000</pubDate>
        <dc:creator>Rong Xu &lt;xur@google.com&gt;</dc:creator>
    </item>
<item>
        <title>0847420f - AutoFDO: Enable -ffunction-sections for the AutoFDO build</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Makefile.autofdo#0847420f</link>
        <description>AutoFDO: Enable -ffunction-sections for the AutoFDO buildEnable -ffunction-sections by default for the AutoFDO build.With -ffunction-sections, the compiler places each function in its ownsection named .text.function_name instead of placing all functions inthe .text section. In the AutoFDO build, this allows the linker toutilize profile information to reorganize functions for improvedutilization of iCache and iTLB.Co-developed-by: Han Shen &lt;shenhan@google.com&gt;Signed-off-by: Han Shen &lt;shenhan@google.com&gt;Signed-off-by: Rong Xu &lt;xur@google.com&gt;Suggested-by: Sriraman Tallam &lt;tmsriram@google.com&gt;Tested-by: Yonghong Song &lt;yonghong.song@linux.dev&gt;Tested-by: Yabin Cui &lt;yabinc@google.com&gt;Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Makefile.autofdo</description>
        <pubDate>Sat, 02 Nov 2024 17:51:12 +0000</pubDate>
        <dc:creator>Rong Xu &lt;xur@google.com&gt;</dc:creator>
    </item>
<item>
        <title>315ad878 - kbuild: Add AutoFDO support for Clang build</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Makefile.autofdo#315ad878</link>
        <description>kbuild: Add AutoFDO support for Clang buildAdd the build support for using Clang&apos;s AutoFDO. Building the kernelwith AutoFDO does not reduce the optimization level from thecompiler. AutoFDO uses hardware sampling to gather information aboutthe frequency of execution of different code paths within a binary.This information is then used to guide the compiler&apos;s optimizationdecisions, resulting in a more efficient binary. Experimentsshowed that the kernel can improve up to 10% in latency.The support requires a Clang compiler after LLVM 17. This submissionis limited to x86 platforms that support PMU features like LBR onIntel machines and AMD Zen3 BRS. Support for SPE on ARM 1, and BRBE on ARM 1 is part of planned future work.Here is an example workflow for AutoFDO kernel:1) Build the kernel on the host machine with LLVM enabled, for example,       $ make menuconfig LLVM=1    Turn on AutoFDO build config:      CONFIG_AUTOFDO_CLANG=y    With a configuration that has LLVM enabled, use the following    command:       scripts/config -e AUTOFDO_CLANG    After getting the config, build with      $ make LLVM=12) Install the kernel on the test machine.3) Run the load tests. The &apos;-c&apos; option in perf specifies the sample   event period. We suggest     using a suitable prime number,   like 500009, for this purpose.   For Intel platforms:      $ perf record -e BR_INST_RETIRED.NEAR_TAKEN:k -a -N -b -c &lt;count&gt; \        -o &lt;perf_file&gt; -- &lt;loadtest&gt;   For AMD platforms:      The supported system are: Zen3 with BRS, or Zen4 with amd_lbr_v2     For Zen3:      $ cat proc/cpuinfo | grep &quot; brs&quot;      For Zen4:      $ cat proc/cpuinfo | grep amd_lbr_v2      $ perf record --pfm-events RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a \        -N -b -c &lt;count&gt; -o &lt;perf_file&gt; -- &lt;loadtest&gt;4) (Optional) Download the raw perf file to the host machine.5) To generate an AutoFDO profile, two offline tools are available:   create_llvm_prof and llvm_profgen. The create_llvm_prof tool is part   of the AutoFDO project and can be found on GitHub   (https://github.com/google/autofdo), version v0.30.1 or later. The   llvm_profgen tool is included in the LLVM compiler itself. It&apos;s   important to note that the version of llvm_profgen doesn&apos;t need to   match the version of Clang. It needs to be the LLVM 19 release or   later, or from the LLVM trunk.      $ llvm-profgen --kernel --binary=&lt;vmlinux&gt; --perfdata=&lt;perf_file&gt; \        -o &lt;profile_file&gt;   or      $ create_llvm_prof --binary=&lt;vmlinux&gt; --profile=&lt;perf_file&gt; \        --format=extbinary --out=&lt;profile_file&gt;   Note that multiple AutoFDO profile files can be merged into one via:      $ llvm-profdata merge -o &lt;profile_file&gt;  &lt;profile_1&gt; ... &lt;profile_n&gt;6) Rebuild the kernel using the AutoFDO profile file with the same config   as step 1, (Note CONFIG_AUTOFDO_CLANG needs to be enabled):      $ make LLVM=1 CLANG_AUTOFDO_PROFILE=&lt;profile_file&gt;Co-developed-by: Han Shen &lt;shenhan@google.com&gt;Signed-off-by: Han Shen &lt;shenhan@google.com&gt;Signed-off-by: Rong Xu &lt;xur@google.com&gt;Suggested-by: Sriraman Tallam &lt;tmsriram@google.com&gt;Suggested-by: Krzysztof Pszeniczny &lt;kpszeniczny@google.com&gt;Suggested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;Suggested-by: Stephane Eranian &lt;eranian@google.com&gt;Tested-by: Yonghong Song &lt;yonghong.song@linux.dev&gt;Tested-by: Yabin Cui &lt;yabinc@google.com&gt;Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;Tested-by: Peter Jung &lt;ptr1337@cachyos.org&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Makefile.autofdo</description>
        <pubDate>Sat, 02 Nov 2024 17:51:08 +0000</pubDate>
        <dc:creator>Rong Xu &lt;xur@google.com&gt;</dc:creator>
    </item>
</channel>
</rss>
