1 RUN: llvm-profdata merge --sample --text -output=%t.proftext %S/Inputs/cs-sample.proftext
2 RUN: diff -b %t.proftext %S/Inputs/cs-sample.proftext
4 RUN: llvm-profdata merge --sample --text -output=%t.proftext %S/Inputs/cs-sample.proftext -sample-merge-cold-context -profile-summary-cold-count=500
5 RUN: FileCheck %s --input-file %t.proftext --check-prefixes=CHECK-TRIM,CHECK-MERGE
6 RUN: llvm-profdata merge --sample --text -output=%t.proftext %S/Inputs/cs-sample.proftext -sample-merge-cold-context -sample-trim-cold-context -profile-summary-cold-count=500
7 RUN: FileCheck %s --input-file %t.proftext --check-prefixes=CHECK-TRIM,CHECK-END
8 RUN: llvm-profdata merge --sample --text -output=%t.proftext %S/Inputs/cs-sample.proftext -sample-merge-cold-context -sample-trim-cold-context -profile-summary-cutoff-cold=990000
9 RUN: FileCheck %s --input-file %t.proftext --check-prefixes=CHECK-TRIM,CHECK-END
11 CHECK-TRIM: [main:3 @ _Z5funcAi:1 @ _Z8funcLeafi]:1467299:11
14 CHECK-TRIM-NEXT: 3: 287884
15 CHECK-TRIM-NEXT: 4: 287864 _Z3fibi:315608
16 CHECK-TRIM-NEXT: 15: 23
17 CHECK-TRIM-NEXT: [main:3.1 @ _Z5funcBi:1 @ _Z8funcLeafi]:500853:20
18 CHECK-TRIM-NEXT: 0: 15
19 CHECK-TRIM-NEXT: 1: 15
20 CHECK-TRIM-NEXT: 3: 74946
21 CHECK-TRIM-NEXT: 4: 74941 _Z3fibi:82359
22 CHECK-TRIM-NEXT: 10: 23324
23 CHECK-TRIM-NEXT: 11: 23327 _Z3fibi:25228
24 CHECK-TRIM-NEXT: 15: 11
25 CHECK-TRIM-NEXT: !Attributes: 1
27 CHECK-MERGE: [_Z5funcBi]:360:32
28 CHECK-MERGE-NEXT: 0: 32
29 CHECK-MERGE-NEXT: 1: 32 _Z8funcLeafi:20
30 CHECK-MERGE-NEXT: 3: 12
31 CHECK-MERGE-NEXT:[main]:308:12
32 CHECK-MERGE-NEXT: 2: 24
33 CHECK-MERGE-NEXT: 3: 28 _Z5funcAi:18
34 CHECK-MERGE-NEXT: 3.1: 28 _Z5funcBi:30
35 CHECK-MERGE-NEXT:[_Z5funcAi]:99:11
36 CHECK-MERGE-NEXT: 0: 10
37 CHECK-MERGE-NEXT: 1: 10 _Z8funcLeafi:11
38 CHECK-MERGE-NEXT: 3: 24