Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / memprof / TestCases / atexit_stats.cpp
blob4a5fac9b8d266be38a55d77368571e234889754e
1 // Check atexit option.
3 // RUN: %clangxx_memprof -O0 %s -o %t
4 // RUN: %env_memprof_opts=print_text=true:log_path=stderr:atexit=1 %run %t 2>&1 | FileCheck %s
5 // RUN: %env_memprof_opts=print_text=true:log_path=stderr:atexit=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOATEXIT
7 // CHECK: MemProfiler exit stats:
8 // CHECK: Stats: {{[0-9]+}}M malloced ({{[0-9]+}}M for overhead) by {{[0-9]+}} calls
9 // CHECK: Stats: {{[0-9]+}}M realloced by {{[0-9]+}} calls
10 // CHECK: Stats: {{[0-9]+}}M freed by {{[0-9]+}} calls
11 // CHECK: Stats: {{[0-9]+}}M really freed by {{[0-9]+}} calls
12 // CHECK: Stats: {{[0-9]+}}M ({{[0-9]+}}M-{{[0-9]+}}M) mmaped; {{[0-9]+}} maps, {{[0-9]+}} unmaps
13 // CHECK: mallocs by size class:
14 // CHECK: Stats: malloc large: {{[0-9]+}}
16 // NOATEXIT-NOT: MemProfiler exit stats
18 int main() {
19 return 0;