38 lines · c
1// REQUIRES: darwin2 3// RUN: echo "void dso1(void) {}" > %t.dso1.c4// RUN: echo "void dso2(void) {}" > %t.dso2.c5// RUN: %clang_pgogen -dynamiclib -o %t.dso1.dylib %t.dso1.c6// RUN: %clang_pgogen -dynamiclib -o %t.dso2.dylib %t.dso2.c7// RUN: %clang_pgogen -o %t.exe %s %t.dso1.dylib %t.dso2.dylib8// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe 2>&1 | count 09// RUN: llvm-profdata show --counts --all-functions %t.profraw | FileCheck %s10 11// CHECK-LABEL: Counters:12// CHECK-NEXT: dso1:13// CHECK-NEXT: Hash: 0x{{.*}}14// CHECK-NEXT: Counters: 115// CHECK-NEXT: Block counts: [1]16// CHECK-NEXT: dso2:17// CHECK-NEXT: Hash: 0x{{.*}}18// CHECK-NEXT: Counters: 119// CHECK-NEXT: Block counts: [1]20// CHECK-NEXT: main:21// CHECK-NEXT: Hash: 0x{{.*}}22// CHECK-NEXT: Counters: 123// CHECK-NEXT: Block counts: [1]24// CHECK-NEXT: Instrumentation level: IR25// CHECK-NEXT: Functions shown: 326// CHECK-NEXT: Total functions: 327// CHECK-NEXT: Maximum function count: 128// CHECK-NEXT: Maximum internal block count: 029 30void dso1(void);31void dso2(void);32 33int main() {34 dso1();35 dso2();36 return 0;37}38