InsertLiveBlocks();
if (print_text) {
+ if (!flags()->print_terse)
+ Printf("Recorded MIBs (incl. live on exit):\n");
MIBMap.ForEach(PrintCallback,
reinterpret_cast<void *>(flags()->print_terse));
StackDepotPrintAll();
// Inserts any blocks which have been allocated but not yet deallocated.
void InsertLiveBlocks() {
- if (print_text && !flags()->print_terse)
- Printf("Live on exit:\n");
-
allocator.ForEachChunk(
[](uptr chunk, void *alloc) {
u64 user_requested_size;
-// RUN: %clangxx_memprof %s -o %t
+// RUN: %clangxx_memprof %s -o %t
// RUN: %env_memprof_opts=print_text=true:log_path=stdout %run %t | FileCheck --check-prefix=CHECK-TEXT %s
-// RUN: %env_memprof_opts=print_text=true:log_path=stdout,print_text=false %run %t > %t.memprofraw
+// RUN: %env_memprof_opts=log_path=stdout %run %t > %t.memprofraw
// RUN: od -c -N 8 %t.memprofraw | FileCheck --check-prefix=CHECK-RAW %s
#include <sanitizer/memprof_interface.h>
}
// We should get 2 rounds of profile info, one from the explicit dump request,
// and one at exit.
+//
+// CHECK-TEXT: Recorded MIBs (incl. live on exit):
// CHECK-TEXT: Memory allocation stack id
// CHECK-TEXT: Stack for id
+//
+// CHECK-TEXT: Recorded MIBs (incl. live on exit):
// CHECK-TEXT: Memory allocation stack id
// CHECK-TEXT: Stack for id
//