[compiler-rt] [scudo] Add last release time info to getStats (PR #170902)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 11:11:05 PST 2025
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 h -- compiler-rt/lib/scudo/standalone/primary64.h --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/lib/scudo/standalone/primary64.h b/compiler-rt/lib/scudo/standalone/primary64.h
index c394f77d7..4eccf8056 100644
--- a/compiler-rt/lib/scudo/standalone/primary64.h
+++ b/compiler-rt/lib/scudo/standalone/primary64.h
@@ -1162,11 +1162,13 @@ void SizeClassAllocator64<Config>::getStats(ScopedString *Str, uptr ClassId,
const u64 CurTimeNs = getMonotonicTimeFast();
const u64 LastReleaseAtNs = Region->ReleaseInfo.LastReleaseAtNs;
if (LastReleaseAtNs != 0 && CurTimeNs != LastReleaseAtNs) {
- const u64 DiffSinceLastReleaseNs =
- CurTimeNs - Region->ReleaseInfo.LastReleaseAtNs;
- const u64 LastReleaseSecAgo = DiffSinceLastReleaseNs / 1000000000;
- const u64 LastReleaseMsAgo = (DiffSinceLastReleaseNs % 1000000000) / 1000000;
- Str->append("Latest release: %" PRIu64 ":%" PRIu64 " seconds ago", LastReleaseSecAgo, LastReleaseMsAgo);
+ const u64 DiffSinceLastReleaseNs =
+ CurTimeNs - Region->ReleaseInfo.LastReleaseAtNs;
+ const u64 LastReleaseSecAgo = DiffSinceLastReleaseNs / 1000000000;
+ const u64 LastReleaseMsAgo =
+ (DiffSinceLastReleaseNs % 1000000000) / 1000000;
+ Str->append("Latest release: %" PRIu64 ":%" PRIu64 " seconds ago",
+ LastReleaseSecAgo, LastReleaseMsAgo);
}
Str->append("\n");
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/170902
More information about the llvm-commits
mailing list