diff options
Diffstat (limited to 'test/tools/llvm-profdata/sample-profile-basic.test')
-rw-r--r-- | test/tools/llvm-profdata/sample-profile-basic.test | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/tools/llvm-profdata/sample-profile-basic.test b/test/tools/llvm-profdata/sample-profile-basic.test index 0651c513e965..5116b98f3335 100644 --- a/test/tools/llvm-profdata/sample-profile-basic.test +++ b/test/tools/llvm-profdata/sample-profile-basic.test @@ -3,15 +3,15 @@ Basic tests for sample profiles. 1- Show all functions RUN: llvm-profdata show --sample %p/Inputs/sample-profile.proftext | FileCheck %s --check-prefix=SHOW1 SHOW1: Function: main: 184019, 0, 7 sampled lines -SHOW1: line offset: 9, discriminator: 0, number of samples: 2064, calls: _Z3fooi:631 _Z3bari:1471 +SHOW1: 9: 2064, calls: _Z3fooi:631 _Z3bari:1471 SHOW1: Function: _Z3fooi: 7711, 610, 1 sampled lines SHOW1: Function: _Z3bari: 20301, 1437, 1 sampled lines -SHOW1: line offset: 1, discriminator: 0, number of samples: 1437 +SHOW1: 1: 1437 2- Show only bar RUN: llvm-profdata show --sample --function=_Z3bari %p/Inputs/sample-profile.proftext | FileCheck %s --check-prefix=SHOW2 SHOW2: Function: _Z3bari: 20301, 1437, 1 sampled lines -SHOW2: line offset: 1, discriminator: 0, number of samples: 1437 +SHOW2: 1: 1437 SHOW2-NOT: Function: main: 184019, 0, 7 sampled lines SHOW2-NOT: Function: _Z3fooi: 7711, 610, 1 sampled lines @@ -28,3 +28,7 @@ RUN: llvm-profdata merge --sample --text %p/Inputs/sample-profile.proftext %t-bi MERGE1: main:368038:0 MERGE1: 9: 4128 _Z3fooi:1262 _Z3bari:2942 MERGE1: _Z3fooi:15422:1220 + +5- Detect invalid text encoding (e.g. instrumentation profile text format). +RUN: not llvm-profdata show --sample %p/Inputs/foo3bar3-1.proftext 2>&1 | FileCheck %s --check-prefix=BADTEXT +BADTEXT: error: {{.+}}: Unrecognized sample profile encoding format |