[compiler-rt] [compiler-rt][memprof] clear histogram tail granule on allocation. (PR #208911)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 11 06:14:47 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 -- compiler-rt/test/memprof/TestCases/memprof_histogram_tail_clear.cpp compiler-rt/lib/memprof/memprof_allocator.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/compiler-rt/test/memprof/TestCases/memprof_histogram_tail_clear.cpp b/compiler-rt/test/memprof/TestCases/memprof_histogram_tail_clear.cpp
index 0dc69e7d0..119be97b7 100644
--- a/compiler-rt/test/memprof/TestCases/memprof_histogram_tail_clear.cpp
+++ b/compiler-rt/test/memprof/TestCases/memprof_histogram_tail_clear.cpp
@@ -9,8 +9,12 @@
#include <stdlib.h>
// Distinct call sites keep the two allocations as separate (unmerged) MIBs.
-__attribute__((noinline)) static char *alloc_first() { return (char *)malloc(20); }
-__attribute__((noinline)) static char *alloc_second() { return (char *)malloc(20); }
+__attribute__((noinline)) static char *alloc_first() {
+ return (char *)malloc(20);
+}
+__attribute__((noinline)) static char *alloc_second() {
+ return (char *)malloc(20);
+}
int main() {
// Leave a count of 42 in the tail granule (byte 16), then free.
``````````
</details>
https://github.com/llvm/llvm-project/pull/208911
More information about the llvm-commits
mailing list