€•ÂkŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ'/translations/zh_CN/dev-tools/propeller”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/zh_TW/dev-tools/propeller”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/it_IT/dev-tools/propeller”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ja_JP/dev-tools/propeller”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ko_KR/dev-tools/propeller”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/pt_BR/dev-tools/propeller”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/sp_SP/dev-tools/propeller”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒA/var/lib/git/docbuild/linux/Documentation/dev-tools/propeller.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ%Using Propeller with the Linux kernel”h]”hŒ%Using Propeller with the Linux kernel”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hXÅThis enables Propeller build support for the kernel when using Clang compiler. Propeller is a profile-guided optimization (PGO) method used to optimize binary executables. Like AutoFDO, it utilizes hardware sampling to gather information about the frequency of execution of different code paths within a binary. Unlike AutoFDO, this information is then used right before linking phase to optimize (among others) block layout within and across functions.”h]”hXÅThis enables Propeller build support for the kernel when using Clang compiler. Propeller is a profile-guided optimization (PGO) method used to optimize binary executables. Like AutoFDO, it utilizes hardware sampling to gather information about the frequency of execution of different code paths within a binary. Unlike AutoFDO, this information is then used right before linking phase to optimize (among others) block layout within and across functions.”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒ ”h]”(hÞ)”}”(hŒ²Assuming an AutoFDO profile is already collected following instructions in the AutoFDO document, build the kernel on the host machine, with AutoFDO and Propeller build configs ::”h]”hŒ¯Assuming an AutoFDO profile is already collected following instructions in the AutoFDO document, build the kernel on the host machine, with AutoFDO and Propeller build configs”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KfhjIubjD)”}”(hŒ/CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y”h]”hŒ/CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y”…””}”hj[sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jCh³hÇh´KjhjIubhÞ)”}”(hŒand ::”h]”hŒand”…””}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KmhjIubjD)”}”(hŒ:$ make LLVM=1 CLANG_AUTOFDO_PROFILE=”h]”hŒ:$ make LLVM=1 CLANG_AUTOFDO_PROFILE=”…””}”hjwsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jCh³hÇh´KohjIubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjFh²hh³hÇh´Nubj)”}”(hŒ(Install the kernel on the test machine. ”h]”hÞ)”}”(hŒ'Install the kernel on the test machine.”h]”hŒ'Install the kernel on the test machine.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kqhj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjFh²hh³hÇh´Nubj)”}”(hXåRun the load tests. The '-c' 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 -o -- - For AMD platforms:: $ perf record --pfm-event RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a -N -b -c -o -- Note you can repeat the above steps to collect multiple s. ”h]”(hÞ)”}”(hŒ—Run the load tests. The '-c' option in perf specifies the sample event period. We suggest using a suitable prime number, like 500009, for this purpose.”h]”hŒ›Run the load tests. The ‘-c’ option in perf specifies the sample event period. We suggest using a suitable prime number, like 500009, for this purpose.”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kshj£ubj{)”}”(hhh]”(j)”}”(hŒwFor Intel platforms:: $ perf record -e BR_INST_RETIRED.NEAR_TAKEN:k -a -N -b -c -o -- ”h]”(hÞ)”}”(hŒFor Intel platforms::”h]”hŒFor Intel platforms:”…””}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kwhj¸ubjD)”}”(hŒ^$ perf record -e BR_INST_RETIRED.NEAR_TAKEN:k -a -N -b -c -o -- ”h]”hŒ^$ perf record -e BR_INST_RETIRED.NEAR_TAKEN:k -a -N -b -c -o -- ”…””}”hjÊsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jCh³hÇh´Kyhj¸ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjµubj)”}”(hŒ…For AMD platforms:: $ perf record --pfm-event RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a -N -b -c -o -- ”h]”(hÞ)”}”(hŒFor AMD platforms::”h]”hŒFor AMD platforms:”…””}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K{hjÞubjD)”}”(hŒn$ perf record --pfm-event RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a -N -b -c -o -- ”h]”hŒn$ perf record --pfm-event RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a -N -b -c -o -- ”…””}”hjðsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jCh³hÇh´K}hjÞubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjµubeh}”(h]”h ]”h"]”h$]”h&]”jjuh1jzh³hÇh´Kwhj£ubhÞ)”}”(hŒENote you can repeat the above steps to collect multiple s.”h]”hŒENote you can repeat the above steps to collect multiple s.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj£ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjFh²hh³hÇh´Nubj)”}”(hŒ>(Optional) Download the raw perf file(s) to the host machine. ”h]”hÞ)”}”(hŒ=(Optional) Download the raw perf file(s) to the host machine.”h]”hŒ=(Optional) Download the raw perf file(s) to the host machine.”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjFh²hh³hÇh´Nubj)”}”(hXBUse the create_llvm_prof tool (https://github.com/google/autofdo) to generate Propeller profile. :: $ create_llvm_prof --binary= --profile= --format=propeller --propeller_output_module_name --out=_cc_profile.txt --propeller_symorder=_ld_profile.txt "" can be something like "/home/user/dir/any_string". This command generates a pair of Propeller profiles: "_cc_profile.txt" and "_ld_profile.txt". If there are more than 1 perf_file collected in the previous step, you can create a temp list file "" with each line containing one perf file name and run:: $ create_llvm_prof --binary= --profile=@ --format=propeller --propeller_output_module_name --out=_cc_profile.txt --propeller_symorder=_ld_profile.txt ”h]”(hÞ)”}”(hŒcUse the create_llvm_prof tool (https://github.com/google/autofdo) to generate Propeller profile. ::”h]”(hŒUse the create_llvm_prof tool (”…””}”(hj:h²hh³Nh´NubjW)”}”(hŒ!https://github.com/google/autofdo”h]”hŒ!https://github.com/google/autofdo”…””}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jDuh1jVhj:ubhŒ ) to generate Propeller profile.”…””}”(hj:h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kƒhj6ubjD)”}”(hX$ create_llvm_prof --binary= --profile= --format=propeller --propeller_output_module_name --out=_cc_profile.txt --propeller_symorder=_ld_profile.txt”h]”hX$ create_llvm_prof --binary= --profile= --format=propeller --propeller_output_module_name --out=_cc_profile.txt --propeller_symorder=_ld_profile.txt”…””}”hj[sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jCh³hÇh´K†hj6ubhÞ)”}”(hŒO"" can be something like "/home/user/dir/any_string".”h]”hŒWҠcan be something like “/home/user/dir/any_stringâ€.”…””}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‹hj6ubhÞ)”}”(hŒ‘This command generates a pair of Propeller profiles: "_cc_profile.txt" and "_ld_profile.txt".”h]”hŒ™This command generates a pair of Propeller profiles: “_cc_profile.txt†and “_ld_profile.txtâ€.”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj6ubhÞ)”}”(hŒ¬If there are more than 1 perf_file collected in the previous step, you can create a temp list file "" with each line containing one perf file name and run::”h]”hŒ¯If there are more than 1 perf_file collected in the previous step, you can create a temp list file Ҡwith each line containing one perf file name and run:”…””}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‘hj6ubjD)”}”(hX$ create_llvm_prof --binary= --profile=@ --format=propeller --propeller_output_module_name --out=_cc_profile.txt --propeller_symorder=_ld_profile.txt”h]”hX$ create_llvm_prof --binary= --profile=@ --format=propeller --propeller_output_module_name --out=_cc_profile.txt --propeller_symorder=_ld_profile.txt”…””}”hj“sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jCh³hÇh´K•hj6ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjFh²hh³hÇh´Nubj)”}”(hŒïRebuild the kernel using the AutoFDO and Propeller profiles. :: CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y and :: $ make LLVM=1 CLANG_AUTOFDO_PROFILE= CLANG_PROPELLER_PROFILE_PREFIX=”h]”(hÞ)”}”(hŒ?Rebuild the kernel using the AutoFDO and Propeller profiles. ::”h]”hŒ CLANG_PROPELLER_PROFILE_PREFIX=”h]”hŒl$ make LLVM=1 CLANG_AUTOFDO_PROFILE= CLANG_PROPELLER_PROFILE_PREFIX=”…””}”hjÕsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jCh³hÇh´K¢hj§ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjFh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jj‘j’hj“Œ)”uh1hûhj'h²hh³hÇh´Kfubeh}”(h]”Œworkflow”ah ]”h"]”Œworkflow”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Kbubeh}”(h]”Œ%using-propeller-with-the-linux-kernel”ah ]”h"]”Œ%using propeller with the linux kernel”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j#Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jýjújXjUj$j!jõjòuŒ nametypes”}”(jý‰jX‰j$‰jõ‰uh}”(júhÊjUj$j!j[jòj'uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.