2 // RUN: %clang_profgen -Wl,--build-id=none -O2 -o %t %s
3 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
4 // RUN: llvm-profdata show --binary-ids %t.profraw > %t.out
5 // RUN: FileCheck %s --check-prefix=NO-BINARY-ID < %t.out
6 // RUN: llvm-profdata merge -o %t.profdata %t.profraw
8 // RUN: %clang_profgen -Wl,--build-id -O2 -o %t %s
9 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
10 // RUN: llvm-profdata show --binary-ids %t.profraw > %t.profraw.out
11 // RUN: FileCheck %s --check-prefix=BINARY-ID-RAW-PROF < %t.profraw.out
13 // RUN: rm -rf %t.profdir
14 // RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
15 // RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
16 // RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
17 // RUN: llvm-profdata show --binary-ids %t.profdir/default_*.profraw > %t.profraw.out
18 // RUN: FileCheck %s --check-prefix=BINARY-ID-MERGE-PROF < %t.profraw.out
20 // RUN: llvm-profdata merge -o %t.profdata %t.profraw %t.profraw
21 // RUN: llvm-profdata show --binary-ids %t.profdata > %t.profdata.out
22 // RUN: FileCheck %s --check-prefix=BINARY-ID-INDEXED-PROF < %t.profraw.out
36 // NO-BINARY-ID: Instrumentation level: Front-end
37 // NO-BINARY-ID-NEXT: Total functions: 3
38 // NO-BINARY-ID-NEXT: Maximum function count: 1
39 // NO-BINARY-ID-NEXT: Maximum internal block count: 0
40 // NO-BINARY-ID-NOT: Binary IDs:
42 // BINARY-ID-RAW-PROF: Instrumentation level: Front-end
43 // BINARY-ID-RAW-PROF-NEXT: Total functions: 3
44 // BINARY-ID-RAW-PROF-NEXT: Maximum function count: 1
45 // BINARY-ID-RAW-PROF-NEXT: Maximum internal block count: 0
46 // BINARY-ID-RAW-PROF-NEXT: Binary IDs:
47 // BINARY-ID-RAW-PROF-NEXT: {{[0-9a-f]+}}
49 // BINARY-ID-MERGE-PROF: Instrumentation level: Front-end
50 // BINARY-ID-MERGE-PROF-NEXT: Total functions: 3
51 // BINARY-ID-MERGE-PROF-NEXT: Maximum function count: 3
52 // BINARY-ID-MERGE-PROF-NEXT: Maximum internal block count: 0
53 // BINARY-ID-MERGE-PROF-NEXT: Binary IDs:
54 // BINARY-ID-MERGE-PROF-NEXT: {{[0-9a-f]+}}
56 // BINARY-ID-INDEXED-PROF: Instrumentation level: Front-end
57 // BINARY-ID-INDEXED-PROF-NEXT: Total functions: 3
58 // BINARY-ID-INDEXED-PROF-NEXT: Maximum function count: 3
59 // BINARY-ID-INDEXED-PROF-NEXT: Maximum internal block count: 0
60 // BINARY-ID-INDEXED-PROF-NEXT: Binary IDs:
61 // BINARY-ID-INDEXED-PROF-NEXT: {{[0-9a-f]+}}