brintos

brintos / llvm-project-archived public Read only

0
0
Text · 817 B · 4a5fac9 Raw
21 lines · cpp
1// Check atexit option.2 3// RUN: %clangxx_memprof -O0 %s -o %t4// RUN: %env_memprof_opts=print_text=true:log_path=stderr:atexit=1 %run %t 2>&1 | FileCheck %s5// RUN: %env_memprof_opts=print_text=true:log_path=stderr:atexit=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOATEXIT6 7// CHECK: MemProfiler exit stats:8// CHECK: Stats: {{[0-9]+}}M malloced ({{[0-9]+}}M for overhead) by {{[0-9]+}} calls9// CHECK: Stats: {{[0-9]+}}M realloced by {{[0-9]+}} calls10// CHECK: Stats: {{[0-9]+}}M freed by {{[0-9]+}} calls11// CHECK: Stats: {{[0-9]+}}M really freed by {{[0-9]+}} calls12// CHECK: Stats: {{[0-9]+}}M ({{[0-9]+}}M-{{[0-9]+}}M) mmaped; {{[0-9]+}} maps, {{[0-9]+}} unmaps13// CHECK:   mallocs by size class:14// CHECK: Stats: malloc large: {{[0-9]+}}15 16// NOATEXIT-NOT: MemProfiler exit stats17 18int main() {19  return 0;20}21