[compiler-rt] d48d867 - [NFC][sanitizer] Rename RssLimitExceeded -> IsRssLimitExceeded
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 2 12:52:08 PST 2021
Author: Vitaly Buka
Date: 2021-12-02T12:52:00-08:00
New Revision: d48d8670b54909a0e03c579aedf96c34e6fde815
URL: https://github.com/llvm/llvm-project/commit/d48d8670b54909a0e03c579aedf96c34e6fde815
DIFF: https://github.com/llvm/llvm-project/commit/d48d8670b54909a0e03c579aedf96c34e6fde815.diff
LOG: [NFC][sanitizer] Rename RssLimitExceeded -> IsRssLimitExceeded
Added:
Modified:
compiler-rt/lib/asan/asan_allocator.cpp
compiler-rt/lib/memprof/memprof_allocator.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_allocator.cpp b/compiler-rt/lib/asan/asan_allocator.cpp
index 3fa36742060bd..4430207a7a96d 100644
--- a/compiler-rt/lib/asan/asan_allocator.cpp
+++ b/compiler-rt/lib/asan/asan_allocator.cpp
@@ -345,7 +345,7 @@ struct Allocator {
: kMaxAllowedMallocSize;
}
- bool RssLimitExceeded() {
+ bool IsRssLimitExceeded() {
return atomic_load(&rss_limit_exceeded, memory_order_relaxed);
}
@@ -484,7 +484,7 @@ struct Allocator {
AllocType alloc_type, bool can_fill) {
if (UNLIKELY(!asan_inited))
AsanInitFromRtl();
- if (RssLimitExceeded()) {
+ if (UNLIKELY(IsRssLimitExceeded())) {
if (AllocatorMayReturnNull())
return nullptr;
ReportRssLimitExceeded(stack);
diff --git a/compiler-rt/lib/memprof/memprof_allocator.cpp b/compiler-rt/lib/memprof/memprof_allocator.cpp
index 059ce283b8c93..bef6b2b0ff725 100644
--- a/compiler-rt/lib/memprof/memprof_allocator.cpp
+++ b/compiler-rt/lib/memprof/memprof_allocator.cpp
@@ -301,7 +301,7 @@ struct Allocator {
: kMaxAllowedMallocSize;
}
- bool RssLimitExceeded() {
+ bool IsRssLimitExceeded() {
return atomic_load(&rss_limit_exceeded, memory_order_relaxed);
}
@@ -314,7 +314,7 @@ struct Allocator {
AllocType alloc_type) {
if (UNLIKELY(!memprof_inited))
MemprofInitFromRtl();
- if (RssLimitExceeded()) {
+ if (UNLIKELY(IsRssLimitExceeded())) {
if (AllocatorMayReturnNull())
return nullptr;
ReportRssLimitExceeded(stack);
More information about the llvm-commits
mailing list