[compiler-rt] f9dbf1a - [MemProf] Use correct print_text value (#125793)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 09:02:17 PST 2025
Author: Ellis Hoag
Date: 2025-02-05T09:02:13-08:00
New Revision: f9dbf1a18b6087b4a5c5dd09e6b1b1d83469e861
URL: https://github.com/llvm/llvm-project/commit/f9dbf1a18b6087b4a5c5dd09e6b1b1d83469e861
DIFF: https://github.com/llvm/llvm-project/commit/f9dbf1a18b6087b4a5c5dd09e6b1b1d83469e861.diff
LOG: [MemProf] Use correct print_text value (#125793)
Added:
Modified:
compiler-rt/lib/memprof/memprof_allocator.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/memprof/memprof_allocator.cpp b/compiler-rt/lib/memprof/memprof_allocator.cpp
index c3448c22532bb8..60f5c853f9d76f 100644
--- a/compiler-rt/lib/memprof/memprof_allocator.cpp
+++ b/compiler-rt/lib/memprof/memprof_allocator.cpp
@@ -291,10 +291,9 @@ struct Allocator {
atomic_uint8_t destructing;
atomic_uint8_t constructed;
- bool print_text;
// ------------------- Initialization ------------------------
- explicit Allocator(LinkerInitialized) : print_text(flags()->print_text) {
+ explicit Allocator(LinkerInitialized) {
atomic_store_relaxed(&destructing, 0);
atomic_store_relaxed(&constructed, 1);
}
@@ -350,13 +349,13 @@ struct Allocator {
}
void FinishAndWrite() {
- if (print_text && common_flags()->print_module_map)
+ if (flags()->print_text && common_flags()->print_module_map)
DumpProcessMap();
allocator.ForceLock();
InsertLiveBlocks();
- if (print_text) {
+ if (flags()->print_text) {
if (!flags()->print_terse)
Printf("Recorded MIBs (incl. live on exit):\n");
MIBMap.ForEach(PrintCallback,
More information about the llvm-commits
mailing list