summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata/sample-profile-basic.test
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-04-26 15:39:53 +0000
committerVedant Kumar <vsk@apple.com>2017-04-26 15:39:53 +0000
commit7f5b3d6fc83e4f4c2aa64967ba9f45a361b67502 (patch)
tree27e4857cb5957b980186f39075da24590aeef5f1 /llvm/test/tools/llvm-profdata/sample-profile-basic.test
parentc7d35a0d6a3be388cc0be22b39c21fea9a3b6731 (diff)
downloadbcm5719-llvm-7f5b3d6fc83e4f4c2aa64967ba9f45a361b67502.tar.gz
bcm5719-llvm-7f5b3d6fc83e4f4c2aa64967ba9f45a361b67502.zip
[sampleprof] Drop test dependency on the string hash func (NFC)
The SampleProfWriter emits function information in an order determined by the string hash function. The situation is a bit brittle, because changing the hash function can break the tests. Instead of sorting the function samples to get a relaible ordering (that might be too expensive), make the tests not depend on a particular ordering of function samples. Differential Revision: https://reviews.llvm.org/D32516 llvm-svn: 301419
Diffstat (limited to 'llvm/test/tools/llvm-profdata/sample-profile-basic.test')
-rw-r--r--llvm/test/tools/llvm-profdata/sample-profile-basic.test16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/test/tools/llvm-profdata/sample-profile-basic.test b/llvm/test/tools/llvm-profdata/sample-profile-basic.test
index 5116b98f333..211d8c5bbd8 100644
--- a/llvm/test/tools/llvm-profdata/sample-profile-basic.test
+++ b/llvm/test/tools/llvm-profdata/sample-profile-basic.test
@@ -2,11 +2,11 @@ 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: 9: 2064, calls: _Z3fooi:631 _Z3bari:1471
-SHOW1: Function: _Z3fooi: 7711, 610, 1 sampled lines
-SHOW1: Function: _Z3bari: 20301, 1437, 1 sampled lines
-SHOW1: 1: 1437
+SHOW1-DAG: Function: main: 184019, 0, 7 sampled lines
+SHOW1-DAG: 9: 2064, calls: _Z3fooi:631 _Z3bari:1471
+SHOW1-DAG: Function: _Z3fooi: 7711, 610, 1 sampled lines
+SHOW1-DAG: Function: _Z3bari: 20301, 1437, 1 sampled lines
+SHOW1-DAG: 1: 1437
2- Show only bar
RUN: llvm-profdata show --sample --function=_Z3bari %p/Inputs/sample-profile.proftext | FileCheck %s --check-prefix=SHOW2
@@ -25,9 +25,9 @@ RUN: diff %t-binary %t-text
counters have doubled.
RUN: llvm-profdata merge --sample %p/Inputs/sample-profile.proftext -o %t-binprof
RUN: llvm-profdata merge --sample --text %p/Inputs/sample-profile.proftext %t-binprof -o - | FileCheck %s --check-prefix=MERGE1
-MERGE1: main:368038:0
-MERGE1: 9: 4128 _Z3fooi:1262 _Z3bari:2942
-MERGE1: _Z3fooi:15422:1220
+MERGE1-DAG: main:368038:0
+MERGE1-DAG: 9: 4128 _Z3fooi:1262 _Z3bari:2942
+MERGE1-DAG: _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
OpenPOWER on IntegriCloud