[llvm] [Sample Profile] make page size configurable for ProfiledBinary (PR #206873)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 09:38:40 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/tools/llvm-profgen/ProfiledBinary.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.cpp b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
index ffce8675b..3172b0b93 100644
--- a/llvm/tools/llvm-profgen/ProfiledBinary.cpp
+++ b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
@@ -372,7 +372,8 @@ void ProfiledBinary::setPreferredTextSegmentAddresses(const ELFFile<ELFT> &Obj,
   // same width as the 64-bit segment addresses (p_vaddr / p_offset).
   uint64_t PageSize = TargetPageSize;
   if (!PageSize || (PageSize & (PageSize - 1)))
-    exitWithError("Number in -page-size=<num> must be positive power of two", FileName);
+    exitWithError("Number in -page-size=<num> must be positive power of two",
+                  FileName);
 
   for (const typename ELFT::Phdr &Phdr : PhdrRange) {
     if (Phdr.p_type == ELF::PT_INTERP)

``````````

</details>


https://github.com/llvm/llvm-project/pull/206873


More information about the llvm-commits mailing list