Skip to content

Commit f9dbf1a

Browse files
authored
[MemProf] Use correct print_text value (#125793)
1 parent 7ef636e commit f9dbf1a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler-rt/lib/memprof/memprof_allocator.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,9 @@ struct Allocator {
291291

292292
atomic_uint8_t destructing;
293293
atomic_uint8_t constructed;
294-
bool print_text;
295294

296295
// ------------------- Initialization ------------------------
297-
explicit Allocator(LinkerInitialized) : print_text(flags()->print_text) {
296+
explicit Allocator(LinkerInitialized) {
298297
atomic_store_relaxed(&destructing, 0);
299298
atomic_store_relaxed(&constructed, 1);
300299
}
@@ -350,13 +349,13 @@ struct Allocator {
350349
}
351350

352351
void FinishAndWrite() {
353-
if (print_text && common_flags()->print_module_map)
352+
if (flags()->print_text && common_flags()->print_module_map)
354353
DumpProcessMap();
355354

356355
allocator.ForceLock();
357356

358357
InsertLiveBlocks();
359-
if (print_text) {
358+
if (flags()->print_text) {
360359
if (!flags()->print_terse)
361360
Printf("Recorded MIBs (incl. live on exit):\n");
362361
MIBMap.ForEach(PrintCallback,

0 commit comments

Comments
 (0)