1 // RUN: %clangxx_memprof %s -o %t
3 // RUN: %env_memprof_opts=print_text=true:log_path=stdout %run %t | FileCheck %s
5 #include <sanitizer/memprof_interface.h>
8 int main(int argc
, char **argv
) {
9 for (int i
= 0; i
< 3; i
++) {
10 char *x
= (char *)malloc(10);
19 // We should get one allocation site with alloc_count = loop trip count = 3
20 // CHECK: Memory allocation stack id = [[ID:[0-9]+]]
21 // CHECK-NEXT-COUNT-1: alloc_count 3
22 // CHECK-COUNT-1: Stack for id {{.*}}[[ID]]
23 // CHECK-NEXT-COUNT-1: memprof_malloc_linux.cpp
24 // CHECK-NEXT-COUNT-1: memprof_merge_mib.cpp